/* ==========================================================================
   RGE – Robot és GépEmber Kft.
   Egyetlen, függőség nélküli stíluslap. Rendszerbetűk (nincs webfont-letöltés,
   nincs elrendezés-ugrás), világos és sötét mód, csökkentett mozgás támogatása.
   ========================================================================== */

@layer reset, tokens, base, layout, components, pages, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100dvh; }
  img, svg, video { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  p, h1, h2, h3, h4 { overflow-wrap: break-word; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: light dark;

    --brand: #eab000;
    --brand-strong: #d49f00;
    --on-brand: #15130c;
    --graphite: #373737;

    --bg: #ffffff;
    --bg-alt: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #f1efe9;
    --text: #17181b;
    --text-muted: #5b5d63;
    --border: #e4e2dc;
    --accent-text: #8a6500;
    --focus: #1f6feb;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --success: #067647;

    --dark-bg: #141518;
    --dark-surface: #1d1f23;
    --dark-text: #f3f2ee;
    --dark-muted: #a9abb1;
    --dark-border: #2e3035;

    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

    --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
    --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
    --step-2: clamp(1.35rem, 1.2rem + 0.75vw, 1.8rem);
    --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);
    --step-4: clamp(2.1rem, 1.6rem + 2.5vw, 3.6rem);

    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-s: 0.75rem;
    --space-m: 1rem;
    --space-l: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: clamp(2.5rem, 2rem + 2vw, 3.5rem);
    --space-section: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);

    --radius-s: 8px;
    --radius-m: 14px;
    --radius-l: 22px;
    --shadow-s: 0 1px 2px rgb(20 20 20 / 0.06);
    --shadow-m: 0 10px 30px -12px rgb(20 20 20 / 0.18);

    --container: 1200px;
    --header-h: 72px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #111214;
      --bg-alt: #17181b;
      --surface: #1b1c20;
      --surface-2: #232429;
      --text: #f1f0ec;
      --text-muted: #a8aab0;
      --border: #2c2e33;
      --accent-text: #f2c230;
      --focus: #6ea8fe;
      --danger: #fda29b;
      --danger-bg: #2a1413;
      --success: #75e0a7;
      --shadow-m: 0 10px 30px -12px rgb(0 0 0 / 0.6);
    }
  }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 750; text-wrap: balance; }
  h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
  p { text-wrap: pretty; }

  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
  a:hover { text-decoration-color: var(--brand); }

  :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
  main:focus { outline: none; }

  ::selection { background: var(--brand); color: var(--on-brand); }

  code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
  address { font-style: normal; }
}

@layer layout {
  .container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
  .narrow { max-width: 820px; }
  .container.narrow { width: min(100% - 2.5rem, var(--container)); max-width: none; }
  .container.narrow > * { max-width: 820px; }
  .page-hero--center .container.narrow > * { margin-inline: auto; }
  .narrow-left { max-width: var(--container); }
  .narrow-left > * { max-width: 860px; }

  .section { padding-block: var(--space-section); }
  .section-tight { padding-block: var(--space-2xl); }
  .section-alt { background: var(--bg-alt); }

  .grid { display: grid; gap: var(--space-l); }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

  .split { display: grid; gap: var(--space-2xl); align-items: start; }
  @media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; } }

  .section-head { max-width: 760px; margin-bottom: var(--space-2xl); display: grid; gap: var(--space-s); }
  .section-head p:not(.eyebrow) { color: var(--text-muted); font-size: var(--step-1); }
  .section-head--row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-m); }
  .section-title { margin-bottom: var(--space-xl); }
}

