/* ==========================================================================
   FORGYEN — Navbar + Hero prototype
   Structure: 1 Tokens · 2 Base · 3 Utilities · 4 Buttons & links
              5 Header · 6 Hero · 7 Diagnostic visual · 8 Motion · 9 Responsive
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root {
  /* Core brand palette (locked) */
  --fg-navy-950: #0B1320;
  --fg-navy-800: #1B2436;
  --fg-steel-blue: #284A63;
  --fg-copper: #B87333;
  --fg-gold: #D4AF37;
  --fg-white: #FFFFFF;

  /* Derived interface values (built from the palette, not new brand colours) */
  --fg-hero-ivory: #F9F4EF;                 /* web surface per Visual Blueprint */
  --fg-ivory-soft: #FCF9F6;
  --fg-copper-600: #A4632B;                 /* copper fill with ≥4.5:1 white text */
  --fg-copper-700: #8E5424;                 /* hover / pressed */
  --fg-text: var(--fg-navy-950);
  --fg-text-muted: #4A5468;                 /* navy-800 tint, ~7:1 on ivory */
  --fg-line: rgba(11, 19, 32, 0.1);
  --fg-line-soft: rgba(11, 19, 32, 0.06);
  --fg-focus: var(--fg-steel-blue);

  /* Typography */
  --fg-font-en: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --fg-font-ar: "IBM Plex Sans Arabic", system-ui, Arial, sans-serif;
  --fg-fs-h1: clamp(2.75rem, 1.2rem + 2.75vw, 4.5rem);     /* 44 @tablet · 59 @1440 · 72 @1920 */
  --fg-fs-lead: clamp(1.0625rem, 0.9rem + 0.42vw, 1.25rem); /* 17 → 20 */
  --fg-fs-nav: 0.9375rem;
  --fg-fs-btn: 1rem;

  /* Layout (8px system) */
  --fg-container: 1280px;
  --fg-gutter: clamp(20px, 4.5vw, 64px);
  --fg-header-h: 80px;
  --fg-radius-sm: 10px;
  --fg-radius-md: 14px;

  /* Motion */
  --fg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fg-dur-micro: 200ms;
  --fg-dur-std: 320ms;
}

/* 2. Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--fg-font-en);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-text);
  background: var(--fg-hero-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

/* 3. Utilities ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--fg-container) + 2 * var(--fg-gutter));
  margin-inline: auto;
  padding-inline: var(--fg-gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--fg-navy-950);
  color: var(--fg-white);
  border-radius: var(--fg-radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* 4. Buttons & links ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--fg-radius-sm);
  font: 600 var(--fg-fs-btn)/1.2 var(--fg-font-en);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fg-dur-micro) var(--fg-ease),
              box-shadow var(--fg-dur-micro) var(--fg-ease);
}

.btn__arrow,
.text-link__arrow {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--fg-dur-micro) var(--fg-ease);
}

.btn--primary {
  background: var(--fg-copper-600);
  color: var(--fg-white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
              0 6px 16px -10px rgba(126, 74, 31, 0.55);
}
.btn--primary:hover { background: var(--fg-copper-700); }
.btn--primary:active { background: #7D4A1F; }
.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow { transform: translateX(4px); }

/* Navbar CTA: ivory field, fine copper border, navy text, copper arrow dot */
.btn--outline {
  gap: 14px;
  min-height: 46px;
  padding: 0 6px 0 18px;
  background: rgba(255, 252, 248, 0.82);
  color: var(--fg-navy-950);
  border: 1px solid rgba(184, 115, 51, 0.55);
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: background-color var(--fg-dur-micro) var(--fg-ease),
              border-color var(--fg-dur-micro) var(--fg-ease);
}
.btn--outline:hover {
  background: #FFFFFF;
  border-color: var(--fg-copper);
}
.btn__dot {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fg-copper-600);
  color: var(--fg-white);
  transition: background-color var(--fg-dur-micro) var(--fg-ease);
}
.btn__dot .btn__arrow { width: 15px; height: 15px; stroke-width: 1.9; }
.btn--outline:hover .btn__dot { background: var(--fg-copper-700); }
.btn--outline:hover .btn__arrow,
.btn--outline:focus-visible .btn__arrow { transform: translateX(2px); }

