/* =========================================================
   Win Alpha Technologies — Global Stylesheet
   Design system: tokens → base → layout → components → pages
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette — light */
  --bg:            #ffffff;
  --bg-alt:        #f6f7fb;
  --bg-inset:      #f0f2f8;
  --surface:       #ffffff;
  --surface-2:     #fbfcfe;
  --border:        #e4e7f0;
  --border-strong: #d3d8e6;

  --text:          #0a1020;
  --text-soft:     #414c63;
  --text-muted:    #6b7689;

  --accent:        #2f4bff;
  --accent-hover:  #2036d8;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(47, 75, 255, 0.08);
  --accent-line:   rgba(47, 75, 255, 0.22);
  --accent-2:      #12b8c8;

  --grid-line:     rgba(10, 16, 32, 0.045);
  --glow-1:        rgba(47, 75, 255, 0.12);
  --glow-2:        rgba(18, 184, 200, 0.10);

  --shadow-sm: 0 1px 2px rgba(10, 16, 32, 0.04), 0 1px 3px rgba(10, 16, 32, 0.05);
  --shadow-md: 0 8px 24px -12px rgba(10, 16, 32, 0.16), 0 2px 8px -4px rgba(10, 16, 32, 0.06);
  --shadow-lg: 0 32px 64px -32px rgba(10, 16, 32, 0.28), 0 8px 24px -16px rgba(10, 16, 32, 0.10);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Rhythm */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 9vw, 132px);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 72px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:            #06090f;
  --bg-alt:        #0a0e17;
  --bg-inset:      #0d121d;
  --surface:       #0d121d;
  --surface-2:     #101625;
  --border:        #1c2333;
  --border-strong: #2a3346;

  --text:          #eef1f8;
  --text-soft:     #b7c0d2;
  --text-muted:    #8b95a9;

  --accent:        #7b93ff;
  --accent-hover:  #93a7ff;
  --accent-ink:    #05080f;
  --accent-soft:   rgba(123, 147, 255, 0.12);
  --accent-line:   rgba(123, 147, 255, 0.26);
  --accent-2:      #35d6e4;

  --grid-line:     rgba(255, 255, 255, 0.045);
  --glow-1:        rgba(80, 110, 255, 0.20);
  --glow-2:        rgba(30, 190, 210, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.85);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.35rem + 3.9vw, 4.1rem); letter-spacing: -0.033em; line-height: 1.06; }
h2 { font-size: clamp(1.85rem, 1.25rem + 2.3vw, 2.85rem); letter-spacing: -0.028em; }
h3 { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.28rem); }

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}
a:hover { color: var(--accent-hover); }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p {
  margin-top: 18px;
  color: var(--text-soft);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.12rem);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; color: var(--accent-ink); }

/* ---------- 4. Shared atoms ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.label {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.accent-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 0.99rem + 0.34vw, 1.25rem);
  line-height: 1.68;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -12px var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  box-shadow: 0 16px 30px -14px var(--accent);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.btn--light {
  background: #ffffff;
  color: #0a1020;
}
.btn--light:hover { background: #eef1f8; color: #0a1020; }

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
.btn--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- 5. Brand mark ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-2) 130%);
  box-shadow: 0 6px 16px -8px var(--accent);
  color: #fff;
}
.brand__mark svg { width: 18px; height: 18px; }

.brand__name { font-size: 1rem; line-height: 1.2; }
.brand__name span { display: block; color: var(--text-muted); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  background: var(--bg); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.nav__links {
  display: none;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  padding: 9px 14px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav__links a:hover { background: var(--bg-inset); color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__cta { display: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--bg-inset); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile drawer */
.mobile-nav {
  display: grid;
  grid-template-rows: 0fr;
  border-top: 1px solid transparent;
  background: var(--bg);
  transition: grid-template-rows 0.35s var(--ease), border-color 0.35s var(--ease);
}
.mobile-nav[data-open="true"] {
  grid-template-rows: 1fr;
  border-top-color: var(--border);
}
.mobile-nav__inner { overflow: hidden; }
.mobile-nav ul { padding: 10px var(--gutter) 6px; }
.mobile-nav__inner > .container { padding-bottom: 24px; }
.mobile-nav li + li { border-top: 1px solid var(--border); }
.mobile-nav a {
  display: block;
  padding: 15px 2px;
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 500;
}
.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] { color: var(--text); }
.mobile-nav .btn { width: 100%; margin-top: 18px; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 8vw, 112px) clamp(72px, 9vw, 128px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 0%, #000 30%, transparent 78%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  top: -32%;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 38% 42%, var(--glow-1), transparent 58%),
    radial-gradient(circle at 66% 55%, var(--glow-2), transparent 55%);
  filter: blur(10px);
}

.hero__grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}

