/* ─────────────────────────────────────────────────────────────
   GenREY shared site styles
   Tokens, reset, body, nav, footer, buttons, typography
   ───────────────────────────────────────────────────────────── */

:root {
  --bg:           oklch(0.985 0.006 110);
  --bg-elevated:  oklch(0.965 0.008 105);
  --bg-deep:      oklch(0.942 0.012 102);
  --line:         color-mix(in oklch, oklch(0.560 0.028 138) 22%, transparent);
  --line-soft:    color-mix(in oklch, oklch(0.560 0.028 138) 11%, transparent);
  --ink:          oklch(0.18 0.025 230);
  --ink-soft:     oklch(0.34 0.030 225);
  --ink-mute:     oklch(0.50 0.025 220);
  --ink-faint:    oklch(0.66 0.020 215);
  --accent:       oklch(0.48 0.14 142);
  --accent-dim:   oklch(0.38 0.12 142);
  --accent-glow:  color-mix(in oklch, oklch(0.55 0.15 142) 22%, transparent);
  --sovereign:    oklch(0.30 0.08 240);
  --teal:         oklch(0.42 0.08 200);

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.19, 1, 0.22, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 640ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
sup.tm-mark {
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.05em;
  vertical-align: super;
  line-height: 0;
  opacity: 0.9;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklch, var(--accent) 22%, transparent); color: var(--ink); }

html, body {
  background:
    radial-gradient(circle at 12% 0%, oklch(0.94 0.07 130 / 0.55) 0%, transparent 38%),
    radial-gradient(circle at 96% 8%, oklch(0.94 0.05 198 / 0.55) 0%, transparent 30%),
    radial-gradient(circle at 50% 110%, oklch(0.94 0.10 100 / 0.45) 0%, transparent 42%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "cv02";
  overflow-x: clip;
}

/* ── NAV ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 100;
  padding: 22px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t-base) var(--ease-out-quart),
              backdrop-filter var(--t-base) var(--ease-out-quart),
              border-color var(--t-base) var(--ease-out-quart);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom-color: var(--line-soft);
}
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 44px; }
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out-quart);
}
.nav__links a:hover,
.nav__links a.is-current { color: var(--ink); }
.nav__links a.is-current { color: var(--accent); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: oklch(0.98 0.006 110);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  transition: background var(--t-fast) var(--ease-out-quart),
              transform var(--t-fast) var(--ease-out-quart),
              box-shadow var(--t-base) var(--ease-out-quart);
}
.btn-pill:hover {
  background: oklch(0.42 0.14 142);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px color-mix(in oklch, var(--accent) 38%, transparent);
}
.btn-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: oklch(0.98 0.006 110);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  transition: background var(--t-fast) var(--ease-out-quart),
              transform var(--t-fast) var(--ease-out-quart),
              box-shadow var(--t-base) var(--ease-out-quart);
}
.btn-large:hover {
  background: oklch(0.42 0.14 142);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px color-mix(in oklch, var(--accent) 42%, transparent);
}
.btn-large svg { width: 17px; height: 17px; transition: transform var(--t-fast) var(--ease-out-quart); }
.btn-large:hover svg { transform: translateX(4px); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ink-faint);
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border-radius: 999px;
  background: transparent;
  transition: border-color var(--t-fast) var(--ease-out-quart),
              color var(--t-fast) var(--ease-out-quart),
              transform var(--t-fast) var(--ease-out-quart),
              box-shadow var(--t-base) var(--ease-out-quart);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px color-mix(in oklch, var(--accent) 20%, transparent);
}
.btn-outline svg { width: 17px; height: 17px; transition: transform var(--t-fast) var(--ease-out-quart); }
.btn-outline:hover svg { transform: translateX(4px); }

/* ── SECTION BASE ────────────────────────────────── */
section { padding: 128px 52px; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
}
.section-heading {
  font-size: clamp(1.9rem, 3.2vw + 0.3rem, 3.2rem);
  font-weight: 260;
  letter-spacing: -0.032em;
  line-height: 1.08;
  color: var(--ink);
}
.section-heading em {
  font-style: italic;
  font-weight: 250;
  color: var(--accent);
}

/* ── REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow) var(--ease-out-expo),
              transform var(--t-slow) var(--ease-out-expo);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 80ms; }
.reveal--d2 { transition-delay: 160ms; }
.reveal--d3 { transition-delay: 240ms; }
.reveal--d4 { transition-delay: 320ms; }
.reveal--d5 { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
}

/* ── PAGE HERO (shared shell for sub-pages) ──────── */
.page-hero {
  position: relative;
  padding: 200px 52px 96px;
  overflow: hidden;
}
.page-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}
.page-hero__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.page-hero__headline {
  font-size: clamp(2.4rem, 4vw + 0.3rem, 4.2rem);
  font-weight: 250;
  line-height: 1.05;
  letter-spacing: -0.038em;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 22ch;
}
.page-hero__headline em {
  font-style: italic;
  font-weight: 240;
  color: var(--accent);
}
.page-hero__lead {
  font-size: clamp(1rem, 1.2vw + 0.2rem, 1.18rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 58ch;
  font-weight: 400;
}

/* ── FOOTER ─────────────────────────────────────── */
footer {
  padding: clamp(40px, 5vw, 64px) clamp(28px, 5vw, 64px) 0;
  background: oklch(0.18 0.028 220);
  color: oklch(1 0 0 / 0.90);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 0% 0%, oklch(0.55 0.15 142 / 0.18) 0%, transparent 60%),
    radial-gradient(60% 60% at 100% 100%, oklch(0.72 0.10 198 / 0.14) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding-bottom: 48px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.footer-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.footer-doctrine {
  font-weight: 280;
  font-size: clamp(0.9rem, 1vw + 0.2rem, 1.05rem);
  line-height: 1.55;
  max-width: 30ch;
  color: oklch(1 0 0 / 0.55);
}
.footer-doctrine em { color: oklch(0.84 0.14 135); font-style: italic; }
.footer-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: oklch(0.84 0.14 135);
  border: 1px solid oklch(0.84 0.14 135 / 0.35);
  border-radius: 99px;
  padding: 8px 18px;
  transition: background var(--t-fast) var(--ease-out-quart),
              border-color var(--t-fast) var(--ease-out-quart);
}
.footer-cta-link:hover {
  background: oklch(0.84 0.14 135 / 0.10);
  border-color: oklch(0.84 0.14 135 / 0.65);
}
.footer-cta-link svg { width: 12px; height: 12px; flex-shrink: 0; }
.footer-nav-group { display: flex; gap: 64px; }
.footer-col-block { display: flex; flex-direction: column; gap: 16px; }
.footer-col-pill {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.40);
  margin-bottom: 4px;
}
.footer-col-block a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: oklch(1 0 0 / 0.60);
  transition: color var(--t-fast) var(--ease-out-quart);
}
.footer-col-block a:hover { color: oklch(0.84 0.14 135); }
.footer-col-block a svg { width: 11px; height: 11px; opacity: 0.55; flex-shrink: 0; }
.footer-inbox { display: flex; flex-direction: column; gap: 3px; }
.footer-inbox-label {
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: oklch(1 0 0 / 0.28);
}
.footer-socials { display: flex; gap: 10px; margin-top: 4px; }
.footer-social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid oklch(1 0 0 / 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(1 0 0 / 0.65);
  transition: border-color var(--t-fast) var(--ease-out-quart),
              color var(--t-fast) var(--ease-out-quart);
}
.footer-social-btn:hover { border-color: oklch(0.84 0.14 135 / 0.65); color: oklch(0.84 0.14 135); }
.footer-social-btn svg { width: 15px; height: 15px; }
.footer-wordmark { display: block; width: 100%; margin-top: 8px; pointer-events: none; user-select: none; }
.footer-wordmark img { display: block; width: 100%; height: auto; opacity: 0.18; object-fit: contain; }
.footer-legal {
  padding: 20px 0;
  border-top: 1px solid oklch(1 0 0 / 0.10);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.76rem;
  color: oklch(1 0 0 / 0.32);
  position: relative;
  z-index: 1;
}
.footer-legal a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: oklch(1 0 0 / 0.32);
  transition: color var(--t-fast) var(--ease-out-quart);
}
.footer-legal a:hover { color: oklch(1 0 0 / 0.70); }
.footer-legal a svg { width: 11px; height: 11px; flex-shrink: 0; }
.footer-legal-links { display: flex; gap: 28px; }