.btn--large {
  min-height: 60px;
  padding: 0 32px;
  border-radius: 12px;
}

/* Secondary action: text link with a copper micro-line that resolves on hover */
.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--fg-navy-950);
  font: 600 var(--fg-fs-btn)/1.2 var(--fg-font-en);
  text-decoration: none;
}
.text-link__label {
  position: relative;
  padding-block: 6px;
}
.text-link__label::before,
.text-link__label::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  height: 1px;
}
.text-link__label::before {
  width: 100%;
  background: var(--fg-line);
}
.text-link__label::after {
  width: 36%;
  height: 2px;
  bottom: -0.5px;
  background: var(--fg-copper);
  transition: width 260ms var(--fg-ease);
}
.text-link:hover .text-link__label::after,
.text-link:focus-visible .text-link__label::after { width: 100%; }
.text-link__arrow { color: var(--fg-copper); }
.text-link:hover .text-link__arrow,
.text-link:focus-visible .text-link__arrow { transform: translateX(4px); }

/* 5. Header -------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color var(--fg-dur-std) var(--fg-ease),
              border-color var(--fg-dur-std) var(--fg-ease),
              box-shadow var(--fg-dur-std) var(--fg-ease);
}
.site-header.is-scrolled {
  background: rgba(249, 244, 239, 0.88);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom-color: var(--fg-line-soft);
  box-shadow: 0 8px 24px -22px rgba(11, 19, 32, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--fg-header-h);
}

/* Official horizontal lockup (transparent, trimmed to the artwork). */
.site-logo {
  flex: none;
  display: block;
  line-height: 0;
  border-radius: 6px;
}
.site-logo__img {
  width: auto;
  height: 58px;
}

.site-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.primary-nav { margin-inline: auto; }
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg-navy-800);
  font-size: var(--fg-fs-nav);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--fg-dur-micro) var(--fg-ease);
}
.primary-nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 8px;
  height: 1.5px;
  background: var(--fg-copper);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--fg-dur-micro) var(--fg-ease);
}
.primary-nav__link:hover { color: var(--fg-navy-950); }
.primary-nav__link:hover::after,
.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-menu__actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--fg-line);
}
.lang-switch__link {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 40px;
  color: var(--fg-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--fg-dur-micro) var(--fg-ease);
}
.lang-switch__link:hover { color: var(--fg-copper-600); }
.lang-switch__link[aria-current="true"] {
  color: var(--fg-navy-950);
  font-weight: 700;
}
.lang-switch__divider {
  width: 1px;
  height: 14px;
  background: var(--fg-line);
}

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--fg-line);
  border-radius: var(--fg-radius-sm);
  background: rgba(255, 255, 255, 0.55);
  color: var(--fg-navy-950);
  cursor: pointer;
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 12px;
  margin: auto;
}
.nav-toggle__bars span {
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--fg-dur-std) var(--fg-ease), top var(--fg-dur-std) var(--fg-ease);
}
.nav-toggle__bars span:first-child { top: 1px; }
.nav-toggle__bars span:last-child { top: 9px; width: 70%; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { top: 5px; width: 100%; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: rotate(-45deg); }

/* 6. Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: min(100svh, 940px);
  padding-top: calc(var(--fg-header-h) + clamp(40px, 6vh, 72px));
  padding-bottom: clamp(112px, 14vh, 160px);
  background:
    radial-gradient(42% 46% at 74% 48%, rgba(184, 115, 51, 0.13), transparent 72%),
    radial-gradient(38% 44% at 100% 4%, rgba(40, 74, 99, 0.09), transparent 70%),
    radial-gradient(34% 40% at 0% 96%, rgba(40, 74, 99, 0.05), transparent 72%),
    linear-gradient(180deg, #FBF7F3 0%, var(--fg-hero-ivory) 60%);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__arcs {
  width: 100%;
  height: 100%;
  max-width: none;
  fill: none;
  stroke-width: 1;
}
.hero__arcs path:nth-child(1) { stroke: rgba(40, 74, 99, 0.12); }
.hero__arcs path:nth-child(2) { stroke: rgba(184, 115, 51, 0.16); }
.hero__arcs path:nth-child(3) { stroke: rgba(184, 115, 51, 0.12); }
.hero__arcs path:nth-child(4) { stroke: rgba(11, 19, 32, 0.05); }
.hero__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(150px, 20vw, 380px);
  height: 100%;
  max-width: none;
}

.hero__inner {
  display: grid;
  /* text column hugs the 3-line headline; the visual takes the rest */
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 2.5vw, 40px);
}