.hero__copy { max-width: 640px; }
.hero__copy .lead { margin-top: 24px; max-width: 560px; }
.hero__copy .btn-row { margin-top: 38px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero__meta li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hero__meta svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* Hero visual — abstract system diagram */
.hero__visual { position: relative; }

.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.panel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.panel__dot:first-child { background: var(--accent); }
.panel__title {
  margin-left: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.panel__body { position: relative; padding: clamp(20px, 3vw, 30px); }

.diagram { width: 100%; height: auto; color: var(--accent); }
.diagram .d-line {
  stroke: var(--accent-line);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5 5;
  animation: dash 3.5s linear infinite;
}
.diagram .d-node {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.diagram .d-node--active { stroke: var(--accent); }
.diagram .d-core {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.diagram .d-text {
  fill: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}
.diagram .d-text--core { fill: var(--text); font-weight: 600; }
.diagram .d-pulse { fill: var(--accent); }

@keyframes dash { to { stroke-dashoffset: -20; } }

.panel__foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 clamp(20px, 3vw, 30px) clamp(20px, 3vw, 30px);
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* ---------- 8. Who we are ---------- */
.about__grid {
  display: grid;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
.about__copy > * + * { margin-top: 20px; }
.about__copy p { color: var(--text-soft); font-size: 1.03rem; }
.about__copy h2 { margin-bottom: 8px; }

.pillars {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--border);
  overflow: hidden;
}
.pillars li {
  padding: 24px 26px;
  background: var(--surface);
}
.pillars h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}
.pillars h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.pillars p {
  margin-top: 8px;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- 9. Cards ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  padding: clamp(26px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card__icon svg { width: 21px; height: 21px; }

.card__index {
  position: absolute;
  top: 24px;
  right: 26px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.55;
}

/* Value cards — top rule accent */
.card--value {
  padding-top: 30px;
}
.card--value::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(26px, 3vw, 34px);
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.35s var(--ease);
}
.card--value:hover::before { width: 64px; }

/* ---------- 10. Approach steps ---------- */
.steps {
  position: relative;
  display: grid;
  gap: 34px;
}
.steps::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 27px;
  width: 1px;
  height: calc(100% - 60px);
  background: linear-gradient(180deg, var(--accent-line), transparent);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  align-items: start;
}
.step__num {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.step h3 { margin-bottom: 8px; padding-top: 12px; }
.step p { color: var(--text-muted); font-size: 0.98rem; max-width: 46ch; }

/* ---------- 11. Closing CTA ---------- */
.cta {
  position: relative;
  padding: clamp(48px, 6vw, 88px) clamp(26px, 5vw, 72px);
  border-radius: var(--r-xl);
  background: linear-gradient(155deg, #0d1426 0%, #070b16 55%, #0a1230 100%);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 72%);
}
.cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -55%;
  left: 50%;
  width: min(760px, 110%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(80, 110, 255, 0.35), transparent 62%);
  filter: blur(20px);
}
.cta .eyebrow {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.75);
}
.cta h2 { color: #ffffff; }
.cta p {
  max-width: 620px;
  margin: 20px auto 0;
  color: rgba(233, 238, 250, 0.76);
  font-size: clamp(1rem, 0.96rem + 0.26vw, 1.14rem);
}
.cta .btn-row { justify-content: center; margin-top: 36px; }

.cta__contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cta__contact li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
}
.cta__contact svg { width: 16px; height: 16px; flex: none; color: rgba(255, 255, 255, 0.5); }
.cta__contact a { color: rgba(233, 238, 250, 0.82); }
.cta__contact a:hover { color: #ffffff; }

/* ---------- 12. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: clamp(48px, 6vw, 72px) 32px;
}
.footer__top {
  display: grid;
  gap: 36px;
  padding-bottom: 36px;
}
.footer__about { max-width: 360px; }
.footer__about p {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.footer__contact {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.footer__contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}
.footer__contact svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.footer__contact a { color: var(--text-soft); word-break: break-word; }
.footer__contact a:hover { color: var(--text); }

.footer__nav h4 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer__nav li + li { margin-top: 11px; }
.footer__nav a { color: var(--text-muted); font-size: 0.93rem; }
.footer__nav a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- 13. Legal pages ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 7vw, 92px) clamp(36px, 4vw, 52px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 0%, #000, transparent 75%);
}
.page-hero h1 { font-size: clamp(2.05rem, 1.5rem + 2.3vw, 3.1rem); }
.page-hero p { margin-top: 18px; max-width: 60ch; color: var(--text-soft); }

.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.legal-layout {
  display: grid;
  gap: clamp(36px, 5vw, 56px);
  padding-block: clamp(48px, 6vw, 76px);
  align-items: start;
}

.toc {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 22px 24px;
}
.toc h2 {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc li + li { margin-top: 2px; }
.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}
.toc a:hover { background: var(--bg-inset); color: var(--text); }
.toc a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.legal-body { max-width: 72ch; }
.legal-body section + section { margin-top: 44px; }
.legal-body h2 {
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  scroll-margin-top: calc(var(--header-h) + 28px);
}
.legal-body h3 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: 1.02rem;
}
.legal-body p { color: var(--text-soft); }
.legal-body p + p { margin-top: 14px; }
.legal-body ul {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.legal-body ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
}
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.legal-body strong { color: var(--text); font-weight: 600; }

.notice {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--bg-alt);
}
.notice p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- 14. Motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 15. Breakpoints ---------- */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .mobile-nav { display: none; }

  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .about__grid { grid-template-columns: 1.1fr 0.9fr; }
  .pillars { grid-template-columns: 1fr; }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .steps::before {
    top: 27px;
    left: 27px;
    width: calc(100% - 54px);
    height: 1px;
    background: linear-gradient(90deg, var(--accent-line), var(--accent-line) 72%, transparent);
  }
  .step {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .step h3 { padding-top: 22px; }

  .footer__top {
    grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
    gap: 48px;
  }

  .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: calc(var(--header-h) + 24px); }
}

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