@layer components {
  /* --- Skip link ---------------------------------------------------------- */
  .skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    background: var(--brand); color: var(--on-brand); padding: 0.6rem 1rem; border-radius: var(--radius-s); font-weight: 650;
  }
  .skip-link:focus { top: 1rem; }

  /* --- Icons -------------------------------------------------------------- */
  .icon { width: 1.25em; height: 1.25em; flex: none; }

  /* --- Buttons ------------------------------------------------------------ */
  .btn {
    --_bg: transparent; --_fg: var(--text); --_bd: var(--border);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 44px; padding: 0.65rem 1.2rem; border-radius: 999px;
    background: var(--_bg); color: var(--_fg); border: 1.5px solid var(--_bd);
    font-weight: 650; font-size: var(--step-0); line-height: 1.2; text-decoration: none; white-space: nowrap;
    cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  }
  .btn .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
  .btn:hover .icon { transform: translateX(3px); }
  .btn:active { transform: translateY(1px); }
  .btn-primary { --_bg: var(--brand); --_fg: var(--on-brand); --_bd: var(--brand); }
  .btn-primary:hover { --_bg: var(--brand-strong); --_bd: var(--brand-strong); box-shadow: 0 8px 20px -10px rgb(234 176 0 / 0.8); }
  .btn-ghost:hover { --_bd: var(--text); }
  .btn-sm { min-height: 40px; padding: 0.45rem 1rem; font-size: var(--step--1); }
  .btn-lg { min-height: 52px; padding: 0.85rem 1.5rem; }
  .btn[disabled], .btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

  .text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; color: var(--accent-text); text-decoration: none; }
  .text-link:hover { text-decoration: underline; }
  .text-link .icon { width: 1em; height: 1em; }

  /* Spamvédelem: a látható szövegbe rejtett csalétek, amit ember nem lát,
     a robot viszont beolvas (a JS a valódi mailto:/tel: hivatkozást állítja be). */
  .cloak-x { display: none !important; }

  .link-button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; color: inherit; font-size: inherit; }

  .eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text);
  }
  .eyebrow a { text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
  .eyebrow .icon { width: 1.3em; height: 1.3em; }

  .lead { font-size: var(--step-1); color: var(--text-muted); max-width: 64ch; }

  /* --- Header ------------------------------------------------------------- */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .2s;
  }
  .site-header.is-scrolled { border-bottom-color: var(--border); }
  .header-inner { display: flex; align-items: center; gap: var(--space-l); min-height: var(--header-h); }
  .brand { display: block; flex: none; border-radius: 6px; }
  .brand img { width: auto; height: 42px; }

  .main-nav { margin-inline-start: auto; }
  .main-nav > ul { display: flex; gap: .25rem; align-items: center; }
  .main-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--text); }
  .main-nav > ul > li > a:hover, .main-nav > ul > li > a[aria-current] { background: var(--surface-2); }
  .main-nav > ul > li > a[aria-current]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
  .nav-contact { display: none; }

  .has-sub { position: relative; }
  .sub {
    position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; min-width: 300px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow-m); padding: .5rem;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  }
  .sub::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
  .sub a { border-radius: var(--radius-s); font-weight: 550; }
  .sub a:hover, .sub a[aria-current] { background: var(--surface-2); }
  .sub .icon { color: var(--accent-text); }

  .header-actions { display: flex; align-items: center; gap: var(--space-s); }
  .header-phone { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; white-space: nowrap; font-size: var(--step--1); }
  .header-phone .icon { color: var(--accent-text); }

  .nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; place-items: center; }
  .nav-toggle .icon { width: 22px; height: 22px; grid-area: 1 / 1; }
  .nav-toggle .icon-close { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: block; }

  @media (max-width: 1080px) { .header-phone { display: none; } }

  @media (max-width: 900px) {
    :root { --header-h: 64px; }
    .brand img { height: 36px; }
    .nav-toggle { display: grid; }
    .header-actions { margin-inline-start: auto; }
    .main-nav {
      position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
      background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-m);
      padding: var(--space-m) 1.25rem var(--space-xl);
      display: none;
    }
    .main-nav.is-open { display: block; animation: nav-in .22s var(--ease); }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav > ul > li { border-bottom: 1px solid var(--border); }
    .main-nav a { padding: .9rem .25rem; border-radius: 0; font-size: var(--step-1); }
    .main-nav > ul > li > a:hover, .main-nav > ul > li > a[aria-current] { background: none; }
    .sub { position: static; translate: none; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 .75rem; min-width: 0; background: none; }
    .sub a { font-size: var(--step-0); padding: .55rem .25rem; }
    .nav-contact { display: grid; gap: .25rem; margin-top: var(--space-l); }
    .nav-contact a { font-size: var(--step-0); padding: .5rem .25rem; }
    .nav-contact .icon { color: var(--accent-text); }
  }
  @media (max-width: 420px) { .header-actions .btn-sm { display: none; } }
  @keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } }

  /* --- Breadcrumbs -------------------------------------------------------- */
  .breadcrumbs { padding-top: var(--space-l); font-size: var(--step--1); color: var(--text-muted); }
  .breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; }
  .breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline-start: .35rem; opacity: .5; }
  .breadcrumbs a { text-decoration: none; }
  .breadcrumbs a:hover { text-decoration: underline; color: var(--text); }
  .breadcrumbs [aria-current] { color: var(--text); font-weight: 550; }

  /* --- Cards -------------------------------------------------------------- */
  .card {
    position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
    padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-s);
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  }
  .card p { color: var(--text-muted); }
  .card-title { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
  .card-title a { text-decoration: none; }
  .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .stretched:focus-visible { outline: none; }
  .card:has(.stretched:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .card:has(.stretched):hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--border)); transform: translateY(-3px); box-shadow: var(--shadow-m); }

  .card-icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--accent-text); margin-bottom: var(--space-xs);
  }
  .card-icon .icon { width: 28px; height: 28px; }
  .card-more { margin-top: auto; padding-top: var(--space-s); display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; color: var(--accent-text); font-size: var(--step--1); }
  .card-more .icon { width: 1em; height: 1em; transition: transform .2s var(--ease); }
  .card:hover .card-more .icon { transform: translateX(4px); }

  .ref-card { padding: 0; overflow: hidden; gap: 0; }
  .ref-visual {
    aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
    background:
      radial-gradient(circle at 80% 20%, rgb(234 176 0 / .35), transparent 55%),
      linear-gradient(135deg, #1b1c20, #2c2d31);
    color: var(--brand); position: relative;
  }
  .ref-visual::before {
    content: ""; position: absolute; inset: 0; opacity: .25;
    background-image: linear-gradient(rgb(255 255 255 / .08) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .08) 1px, transparent 1px);
    background-size: 28px 28px;
  }
  .ref-visual img { width: 100%; height: 100%; object-fit: cover; }
  .ref-visual-icon { width: 72px; height: 72px; position: relative; transition: transform .35s var(--ease); }
  .ref-card:hover .ref-visual-icon { transform: scale(1.1) rotate(-4deg); }
  .ref-body { padding: var(--space-l) var(--space-xl) var(--space-xl); display: grid; gap: var(--space-xs); }
  .ref-body .eyebrow { font-size: .75rem; }

  .feature-card { padding: var(--space-l); }
  .feature-check { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
  .value-card .icon { width: 36px; height: 36px; color: var(--accent-text); }

  /* --- Chips / filter ----------------------------------------------------- */
  .chip-list { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
  .chip-list--center { justify-content: center; margin-top: var(--space-l); }
  .chip {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem;
    border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
    font-weight: 600; font-size: var(--step--1); text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s;
  }
  .chip .icon { color: var(--accent-text); }
  .chip:hover { border-color: var(--text); }
  .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
  .chip[aria-pressed="true"] .icon { color: var(--brand); }
  .filter { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-xl); }
  .ref-card.is-hidden { display: none; }

  /* --- Stats -------------------------------------------------------------- */
  .stats { display: flex; flex-wrap: wrap; gap: var(--space-l) var(--space-2xl); }
  .stats div { display: flex; flex-direction: column-reverse; }
  .stats dt { font-size: var(--step--1); color: var(--text-muted); }
  .stats dd { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
  .stats dd small { font-size: var(--step--1); font-weight: 600; letter-spacing: 0; color: var(--text-muted); }
  .stats-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: var(--space-xl); display: grid; grid-template-columns: repeat(2, 1fr); }

  /* --- Features list ------------------------------------------------------ */
  .features { display: grid; gap: var(--space-l); }
  .features li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-m); align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: var(--space-l); }
  .features li > .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--accent-text); }
  .features h3 { font-size: var(--step-0); margin-bottom: .2rem; }
  .features p { color: var(--text-muted); }

  /* --- Steps -------------------------------------------------------------- */
  .steps { display: grid; gap: var(--space-2xl) var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: step; }
  .steps li { counter-increment: step; position: relative; padding-top: var(--space-2xl); border-top: 2px solid var(--border); }
  .steps li::before {
    content: counter(step, decimal-leading-zero); position: absolute; top: -1px; left: 0; translate: 0 -50%;
    background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: var(--step--1);
    width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  }
  .steps h3 { margin-bottom: var(--space-xs); }
  .steps p { color: var(--text-muted); }

  /* --- FAQ ---------------------------------------------------------------- */
  .faq { display: grid; gap: var(--space-s); }
  .faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); transition: border-color .2s; }
  .faq details[open] { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); }
  .faq summary { list-style: none; cursor: pointer; padding: var(--space-l); display: flex; gap: var(--space-m); justify-content: space-between; align-items: center; border-radius: inherit; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary h3 { font-size: var(--step-0); font-weight: 650; letter-spacing: 0; }
  .faq summary::after { content: "+"; flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; font-weight: 500; transition: rotate .2s var(--ease); }
  .faq details[open] summary::after { rotate: 45deg; background: var(--brand); color: var(--on-brand); }
  .faq details p { padding: 0 var(--space-l) var(--space-l); color: var(--text-muted); max-width: 70ch; }

  /* --- CTA ---------------------------------------------------------------- */
  .cta {
    display: grid; gap: var(--space-xl); align-items: center; padding: clamp(2rem, 1.2rem + 4vw, 4rem);
    border-radius: calc(var(--radius-l) + 6px); color: var(--dark-text); position: relative; overflow: hidden; isolation: isolate;
    background: radial-gradient(circle at 100% 0%, rgb(234 176 0 / .38), transparent 45%), var(--dark-bg);
  }
  .cta::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: radial-gradient(rgb(255 255 255 / .12) 1px, transparent 1px); background-size: 22px 22px;
    mask-image: linear-gradient(90deg, transparent, #000);
  }
  @media (min-width: 900px) { .cta { grid-template-columns: 1.3fr 1fr; } }
  .cta h2 { margin-bottom: var(--space-s); }
  .cta p { color: var(--dark-muted); font-size: var(--step-1); }
  .cta-actions { display: grid; gap: var(--space-l); justify-items: start; }
  @media (min-width: 900px) { .cta-actions { justify-items: end; text-align: end; } }
  .cta-contacts { display: grid; gap: .35rem; }
  .cta-contacts a { display: inline-flex; align-items: center; gap: .5rem; color: var(--dark-text); text-decoration: none; font-weight: 600; }
  .cta-contacts a:hover { text-decoration: underline; }
  .cta-contacts .icon { color: var(--brand); }
  @media (min-width: 900px) { .cta-contacts a { justify-content: end; } }

  /* --- Forms -------------------------------------------------------------- */
  .form { gap: var(--space-l); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
  .form-row { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .field { display: grid; gap: .4rem; }
  .field label { font-weight: 650; font-size: var(--step--1); }
  .req { color: var(--danger); }
  .opt { color: var(--text-muted); font-weight: 500; }
  .field input:not([type="checkbox"]), .field select, .field textarea {
    width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: var(--radius-s);
    border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
  }
  .field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
  .field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
  .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-muted); }
  .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 4px rgb(234 176 0 / .28); }
  .field [aria-invalid="true"] { border-color: var(--danger) !important; }
  .field-error { color: var(--danger); font-size: var(--step--1); font-weight: 550; }
  .hint { color: var(--text-muted); font-size: var(--step--1); }
  .field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
  .field-check input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--brand-strong); }
  .field-check label { font-weight: 500; font-size: var(--step-0); }
  .field-check .field-error { grid-column: 2; }
  .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m); }
  .hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .alert { padding: var(--space-m) var(--space-l); border-radius: var(--radius-s); font-weight: 600; }
  .alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }

  /* --- Tables ------------------------------------------------------------- */
  .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-s); }
  table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
  th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
  th { background: var(--surface-2); font-weight: 650; }
  tr:last-child td { border-bottom: 0; }

  /* --- Prose -------------------------------------------------------------- */
  .prose, .prose-wide { display: grid; gap: var(--space-m); }
  .prose { max-width: 75ch; }
  .prose-wide { max-width: 860px; }
  .container.prose-wide { max-width: var(--container); }
  .container.prose-wide > * { max-width: 860px; }
  .prose h2 { font-size: var(--step-2); margin-top: var(--space-l); }
  .prose-wide h2 { font-size: var(--step-2); }
  .prose-wide h2:not(:first-child) { margin-top: var(--space-l); }
  .prose > :first-child { margin-top: 0; }
  .prose p, .prose li, .prose-wide p { color: var(--text-muted); }
  .prose strong { color: var(--text); }
  .prose ul, .prose ol { padding-inline-start: 1.25rem; display: grid; gap: .4rem; }
  .prose a { color: var(--accent-text); }
  .toc { background: var(--surface-2); border-radius: var(--radius-m); padding: var(--space-l); }
  .toc ol { columns: 2 220px; display: block; }
  .toc li { margin-bottom: .3rem; }

  .facts { display: grid; gap: 0; }
  .facts div { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: var(--space-m); padding-block: .7rem; border-bottom: 1px solid var(--border); }
  .facts div:last-child { border-bottom: 0; }
  .facts dt { color: var(--text-muted); font-size: var(--step--1); }
  .facts dd { font-weight: 600; color: var(--text); }
  .facts a { color: var(--accent-text); }

  /* --- Footer ------------------------------------------------------------- */
  .site-footer { background: var(--dark-bg); color: var(--dark-muted); padding-top: var(--space-section); margin-top: var(--space-section); font-size: var(--step--1); }
  .section + .site-footer, .section-alt + .site-footer { margin-top: 0; }
  main:has(> :last-child.section) + .site-footer { margin-top: 0; }
  .footer-grid { display: grid; gap: var(--space-2xl); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding-bottom: var(--space-2xl); }
  @media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 0.8fr 1.3fr; } }
  .footer-brand { display: grid; gap: var(--space-m); justify-items: start; align-content: start; }
  .footer-brand img { height: 44px; width: auto; }
  .footer-title { color: var(--dark-text); font-size: var(--step-0); letter-spacing: 0; margin-bottom: var(--space-m); }
  .site-footer ul { display: grid; gap: .5rem; }
  .site-footer a { color: var(--dark-muted); text-decoration: none; }
  .site-footer a:hover { color: var(--dark-text); text-decoration: underline; }
  .site-footer .btn-primary { color: var(--on-brand); }
  .site-footer .btn-primary:hover { color: var(--on-brand); text-decoration: none; }
  .footer-contact { display: grid; gap: .6rem; }
  .footer-contact strong { color: var(--dark-text); }
  .footer-contact > a, .footer-contact > span { display: flex; gap: .55rem; align-items: start; }
  .footer-contact .icon { color: var(--brand); margin-top: .15rem; }
  .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-m); padding-block: var(--space-l); border-top: 1px solid var(--dark-border); }
  .footer-legal { display: flex !important; flex-wrap: wrap; gap: .5rem 1.25rem !important; }
  .site-footer .link-button { color: var(--dark-muted); text-decoration: none; }
  .site-footer .link-button:hover { color: var(--dark-text); text-decoration: underline; }

  /* --- Consent ------------------------------------------------------------ */
  .consent { position: fixed; inset: auto 1rem 1rem; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
  .consent-inner {
    pointer-events: auto; max-width: 880px; width: 100%; display: grid; gap: var(--space-m); align-items: center;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow-m); padding: var(--space-l);
  }
  @media (min-width: 760px) { .consent-inner { grid-template-columns: 1fr auto; } }
  .consent-title { font-size: var(--step-0); margin-bottom: .25rem; }
  .consent p { color: var(--text-muted); font-size: var(--step--1); }
  .consent p a { color: var(--accent-text); }
  .consent-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
}

