/* ==========================================================================
   DayZero — Landing page design system
   --------------------------------------------------------------------------
   Reference mix:
     · Ode with Anthropic  → warm editorial base, huge whitespace, numbered acts
     · Invisible           → dotted grid, oversized type with muted de-emphasis,
                             mono micro-labels, floating artifact cards
     · Fractional AI       → dark, high-tech opening act with a particle field
   Style: Swiss Modernism 2.0 / exaggerated minimalism, single accent (clay)
   Languages: EN (default) · TR · AR (RTL)
   ========================================================================== */

/* ---------- tokens ---------- */

:root {
  /* light (editorial) */
  --bone: #f7f5f0;
  --bone-2: #f1eee6;
  --paper: #ffffff;
  --line: #e2ddd2;
  --line-strong: #cec7b8;
  --ink: #16130f;
  --ink-2: #443e36;
  --muted: #6b6459; /* 5.2:1 on bone — safe for 11px mono labels */
  --muted-soft: #97907f; /* decorative only */

  /* dark (opening act) */
  --night: #0b0c0e;
  --night-2: #131519;
  --night-line: rgba(255, 255, 255, 0.11);
  --night-text: #f4f2ee;
  --night-muted: #adb3b9; /* 7:1 on night */
  --night-dim: #7f868e;

  /* single accent */
  --clay: #c15f3c;
  --clay-hover: #a94e2e;
  --clay-soft: #f0dcd1;
  --amber: #e08a5b;

  --measure: 1200px;
  --ease: cubic-bezier(0.22, 0.68, 0, 1);
  --dur: 240ms;

  /* clearance under the floating nav pill, used by scroll-margin */
  --nav-space: 92px;
  --tap: 44px; /* minimum comfortable touch target */

  --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--night);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bone);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--clay);
  color: #fff;
}

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

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  /* physical sides on purpose: env() insets are physical, so this stays correct in RTL */
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

