/* ==========================================================================
   A2Z Converter — Base: design tokens, reset, typography, shared components
   Used by every page.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #FF4C29;
  --primary-600: #E63E1C;
  --primary-700: #C2310F;
  --primary-50: #FFF3EF;
  --primary-100: #FFE3DA;
  --primary-200: #FFC6B5;
  --primary-ring: rgba(255, 76, 41, .28);

  /* Neutrals (light surfaces) */
  --bg: #FFFFFF;
  --panel: #F7F7F8;
  --panel-2: #F0F0F2;
  --card: #FFFFFF;
  --border: #E6E6EA;
  --border-strong: #D4D4D8;
  --text: #0A0A0A;
  --text-2: #27272A;
  --muted: #5C5C66;
  --muted-2: #8A8A93;

  /* Dark surfaces (header, hero, footer) */
  --dark: #0B0B0F;
  --dark-2: #141419;
  --dark-3: #1C1C23;
  --dark-border: rgba(255, 255, 255, .09);
  --dark-text: #F4F4F5;
  --dark-muted: #A1A1AA;

  /* Category accents */
  --c-orange: #FF4C29;
  --c-indigo: #6366F1;
  --c-amber: #F59E0B;
  --c-pink: #EC4899;
  --c-emerald: #10B981;
  --c-red: #EF4444;
  --c-blue: #3B82F6;
  --c-violet: #8B5CF6;
  --c-green: #22C55E;
  --c-sky: #0EA5E9;

  /* Shape & depth */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .06);
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 8px 24px -8px rgba(16, 16, 24, .10);
  --shadow-lg: 0 2px 4px rgba(16, 16, 24, .04), 0 24px 48px -16px rgba(16, 16, 24, .18);

  /* Layout */
  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 72px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-100); color: var(--text); }

body.is-locked { overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-xs);
  font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 72px; }
.section--panel { background: var(--panel); }
@media (min-width: 992px) { .section { padding-block: 96px; } }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 32px; margin-bottom: 36px;
}
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .section-sub { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head--center .eyebrow::after { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.section-sub {
  margin-top: 12px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--panel-2);
  --btn-fg: var(--text);
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn i { font-size: .95em; }

.btn--primary { --btn-bg: var(--primary); --btn-fg: #fff; box-shadow: 0 6px 18px -6px rgba(255, 76, 41, .55); }
.btn--primary:hover { --btn-bg: var(--primary-600); }
/* Download of a finished file: success green (client request 2026-11-20). #198754 keeps white text at 4.5:1 */
.btn--success { --btn-bg: #198754; --btn-fg: #fff; box-shadow: 0 6px 18px -6px rgba(25, 135, 84, .55); }
.btn--success:hover { --btn-bg: #157347; }
.btn--outline { --btn-bg: transparent; --btn-bd: var(--border-strong); }
.btn--outline:hover { --btn-bd: var(--text); }
.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { --btn-bg: var(--panel-2); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--text); }
.btn--light:hover { --btn-bg: var(--primary-50); }
.btn--dark-outline { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .28); }
.btn--dark-outline:hover { --btn-bd: #fff; }
.btn--sm { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--primary);
}
.link-arrow i { transition: transform .2s var(--ease); font-size: 13px; }
.link-arrow:hover i { transform: translateX(3px); }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--panel-2); color: var(--muted);
  font-size: 12.5px; font-weight: 500; line-height: 1.4; white-space: nowrap;
}

/* ---------- Accent modifier classes (set --accent for a component) ---------- */
.accent-orange  { --accent: var(--c-orange); }
.accent-indigo  { --accent: var(--c-indigo); }
.accent-amber   { --accent: var(--c-amber); }
.accent-pink    { --accent: var(--c-pink); }
.accent-emerald { --accent: var(--c-emerald); }
.accent-red     { --accent: var(--c-red); }
.accent-blue    { --accent: var(--c-blue); }
.accent-violet  { --accent: var(--c-violet); }
.accent-green   { --accent: var(--c-green); }
.accent-sky     { --accent: var(--c-sky); }

/* Page colour theme: Admin › Page content › Accent colour. tool_page.php puts "page-accent accent-x" on
   <main>, so inside the page sections the accent replaces the brand orange (labels, FAQ, steps, links,
   About picture, related tiles). Buttons keep the brand orange; header and footer are outside <main>. */
.page-accent {
  --primary: var(--accent);
  --primary-600: color-mix(in srgb, var(--accent) 85%, #000);
  --primary-700: color-mix(in srgb, var(--accent) 70%, #000);
  --primary-50: color-mix(in srgb, var(--accent) 6%, #fff);
  --primary-100: color-mix(in srgb, var(--accent) 14%, #fff);
  --primary-200: color-mix(in srgb, var(--accent) 30%, #fff);
  --primary-ring: color-mix(in srgb, var(--accent) 28%, transparent);
}
.page-accent .btn {
  --primary: #FF4C29; --primary-600: #E63E1C; --primary-700: #C2310F;
  --primary-50: #FFF3EF; --primary-100: #FFE3DA; --primary-200: #FFC6B5; --primary-ring: rgba(255, 76, 41, .28);
}

/* Icon tile used across cards */
.icon-tile {
  flex: none;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  color: var(--accent, var(--primary));
  background: color-mix(in srgb, var(--accent, var(--primary)) 12%, #fff);
  font-size: 20px;
}
.icon-tile--sm { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