/* ── HAMBURGER ───────────────────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.28s var(--ease-out-expo), opacity 0.18s;
  transform-origin: center;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE DRAWER ───────────────────────────────── */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100svh;
  background: var(--bg);
  border-left: 1px solid var(--line-soft);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 88px 32px 52px;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease-out-expo);
  overflow-y: auto;
  will-change: transform;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mobile-drawer__nav a {
  font-size: 1.05rem;
  font-weight: 480;
  color: var(--ink-mute);
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--t-fast) var(--ease-out-quart);
  display: block;
}
.mobile-drawer__nav a:first-child { border-top: 1px solid var(--line-soft); }
.mobile-drawer__nav a:hover,
.mobile-drawer__nav a.is-current { color: var(--accent); }
.mobile-drawer__cta {
  margin-top: 32px;
  width: 100%;
  justify-content: center;
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0.08 0 0 / 0.52);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-overlay.is-open { opacity: 1; pointer-events: all; }
body.drawer-open { overflow: hidden; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 960px) {
  .nav { padding: 18px 28px; }
  .nav__links { display: none; }
  .nav__logo img { height: 28px; }
  .nav > .btn-pill { display: none; }
  .nav__hamburger { display: flex; }
  section { padding: 88px 28px; }
  .page-hero { padding: 140px 28px 72px; }
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-nav-group { flex-wrap: wrap; gap: 40px; }
}
@media (max-width: 560px) {
  .footer-legal { flex-direction: column; gap: 8px; }
}