.hero__content { position: relative; z-index: 1; }

/* Eyebrow — capsule with a diagnostic node instead of a decorative dash */
.hero__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 32px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--fg-navy-800);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}
.signal-marker {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F0CFAE, var(--fg-copper) 55%, #8E5424);
}
.signal-marker::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(184, 115, 51, 0.35);
}

.hero__title {
  margin: 0;
  font-size: var(--fg-fs-h1);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.032em;
  color: var(--fg-navy-950);
  text-wrap: balance;
}
.hero__line { display: block; white-space: nowrap; }
.hero__accent { color: var(--fg-copper); }

.hero__lead {
  max-width: 33rem;
  margin: 28px 0 0;
  color: var(--fg-text-muted);
  font-size: var(--fg-fs-lead);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 44px;
  margin-top: 40px;
}

.hero__horizon {
  position: absolute;
  inset: auto 0 0 0;
  z-index: -1;
  height: 120px;
  pointer-events: none;
}
.hero__horizon svg {
  width: 100%;
  height: 100%;
  max-width: none;
}
.hero__horizon-fill { fill: var(--fg-ivory-soft); opacity: 0.85; }
.hero__horizon-line { fill: none; stroke: rgba(184, 115, 51, 0.22); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* Quiet vertical lead-in toward the next section */
.hero__lead-in {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, rgba(184, 115, 51, 0), rgba(184, 115, 51, 0.6));
}
.hero__lead-in::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--fg-copper);
  border-radius: 50%;
  background: var(--fg-ivory-soft);
  transform: translateX(-50%);
}

/* 7. Diagnostic visual --------------------------------------------------- */
.hero__visual {
  position: relative;
  margin: 0;
  /* the system bleeds past the viewport edge (its faint right-hand tail is
     cropped, as in the approved mockup) so the core composition can scale up */
  width: calc((100% + max(var(--fg-gutter), (100vw - var(--fg-container)) / 2)) * 1.13);
  max-width: 1080px;
  margin-inline-start: -2%;
}

.diagnostic {
  position: relative;
  aspect-ratio: 800 / 620;
  container-type: inline-size;
  --ns: 1.08;                    /* module scale; raised on small screens */
}
.diagnostic__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* construction */
.dg-construction { fill: none; stroke: rgba(11, 19, 32, 0.075); stroke-width: 0.8; }
.dg-construction .dg-faint { stroke: rgba(11, 19, 32, 0.045); }
.dg-construction .dg-copper { stroke: rgba(184, 115, 51, 0.22); }
.dg-construction .dg-glass { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.2; }
.dg-construction .dg-dotted { stroke: rgba(184, 115, 51, 0.28); stroke-dasharray: 1 7; stroke-linecap: round; stroke-width: 1.3; }
.dg-tri { fill: rgba(184, 115, 51, 0.75); stroke: none; }
.dg-tri--steel { fill: rgba(40, 74, 99, 0.35); }

/* layout variants inside the one SVG (desktop/tablet vs phone composition) */
.dg-only-mobile { display: none; }

/* strands */
.dg-strand { stroke-dasharray: 1; stroke-dashoffset: 0; }

/* beads */
.dg-bead-shadow { fill: rgba(60, 35, 15, 0.16); filter: blur(2px); }
.dg-bead-spec { fill: rgba(255, 255, 255, 0.75); }
.dg-fine { fill: rgba(40, 74, 99, 0.4); }