@media (min-width: 900px) {
  .shell {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

/* anchor targets must clear the fixed nav pill */
section[id],
.act[id] {
  scroll-margin-top: var(--nav-space);
}

.act {
  position: relative;
  padding-block: clamp(84px, 11vw, 160px);
}

.act-hairline {
  border-top: 1px solid var(--line);
}

.dotted {
  background-image: radial-gradient(circle, #dcd6c9 1.15px, transparent 1.15px);
  background-size: 26px 26px;
  background-position: -13px -13px;
}

/* ---------- type ---------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

p {
  margin: 0;
}

.display {
  font-size: clamp(2.35rem, 5.6vw, 4.4rem);
}

.h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  letter-spacing: -0.02em;
}

.dim {
  color: var(--muted);
}

.dim-dark {
  color: var(--night-dim);
}

.lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.lead--dark {
  color: var(--night-muted);
}

.body-sm {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.body-sm--dark {
  color: var(--night-muted);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.label--act::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--clay);
  flex: none;
}

.label--dark {
  color: var(--night-muted);
}

/* ---------- buttons ---------- */

/* every interactive element: no 300ms tap delay, branded tap feedback */
a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(193, 95, 60, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.btn--cta,
.btn--ink {
  background: var(--ink);
  color: var(--bone);
}

.btn--cta:hover,
.btn--ink:hover {
  background: var(--clay);
}

.btn--light {
  background: var(--bone);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--amber);
  color: #21160f;
}

.btn--ghost-dark {
  border-color: var(--night-line);
  color: var(--night-text);
}

.btn--ghost-dark:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

/* grow the hit area past 44px without moving the underline */
.link-arrow::before {
  content: '';
  position: absolute;
  inset: -9px -8px -8px;
}

.link-arrow:hover {
  color: var(--clay);
  border-color: var(--clay);
}

.link-arrow svg {
  width: 14px;
  height: 14px;
}

.link-arrow--dark {
  color: var(--night-text);
  border-color: rgba(255, 255, 255, 0.28);
}

.link-arrow--dark:hover {
  color: var(--amber);
  border-color: var(--amber);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

.dark a:focus-visible,
.nav--dark a:focus-visible,
.nav--dark button:focus-visible {
  outline-color: var(--amber);
}

/* ---------- nav ---------- */

.nav-wrap {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: auto;
  z-index: 60;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--measure);
  margin-inline: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 245, 240, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav.is-stuck {
  box-shadow: 0 10px 40px -24px rgba(22, 19, 15, 0.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding-inline-start: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bone);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.brand-mark svg {
  width: 13px;
  height: 13px;
}

.brand-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--bone);
  border-radius: 50%;
  background: var(--clay);
  transition: border-color var(--dur) var(--ease);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1060px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.975rem;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current='true'] {
  color: var(--ink);
  background: rgba(22, 19, 15, 0.06);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav .btn {
  padding: 12px 18px;
  font-size: 12px;
}

/* ---------- mobile menu: toggle, panel, backdrop ---------- */

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex: none;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-toggle:hover {
  background: rgba(22, 19, 15, 0.06);
}

.nav-toggle .nav-toggle-x {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-x {
  display: block;
}

.nav-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 70px -34px rgba(22, 19, 15, 0.55);
}

.nav-menu[data-open='false'] {
  display: none;
}

.nav-menu-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 14px;
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 1rem;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-menu-link:hover,
.nav-menu-link[aria-current='true'] {
  background: rgba(22, 19, 15, 0.06);
  color: var(--ink);
}

.nav-menu-cta {
  margin-top: 6px;
  min-height: 50px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(11, 12, 14, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.nav-backdrop[data-open='false'] {
  display: none;
}

/* the panel only exists on narrow screens */
@media (min-width: 1060px) {
  .nav-toggle,
  .nav-menu,
  .nav-backdrop {
    display: none !important;
  }
}

/* dark pill: the panel follows it (main.js mirrors the state on .nav-wrap) */
.nav-wrap.is-dark .nav-toggle {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--night-text);
}

.nav-wrap.is-dark .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-wrap.is-dark .nav-menu {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(16, 18, 22, 0.92);
}

.nav-wrap.is-dark .nav-menu-link {
  color: var(--night-muted);
}

.nav-wrap.is-dark .nav-menu-link:hover,
.nav-wrap.is-dark .nav-menu-link[aria-current='true'] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-wrap.is-dark .nav-menu-cta {
  background: var(--bone);
  color: var(--ink);
}

.nav-wrap.is-dark .nav-menu-cta:hover {
  background: var(--amber);
  color: #21160f;
}

.nav-wrap.is-dark .nav-toggle:focus-visible {
  outline-color: var(--amber);
}

/* language switcher */

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color var(--dur) var(--ease);
}

.lang-btn {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bone);
}

/* dark nav (over the opening act and the closing CTA) */

.nav--dark {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(16, 18, 22, 0.6);
}

.nav--dark .brand {
  color: var(--night-text);
}

.nav--dark .brand-mark {
  background: var(--bone);
  color: var(--night);
}

.nav--dark .brand-dot {
  border-color: #14171b;
}

.nav--dark .nav-link {
  color: var(--night-muted);
}

.nav--dark .nav-link:hover,
.nav--dark .nav-link[aria-current='true'] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav--dark .lang {
  border-color: rgba(255, 255, 255, 0.16);
}

.nav--dark .lang-btn {
  color: var(--night-muted);
}

.nav--dark .lang-btn:hover {
  color: #fff;
}

.nav--dark .lang-btn[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.nav--dark .btn--cta {
  background: var(--bone);
  color: var(--ink);
}

.nav--dark .btn--cta:hover {
  background: var(--amber);
  color: #21160f;
}

/* ==========================================================================
   OPENING ACT — dark, scroll-driven (hero + system layers)
   ========================================================================== */

.dark {
  position: relative;
  background: var(--night);
  color: var(--night-muted);
}

.dark h1,
.dark h2,
.dark h3 {
  color: var(--night-text);
}

.hero-track {
  position: relative;
  height: 380svh;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.hero-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 85% at 58% 50%, transparent 46%, rgba(11, 12, 14, 0.55) 86%),
    linear-gradient(to bottom, rgba(11, 12, 14, 0.88) 0%, transparent 24%, transparent 72%, rgba(11, 12, 14, 0.92) 100%),
    linear-gradient(to right, rgba(11, 12, 14, 0.95) 0%, rgba(11, 12, 14, 0.86) 28%, rgba(11, 12, 14, 0.34) 48%, transparent 64%);
  pointer-events: none;
}

.stage-copy {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  pointer-events: none;
}

.stage-panel {
  grid-area: 1 / 1;
  max-width: 34ch;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.stage-panel[data-active='true'] {
  opacity: 1;
  transform: none;
}

.stage-panel--pitch {
  max-width: 640px;
  pointer-events: auto;
}

.stage-panel h1 {
  margin-top: 24px;
  max-width: 15ch;
  text-shadow: 0 2px 34px rgba(11, 12, 14, 0.9);
}

.stage-panel h2 {
  margin-top: 16px;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  text-shadow: 0 2px 30px rgba(11, 12, 14, 0.95);
}

.stage-panel > p:not(.label):not(.hero-proof) {
  margin-top: 18px;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.6;
  text-shadow: 0 2px 22px rgba(11, 12, 14, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 34px;
  pointer-events: auto;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--night-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.hero-proof b {
  color: var(--night-text);
  font-weight: 600;
}

/* floating artifacts (visible with the pitch panel) */

.stage-artifacts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 420ms var(--ease);
}

.stage-artifacts[data-active='false'] {
  opacity: 0;
}

.artifact {
  position: absolute;
  width: max-content;
  max-width: 300px;
  margin: 0;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: rgba(19, 21, 25, 0.72);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
  box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.9);
  animation: float 9s ease-in-out infinite;
}

.artifact:nth-of-type(2) {
  animation-delay: -3s;
}

.artifact:nth-of-type(3) {
  animation-delay: -6s;
}

.artifact--tr {
  inset-block-start: 16%;
  inset-inline-end: 6%;
}

.artifact--mr {
  inset-block-start: 47%;
  inset-inline-end: 30%;
}

.artifact--br {
  inset-block-end: 16%;
  inset-inline-end: 10%;
}

@media (max-width: 1000px) {
  .stage-artifacts {
    display: none;
  }
}

.artifact .label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
}

.artifact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--night-text);
  font-family: var(--font-mono);
  font-size: 12px;
}

.artifact-row + .artifact-row {
  margin-top: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.dot--ok {
  background: #4ea36b;
}

.dot--wait {
  background: rgba(255, 255, 255, 0.3);
}

.artifact-metric {
  margin-top: 6px;
  color: var(--night-text);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* panel progress — a vertical rail, because the act advances by scrolling down.
   A horizontal row of dashes reads as a swipeable carousel, which this is not. */

.stage-progress {
  position: absolute;
  /* max() of both insets: env() is physical, the rail flips side in RTL */
  inset-inline-end: max(18px, env(safe-area-inset-right, 0px), env(safe-area-inset-left, 0px));
  top: 50%;
  display: grid;
  gap: 7px;
  transform: translateY(-50%);
}

.stage-progress span {
  width: 2px;
  height: 26px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color var(--dur) var(--ease);
}

/* everything already scrolled past stays lit, so the rail reads as depth */
.stage-progress span[data-passed='true'] {
  background: rgba(255, 255, 255, 0.45);
}

.stage-progress span[data-active='true'] {
  background: var(--amber);
}

/* explicit "keep scrolling" affordance, retired once the reader starts */
.scroll-hint {
  position: absolute;
  inset-inline: 0;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--night-dim);
  pointer-events: none;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.scroll-hint svg {
  width: 15px;
  height: 15px;
  animation: nudge 2.1s var(--ease) infinite;
}

.scroll-hint[data-done='true'] {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes nudge {
  0%,
  55%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  30% {
    transform: translateY(5px);
    opacity: 1;
  }
}

[dir='rtl'] .scroll-hint {
  letter-spacing: 0;
  font-family: 'IBM Plex Sans Arabic', var(--font-mono);
  font-size: 12px;
  text-transform: none;
}

/* system layers */

.layers {
  display: grid;
  gap: 1px;
  margin-top: clamp(48px, 6vw, 80px);
  border: 1px solid var(--night-line);
  border-radius: 16px;
  background: var(--night-line);
  overflow: hidden;
}

@media (min-width: 860px) {
  .layers {
    grid-template-columns: repeat(2, 1fr);
  }
}

.layer {
  background: var(--night);
  padding: clamp(26px, 3.2vw, 40px);
  transition: background-color var(--dur) var(--ease);
}

.layer:hover {
  background: var(--night-2);
}

.layer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.layer h3 {
  margin: 18px 0 10px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.layer p {
  color: var(--night-muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.layer p.layer-metric {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--night-line);
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- proof strip ---------- */

.strip {
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
  background: var(--bone-2);
}

.strip-inner {
  display: grid;
  gap: 22px;
  align-items: center;
}

@media (min-width: 900px) {
  .strip-inner {
    grid-template-columns: auto 1fr;
    gap: 40px;
  }
}

.strip-items {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 38px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.strip-items li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.strip-items svg {
  width: 15px;
  height: 15px;
  color: var(--clay);
  flex: none;
}

/* ---------- section heads ---------- */

.act-head {
  display: grid;
  gap: 26px;
  align-items: end;
}

@media (min-width: 900px) {
  .act-head {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 48px;
  }
}

.act-head h2 {
  margin-top: 18px;
}

/* ---------- problem act (light field behind) ---------- */

.problem {
  overflow: hidden;
}

.problem .shell {
  position: relative;
  z-index: 1;
}

.problem-field {
  position: absolute;
  inset-inline-end: -5%;
  inset-block-end: -10%;
  width: min(46%, 560px);
  aspect-ratio: 1 / 1;
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 1000px) {
  .problem-field {
    display: none;
  }
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: 20px;
  margin-top: clamp(44px, 6vw, 72px);
}

@media (min-width: 760px) {
  .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 26px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 26px 60px -40px rgba(22, 19, 15, 0.45);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 22px;
  border: 1px solid var(--clay-soft);
  border-radius: 10px;
  background: #fbf1ea;
  color: var(--clay);
}

.card-icon svg {
  width: 18px;
  height: 18px;
}

.card h3 {
  margin-bottom: 10px;
}

/* ---------- method rows ---------- */

.steps {
  margin: clamp(44px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  gap: 10px 40px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease);
}

@media (min-width: 860px) {
  .step {
    grid-template-columns: 92px 1.05fr 1.35fr auto;
    align-items: baseline;
  }
}

.step:hover {
  background: rgba(255, 255, 255, 0.6);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--clay);
}

.step-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- cases ---------- */

.cases {
  display: grid;
  gap: 20px;
  margin-top: clamp(44px, 6vw, 72px);
}

@media (min-width: 820px) {
  .cases {
    grid-template-columns: repeat(6, 1fr);
  }
  .case--wide {
    grid-column: span 4;
  }
  .case--half,
  .case--third {
    grid-column: span 2;
  }
}

.case {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 26px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.case:hover {
  border-color: var(--line-strong);
  box-shadow: 0 26px 60px -40px rgba(22, 19, 15, 0.45);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag--clay {
  border-color: var(--clay-soft);
  background: #fbf1ea;
  color: var(--clay);
}

.case-headline {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.case-headline em {
  font-style: normal;
  color: var(--clay);
}

.case p {
  margin-top: 14px;
}

.delta {
  display: grid;
  gap: 18px;
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 560px) {
  .delta {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

.delta dt {
  margin-bottom: 7px;
}

.delta dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.delta div:first-child dd {
  color: var(--ink-2);
}

.case-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: auto;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- impact ---------- */

.impact {
  display: grid;
  gap: 1px;
  margin-top: clamp(44px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
  overflow: hidden;
}

@media (min-width: 620px) {
  .impact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .impact {
    grid-template-columns: repeat(4, 1fr);
  }
}

.impact-cell {
  background: var(--paper);
  padding: clamp(24px, 3vw, 34px);
}

.impact-num {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.impact-label {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ---------- trust ---------- */

.trust {
  display: grid;
  gap: 20px;
  margin-top: clamp(44px, 6vw, 72px);
}

@media (min-width: 760px) {
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
}

.trust-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--clay);
}

/* ---------- final CTA ---------- */

.cta {
  padding-block: clamp(84px, 11vw, 150px);
  text-align: center;
}

.cta-label {
  justify-content: center;
}

.cta h2 {
  max-width: 22ch;
  margin-inline: auto;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.cta p {
  max-width: 44ch;
  margin: 22px auto 0;
  color: var(--night-muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--night-line);
  background: var(--night);
  padding-top: 34px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--night-muted);
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--night-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer a:hover {
  color: var(--night-text);
}

.footer-links {
  display: flex;
  gap: 22px;
}

/* ---------- utilities ---------- */

.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:focus {
  position: fixed;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   RTL / Arabic
   ========================================================================== */

[dir='rtl'] body,
[dir='rtl'] .lead,
[dir='rtl'] .body-sm {
  font-family: 'IBM Plex Sans Arabic', var(--font-body);
}

[dir='rtl'] h1,
[dir='rtl'] h2,
[dir='rtl'] h3,
[dir='rtl'] h4,
[dir='rtl'] .case-headline,
[dir='rtl'] .impact-num,
[dir='rtl'] .artifact-metric,
[dir='rtl'] .delta dd,
[dir='rtl'] .strip-items,
[dir='rtl'] .brand,
[dir='rtl'] .layer p.layer-metric {
  font-family: 'IBM Plex Sans Arabic', var(--font-display);
  letter-spacing: 0;
}

/* Arabic script must not be letter-spaced or uppercased */
[dir='rtl'] .label,
[dir='rtl'] .btn,
[dir='rtl'] .tag,
[dir='rtl'] .step-meta,
[dir='rtl'] .case-foot,
[dir='rtl'] .hero-proof,
[dir='rtl'] .artifact-row,
[dir='rtl'] .impact-label {
  font-family: 'IBM Plex Sans Arabic', var(--font-mono);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

[dir='rtl'] .label {
  font-size: 12.5px;
}

[dir='rtl'] .btn {
  font-size: 12.5px;
}

[dir='rtl'] .step-num,
[dir='rtl'] .lang-btn {
  font-family: var(--font-mono);
}

[dir='rtl'] .arrow-inline,
[dir='rtl'] .btn svg {
  transform: scaleX(-1);
}

[dir='rtl'] .stage-veil {
  background:
    radial-gradient(120% 85% at 42% 50%, transparent 46%, rgba(11, 12, 14, 0.55) 86%),
    linear-gradient(to bottom, rgba(11, 12, 14, 0.88) 0%, transparent 24%, transparent 72%, rgba(11, 12, 14, 0.92) 100%),
    linear-gradient(to left, rgba(11, 12, 14, 0.95) 0%, rgba(11, 12, 14, 0.86) 28%, rgba(11, 12, 14, 0.34) 48%, transparent 64%);
}

[dir='rtl'] .brand-dot {
  right: auto;
  left: -2px;
}

/* ==========================================================================
   Narrow screens
   ========================================================================== */

/* everything below the desktop nav breakpoint uses the menu panel */
@media (max-width: 1059px) {
  /* real 44px targets for thumbs (desktop keeps its tighter rhythm) */
  .lang-btn {
    min-height: var(--tap);
    padding-inline: 10px;
  }

}

@media (max-width: 820px) {
  .stage-veil,
  [dir='rtl'] .stage-veil {
    background:
      radial-gradient(95% 55% at 50% 30%, transparent 38%, rgba(11, 12, 14, 0.62) 100%),
      linear-gradient(to bottom, rgba(11, 12, 14, 0.9) 0%, rgba(11, 12, 14, 0.58) 32%, rgba(11, 12, 14, 0.93) 70%, rgba(11, 12, 14, 0.97) 100%);
  }

  /* 340svh meant ~2.4 screens of scrolling through a pinned stage on a phone */
  .hero-track {
    height: 260svh;
  }

  .hero-stage .stage-copy {
    align-content: end;
    /* if the copy is taller than the stage, fall back to the top edge so the
       headline is never the part that gets cut off */
    align-content: safe end;
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .stage-panel h1 {
    max-width: 24ch;
    margin-top: 16px;
    font-size: clamp(1.95rem, 8.2vw, 2.9rem);
  }

  .stage-panel > p:not(.label):not(.hero-proof) {
    margin-top: 14px;
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-proof {
    gap: 6px 18px;
    margin-top: 20px;
    padding-top: 14px;
    font-size: 10.5px;
  }

  /* shorter rail so it never crowds the copy on a phone */
  .stage-progress span {
    height: 20px;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 8px 10px;
  }

  /* the pill keeps brand + language + menu; the CTA lives in the panel,
     which avoids both an unlabelled icon button and an overflowing pill */
  .nav-cta {
    display: none;
  }

  .hero-track {
    height: 240svh;
  }

  .step-meta {
    white-space: normal;
  }
}

/* phones: keep real slack inside the pill so a wider font fallback cannot
   push the menu button past the rounded edge */
@media (max-width: 420px) {
  .nav {
    gap: 12px;
  }

  .nav-end {
    gap: 8px;
  }

  .brand {
    font-size: 1rem;
  }

  .lang-btn {
    padding-inline: 8px;
  }
}

@media (max-width: 380px) {
  .lang-btn {
    padding-inline: 7px;
  }
}

/* very narrow phones: the proof line is the one thing the hero can spare
   (the same numbers are in the impact grid further down) */
@media (max-width: 360px) {
  .stage-panel--pitch .hero-proof {
    display: none;
  }

  /* enough room for the scroll hint to sit under the copy, not on it */
  .hero-stage .stage-copy {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .artifact {
    animation: none;
  }

  .stage-panel,
  .stage-artifacts {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   404
   ========================================================================== */

.notfound {
  display: grid;
  place-content: center;
  min-height: 100svh;
  text-align: center;
}

.notfound-code {
  display: block;
  margin-bottom: 18px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.notfound h1 {
  max-width: 22ch;
  margin-inline: auto;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
}

.notfound p {
  max-width: 44ch;
  margin: 20px auto 0;
  color: var(--night-muted);
}

.notfound .cta-actions {
  margin-top: 34px;
}
