/* ─────────────────────────────────────────
   ZIFFI SHARED SHELL: tokens, base, nav, mobile menu, footer
   Mirrors index.html exactly so subpages match the homepage.
───────────────────────────────────────── */
:root {
  --page-bg: #f8f7f3;
  --surface: #f8f7f3;
  --dark: #0a0a0a;
  --fg: #0a0a0a;
  --fg-sub: #4a4a4a;
  --fg-muted: #737373;
  --fg-faint: #a3a3a3;
  --border: #e5e5e5;
  --border-warm: #e0d9ce;

  --section-bg-blue: #f8f7f3;
  --section-bg-warm: #f8f7f3;

  --blue: #0d6adf;
  --orange: #f5a25f;
  --purple: #7a39fc;
  --green: #1fa971;

  --btn-bg: #171717;
  --btn-fg: #ffffff;

  --f-head: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-nav: 'Manrope', system-ui, sans-serif;
  --f-logo: 'Space Grotesk', system-ui, sans-serif;

  --max-w: 1200px;
  --max-w-copy: 820px;
  --col-x: 80px;
  --col-x-mob: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page-bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── NAV (glass pill, identical to homepage) ── */
.nav {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  z-index: 100;
  border-radius: 100px;

  background: linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.25) 55%, rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(80px) saturate(300%);
  -webkit-backdrop-filter: blur(80px) saturate(300%);

  border: 1px solid rgba(255, 255, 255, 0.45);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-left-color: rgba(255, 255, 255, 0.8);

  box-shadow:
    0 12px 40px rgba(13, 30, 60, 0.07),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(255, 255, 255, 0.35),
    inset 1px 0 1px rgba(255, 255, 255, 0.55);

  transition: all 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  pointer-events: none;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.15;
  mix-blend-mode: overlay;
  z-index: -1;
}

.nav.scrolled {
  top: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.18) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 24px 64px rgba(13, 30, 60, 0.08),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.98);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--fg);
}

.nav-logo .wordmark {
  font-family: var(--f-logo);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-family: var(--f-nav);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 6px 16px;
  border-radius: 100px;
  transition: color 240ms ease;
  position: relative;
  background: transparent;
  z-index: 1;
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 100px;
  transform: scale(0.85);
  opacity: 0;
  z-index: -1;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 240ms ease;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-links a:hover::before {
  transform: scale(1);
  opacity: 1;
}

.nav-links a.active {
  color: var(--fg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 100%);
  color: var(--btn-fg);
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 20px;
  border: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 8px 24px -4px rgba(13, 106, 223, 0.4),
    0 4px 8px -2px rgba(0, 0, 0, 0.4);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--fg);
}

/* ── MOBILE MENU (identical to homepage) ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(64px) saturate(200%);
  -webkit-backdrop-filter: blur(64px) saturate(200%);
  z-index: 200;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 80px 32px 48px;
  gap: 4px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--f-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  padding: 18px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

.mobile-menu a:last-of-type {
  border-bottom: none;
}

.mobile-menu .mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 32px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 500;
  border-radius: 27px;
  margin-top: 24px;
  min-height: 54px;
}

.mobile-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  padding: 10px;
  line-height: 1;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.mobile-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ── PAGE SCAFFOLD for subpages ── */
.page {
  padding: 184px var(--col-x) 96px;
}

.page-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--f-nav);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

/* ── FOOTER (identical to homepage) ── */
.footer {
  position: relative;
  isolation: isolate;
  color: #c9c9cc;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(134, 180, 255, 0.18) 0%, transparent 55%),
    radial-gradient(70% 55% at 100% 100%, rgba(91, 141, 239, 0.20) 0%, transparent 60%),
    radial-gradient(60% 55% at 0% 100%, rgba(124, 140, 255, 0.14) 0%, transparent 60%),
    radial-gradient(40% 30% at 50% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
    linear-gradient(180deg, #0b0c10 0%, #050609 45%, #000000 100%);
  overflow: hidden;
  padding: 96px var(--col-x) 32px;
  font-family: var(--f-body);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 16%),
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.06) 50%, transparent 62%),
    radial-gradient(70% 100% at 0% 0%, rgba(163, 179, 255, 0.10) 0%, transparent 60%),
    radial-gradient(120% 60% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 60%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
  z-index: 0;
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(163, 179, 255, 0.45), rgba(255, 255, 255, 0.55), rgba(91, 141, 255, 0.45), transparent);
  z-index: 1;
  box-shadow: 0 0 24px rgba(124, 140, 255, 0.35);
}

.footer-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
}

.footer-brand .footer-logo {
  font-family: var(--f-logo);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #b8b8bd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-shadow: 0 2px 16px rgba(134, 180, 255, 0.25);
}

.footer-tag {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #8a8a90;
  max-width: 280px;
}

.footer-col h4 {
  position: relative;
  font-family: var(--f-nav);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #b8c4d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 22px;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #86b4ff 0%, rgba(91, 141, 239, 0) 100%);
  box-shadow: 0 0 12px rgba(134, 180, 255, 0.5);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: #9a9aa1;
  transition: color 220ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-block;
}

.footer-col a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  font-size: 13px;
  color: #6e6e75;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.10) 25%, rgba(134, 180, 255, 0.28) 50%, rgba(255, 255, 255, 0.10) 75%, transparent 100%);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #b8b8bd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.5);
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms ease;
}

.footer-social a:hover {
  background: linear-gradient(180deg, rgba(134, 180, 255, 0.22) 0%, rgba(91, 141, 239, 0.10) 100%);
  border-color: rgba(134, 180, 255, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 8px 20px rgba(91, 141, 239, 0.35),
    0 0 0 4px rgba(134, 180, 255, 0.10);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  :root {
    --col-x: var(--col-x-mob);
  }

  .nav {
    top: 12px;
    left: 12px;
    right: 12px;
    padding: 0;
  }

  .nav-inner {
    padding: 0 20px;
    height: 60px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-logo .wordmark {
    font-size: 20px;
  }

  .page {
    padding: 132px var(--col-x-mob) 64px;
  }

  .footer {
    padding: 72px var(--col-x-mob) 28px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px 28px;
    padding-bottom: 48px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