/* direction */
.dg-output__glow { fill: none; stroke: rgba(233, 165, 108, 0.55); stroke-width: 9; stroke-linecap: round; }
.dg-output__path { fill: none; stroke: url(#g-arrow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dg-output__core { fill: none; stroke: rgba(255, 246, 236, 0.85); stroke-width: 0.9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dg-output__head { fill: url(#g-arrowhead); }
.dg-output__head-glow { fill: rgba(233, 165, 108, 0.6); }
.dg-output__head-edge { fill: none; stroke: rgba(255, 240, 225, 0.85); stroke-width: 1; stroke-linecap: round; }

/* core */
.dg-core__pulse { fill: none; stroke: var(--fg-copper); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* signal modules: SVG body (material) + HTML content (icon + real text) */
.dg-node__body { transform-box: fill-box; transform-origin: center; transform: scale(var(--ns)); }
.dg-node__halo { fill: rgba(255, 255, 255, 0.07); stroke: rgba(255, 255, 255, 0.5); stroke-width: 0.6; }
.dg-node__glint { fill: none; stroke: rgba(255, 255, 255, 0.95); stroke-width: 1.1; stroke-linecap: round; }
.dg-node__under { fill: none; stroke: rgba(201, 133, 72, 0.3); stroke-width: 0.9; stroke-linecap: round; }

.signal {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(0.7cqi * var(--ns));
  color: var(--fg-navy-950);
  text-align: center;
  pointer-events: none;
}
.signal__icon {
  width: calc(4.5cqi * var(--ns));
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.signal--navy .signal__icon { color: var(--fg-navy-800); }
.signal--copper .signal__icon { color: var(--fg-copper); }
.signal__icon .fill { fill: currentColor; stroke: none; }
.signal__label {
  font-size: max(10px, calc(1.95cqi * var(--ns)));
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.diagnostic__label {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% 0;
  color: var(--fg-navy-950);
  font-size: max(13px, 2.6cqi);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* 8. Motion -------------------------------------------------------------- */
@keyframes fg-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fg-node-in {
  from { opacity: 0; scale: 0.92; }
  to   { opacity: 1; scale: 1; }
}
.dg-node { transform-box: fill-box; transform-origin: center; }
@keyframes fg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fg-pulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.3); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header { animation: fg-fade 500ms var(--fg-ease) both; }

  .hero__eyebrow { animation: fg-rise 640ms var(--fg-ease) 150ms both; }
  .hero__title   { animation: fg-rise 700ms var(--fg-ease) 230ms both; }
  .hero__lead    { animation: fg-rise 700ms var(--fg-ease) 330ms both; }
  .hero__actions { animation: fg-rise 700ms var(--fg-ease) 420ms both; }

  .dg-atmo,
  .dg-construction { animation: fg-fade 1000ms var(--fg-ease) 150ms both; }
  .dg-node,
  .signal        { animation: fg-node-in 560ms var(--fg-ease) calc(480ms + var(--i) * 90ms) both; }
  .dg-strand     { animation: fg-draw 900ms var(--fg-ease) var(--d, 600ms) both; }
  .dg-beads      { animation: fg-fade 600ms var(--fg-ease) 1100ms both; }
  .dg-core       { animation: fg-fade 520ms var(--fg-ease) 800ms both; }
  .dg-beam       { animation: fg-fade 700ms var(--fg-ease) 1250ms both; }
  .diagnostic__label { animation: fg-fade 500ms var(--fg-ease) 1000ms both; }
  .dg-core__pulse { animation: fg-pulse 1200ms cubic-bezier(0.2, 0.7, 0.3, 1) 1300ms 1 both; }
  .dg-output__path,
  .dg-output__core { animation: fg-draw 640ms var(--fg-ease) 1450ms both; }
  .dg-strand-glow { animation: fg-fade 900ms var(--fg-ease) 1200ms both; }
  .dg-output__glow { animation: fg-fade 700ms var(--fg-ease) 1700ms both; }
  .dg-output__head,
  .dg-output__head-glow,
  .dg-output__head-edge { animation: fg-fade 300ms var(--fg-ease) 1950ms both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 9. Responsive ---------------------------------------------------------- */

/* Laptop: tighten the nav before it collides */
@media (max-width: 1240px) {
  .site-header__inner,
  .site-menu { gap: 24px; }
  .site-menu__actions { gap: 20px; }
  .lang-switch { padding-inline-start: 16px; }
}

/* Below 1100px the full nav no longer fits beside logo + CTA → menu panel */
@media (max-width: 1099px) {
  :root { --fg-header-h: 72px; }

  .site-logo__img { height: 48px; }
  .nav-toggle { display: inline-grid; place-items: center; }

  .site-menu {
    position: absolute;
    top: calc(var(--fg-header-h) - 4px);
    inset-inline: var(--fg-gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: var(--fg-ivory-soft);
    border: 1px solid var(--fg-line);
    border-radius: var(--fg-radius-md);
    box-shadow: 0 24px 48px -28px rgba(11, 19, 32, 0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--fg-dur-std) var(--fg-ease),
                transform var(--fg-dur-std) var(--fg-ease),
                visibility 0s linear var(--fg-dur-std);
  }
  .site-header.is-open .site-menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .site-header.is-open {
    background: rgba(249, 244, 239, 0.96);
    border-bottom-color: var(--fg-line-soft);
  }

  .primary-nav { margin: 0; }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__list li + li { border-top: 1px solid var(--fg-line-soft); }
  .primary-nav__link {
    display: flex;
    min-height: 56px;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--fg-navy-950);
  }
  .primary-nav__link::after { bottom: 12px; inset-inline-end: auto; width: 24px; }

  .site-menu__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 16px;
  }
  .site-menu__actions .btn { min-height: 54px; }
  .lang-switch {
    justify-content: center;
    padding: 0;
    border: 0;
  }
  .lang-switch__link { min-width: 48px; min-height: 44px; }
}

/* Tablet & below: stack copy above a simplified visual */
@media (max-width: 1099px) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--fg-header-h) + 48px);
    padding-bottom: 136px;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }
  .hero__content { max-width: 720px; }
  .hero__visual {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }
  .diagnostic { --ns: 1.12; }
}

/* Mobile */
@media (max-width: 599px) {
  :root { --fg-gutter: 20px; --fg-header-h: 68px; }

  .site-logo { padding-block: 1px; }   /* 44px tap target */
  .site-logo__img { height: 42px; }

  .hero { padding-top: calc(var(--fg-header-h) + 24px); padding-bottom: 104px; }

  /* Mobile reading order without duplicating content:
     eyebrow -> headline -> diagnosis visual -> supporting copy -> actions */
  .hero__inner { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero__content { display: contents; }
  .hero__eyebrow { order: 1; align-self: flex-start; }
  .hero__title   { order: 2; }
  .hero__visual  { order: 3; margin: 16px 0 20px; }
  .hero__lead    { order: 4; }
  .hero__actions { order: 5; }

  .hero__eyebrow {
    margin-bottom: 18px;
    padding: 7px 14px 7px 12px;
    gap: 12px;
    font-size: min(0.8125rem, 3.35vw);   /* stays on one line down to 360px */
    white-space: nowrap;
  }

  .hero__title {
    font-size: min(2.5rem, 9.6vw);                        /* 36px @375 · 37.5px @390 */
    line-height: 1.06;
    letter-spacing: -0.034em;
  }
  .hero__line { display: inline; white-space: normal; }
  .hero__line::after { content: " "; }
  .hero__accent { display: block; }
  .hero__accent::after { content: none; }

  .hero__lead { margin-top: 8px; font-size: 1.0625rem; line-height: 1.6; max-width: 34ch; }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 24px;
  }
  .btn--large { width: 100%; min-height: 56px; }
  .text-link { align-self: center; }

  /* Phone composition: all five signals in a ring around the diagnosis.
     The 800-unit artwork is widened so its x 50..750 band fills the column;
     the outer 50 units fall into the gutters (atmosphere only). */
  .dg-only-desktop { display: none; }
  .dg-only-mobile { display: inline; }
  .diagnostic {
    --ns: 1;
    width: calc(100% * 800 / 700);
    margin-inline-start: calc(-100% * 50 / 700);
  }
  .signal { left: var(--mx); top: var(--my); gap: 3px; }
  .signal__icon { width: 5.3cqi; }
  .signal__label { font-size: max(11px, 2.9cqi); letter-spacing: 0.01em; }
  .diagnostic__label { top: var(--my); font-size: max(14px, 3.5cqi); }
  .dg-core__asset,
  .dg-core__pulse { transform-box: fill-box; transform-origin: center; scale: 1.25; }
  .hero__ribbon { display: none; }   /* would sit behind the copy on phones */

  .hero__lead-in { height: 44px; }
}