@layer pages {
  /* --- Home hero ---------------------------------------------------------- */
  .hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3.5rem, 2rem + 6vw, 7rem);
  }
  .hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px; opacity: .55;
    mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
  }
  .hero::after {
    content: ""; position: absolute; z-index: -1; width: 720px; aspect-ratio: 1; right: -200px; top: -260px; border-radius: 50%;
    background: radial-gradient(circle, rgb(234 176 0 / .28), transparent 65%);
  }
  .hero-grid { display: grid; gap: var(--space-2xl); align-items: center; }
  @media (min-width: 980px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
  .hero-copy { display: grid; gap: var(--space-l); justify-items: start; }
  .hero h1 { max-width: 20ch; font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); }
  .hl { background: linear-gradient(transparent 62%, rgb(234 176 0 / .55) 62%, rgb(234 176 0 / .55) 92%, transparent 92%); padding-inline: .05em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-s); }
  .hero-actions--center { justify-content: center; }
  .hero .stats { margin-top: var(--space-s); padding-top: var(--space-l); border-top: 1px solid var(--border); }

  .hero-visual { justify-self: center; width: min(100%, 480px); }
  .system-map { position: relative; aspect-ratio: 1; }
  .system-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
  .system-lines path { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 7; fill: none; opacity: .75; vector-effect: non-scaling-stroke; animation: dash 18s linear infinite; }
  @keyframes dash { to { stroke-dashoffset: -240; } }
  .node {
    position: absolute; translate: -50% -50%; display: grid; justify-items: center; gap: .35rem; text-align: center;
    width: 30%; padding: .7rem .5rem; border-radius: var(--radius-m);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-m);
    font-size: clamp(.68rem, .6rem + .3vw, .8rem); font-weight: 650; line-height: 1.2;
    animation: float 6s ease-in-out infinite;
  }
  .node .icon { width: 28px; height: 28px; color: var(--accent-text); }
  .node-core { width: 34%; aspect-ratio: 1; left: 50%; top: 50%; border-radius: 50%; padding: 0; place-items: center; background: var(--dark-bg); border: 4px solid var(--brand); animation: none; box-shadow: 0 0 0 12px rgb(234 176 0 / .12), var(--shadow-m); }
  .node-core img { width: 64%; height: auto; }
  .n-top { left: 50%; top: 10%; }
  .n-tr { left: 82.5%; top: 17.5%; animation-delay: -1s; }
  .n-br { left: 82.5%; top: 82.5%; animation-delay: -2s; }
  .n-bottom { left: 50%; top: 90%; animation-delay: -3s; }
  .n-bl { left: 17.5%; top: 82.5%; animation-delay: -4s; }
  .n-tl { left: 17.5%; top: 17.5%; animation-delay: -5s; }
  @keyframes float { 50% { transform: translateY(-6px); } }

  /* --- Subpage hero ------------------------------------------------------- */
  .page-hero { padding-block: var(--space-2xl) var(--space-xl); }
  .page-hero .container { display: grid; gap: var(--space-m); justify-items: start; }
  .page-hero--center { text-align: center; padding-block: var(--space-section); }
  .page-hero--center .container { justify-items: center; }
  .page-hero--center .lead { margin-inline: auto; }
  .page-hero-grid { align-items: center; }
  @media (min-width: 900px) { .page-hero .page-hero-grid { grid-template-columns: 1fr auto; } }
  .page-hero-grid > div { display: grid; gap: var(--space-m); justify-items: start; }
  .page-hero-icon {
    width: clamp(160px, 18vw, 240px); aspect-ratio: 1; border-radius: 32%; display: grid; place-items: center; color: var(--brand);
    background: radial-gradient(circle at 70% 25%, rgb(234 176 0 / .35), transparent 60%), var(--dark-bg);
    box-shadow: var(--shadow-m); rotate: -4deg;
  }
  .page-hero-icon .icon { width: 50%; height: 50%; }
  @media (max-width: 899px) { .page-hero-icon { display: none; } }

  /* --- Reference detail --------------------------------------------------- */
  .case { display: grid; gap: var(--space-2xl); align-items: start; }
  @media (min-width: 960px) { .case { grid-template-columns: 1fr 340px; } }
  .case-image { border-radius: var(--radius-l); width: 100%; }
  .case-aside { position: sticky; top: calc(var(--header-h) + 1rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: var(--space-l); display: grid; gap: var(--space-l); }
  .case-aside .facts div { grid-template-columns: 1fr; gap: .1rem; }
  .aside-cta { display: grid; gap: var(--space-s); justify-items: start; padding-top: var(--space-m); border-top: 1px solid var(--border); }

  /* --- Contact ------------------------------------------------------------ */
  .contact-grid { display: grid; gap: var(--space-2xl); align-items: start; }
  @media (min-width: 960px) { .contact-grid { grid-template-columns: 1.5fr 1fr; } }
  .contact-aside { display: grid; gap: var(--space-l); }
  .contact-list { display: grid; gap: var(--space-l); }
  .contact-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-m); align-items: start; }
  .contact-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); }
  .contact-icon .icon { width: 22px; height: 22px; }
  .contact-list a:not(.text-link) { font-size: var(--step-1); font-weight: 700; text-decoration: none; }
  .contact-list a:not(.text-link):hover { text-decoration: underline; }
  .contact-list address { margin-bottom: .25rem; }
  .label { font-size: var(--step--1); color: var(--text-muted); font-weight: 600; }
  .company-card { padding: var(--space-l); gap: var(--space-xs); }
  .company-card dl div { display: flex; justify-content: space-between; gap: var(--space-m); padding-block: .45rem; border-bottom: 1px solid var(--border); font-size: var(--step--1); }
  .company-card dl div:last-child { border-bottom: 0; }
  .company-card dt { color: var(--text-muted); }
  .company-card dd { font-weight: 600; text-align: end; }

  .success-icon { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); margin-bottom: var(--space-s); }
  .success-icon .icon { width: 40px; height: 40px; }
}

@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}

@media print {
  .site-header, .site-footer, .cta, .consent, .hero-visual, .skip-link { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
