/* ════════════════════════════════════════════════════════════
   NUDII — shared design system
   Theme: "the descent" — the page darkens from twilight water
   at the top to the abyss at the bottom. Bioluminescent accents.
   ════════════════════════════════════════════════════════════ */

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

:root {
  /* depth palette */
  --twilight:    #0c1c38;   /* top of the water column */
  --mid:         #0a1326;
  --deep:        #060d1c;
  --abyss:       #03060d;   /* bottom of the page */

  --surface:     rgba(16, 32, 61, 0.55);   /* glass card */
  --surface-2:   rgba(20, 40, 76, 0.55);
  --surface-hi:  rgba(34, 64, 112, 0.45);

  /* bioluminescence */
  --lagoon:      #3be8ff;   /* primary */
  --lagoon-deep: #14b8d8;
  --coral:       #ff8a5c;   /* warm secondary — nudibranchs are loud */
  --rose:        #ff6d9d;
  --violet:      #8b5cf6;
  --violet-soft: #b9a4ff;

  --text:        #e9f1fb;
  --muted:       #93accc;
  --faint:       #5e7794;

  --line:        rgba(140, 190, 255, 0.14);
  --line-bright: rgba(59, 232, 255, 0.35);

  --radius:      22px;
  --radius-sm:   14px;

  --font-display: "Fraunces", "New York", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 24px 50px rgba(0, 0, 0, 0.35);
  --glow-lagoon: 0 0 28px rgba(59, 232, 255, 0.25);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  /* the descent: scrolling moves you down the water column */
  background:
    linear-gradient(180deg,
      var(--twilight) 0%,
      var(--mid) 26%,
      var(--deep) 62%,
      var(--abyss) 100%);
  background-color: var(--deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(59, 232, 255, 0.28); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lagoon);
  outline-offset: 3px;
  border-radius: 8px;
}

img { max-width: 100%; }

/* ─── ambient light layer ───────────────────────────────────── */
.ocean-light {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 540px at 82% -10%, rgba(59, 232, 255, 0.10), transparent 65%),
    radial-gradient(900px 600px at -12% 30%, rgba(139, 92, 246, 0.09), transparent 62%),
    radial-gradient(760px 480px at 70% 105%, rgba(255, 109, 157, 0.05), transparent 70%);
}
.ocean-light::before, .ocean-light::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
}
.ocean-light::before {
  width: 420px; height: 420px; top: 8%; right: -6%;
  background: radial-gradient(circle, rgba(59, 232, 255, 0.14), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.ocean-light::after {
  width: 360px; height: 360px; bottom: 10%; left: -8%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.13), transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 70px) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(70px, -50px) scale(0.95); } }

#bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5; }

/* ─── skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 14px; z-index: 1000;
  background: var(--lagoon); color: #03121a; font-weight: 700;
  padding: 10px 18px; border-radius: 50px; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 14px; }

/* ─── floating pill nav ─────────────────────────────────────── */
.nav-wrap {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
  padding: 0 16px;
  display: flex; justify-content: center;
}
nav.pill {
  width: 100%; max-width: 1060px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 12px 9px 16px;
  border-radius: 50px;
  background: rgba(8, 17, 34, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, border-color 0.3s;
}
nav.pill.scrolled { background: rgba(7, 14, 28, 0.88); border-color: rgba(140, 190, 255, 0.2); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text); text-decoration: none;
}
.nav-logo img {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid rgba(59, 232, 255, 0.25);
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 13px; border-radius: 50px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--lagoon); background: rgba(59, 232, 255, 0.07); }
.nav-links a.active { color: var(--lagoon); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 50px;
  background: linear-gradient(120deg, rgba(59, 232, 255, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(59, 232, 255, 0.3);
  font-size: 12.5px; font-weight: 700; color: var(--lagoon); letter-spacing: 0.4px;
  white-space: nowrap;
}
.nav-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lagoon);
  animation: pulse 2.2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--lagoon);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}

.nav-toggle {
  display: none; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(20, 40, 76, 0.5); color: var(--text);
  align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }

.nav-mobile {
  display: none;
  position: fixed; top: 76px; left: 16px; right: 16px; z-index: 99;
  background: rgba(7, 14, 28, 0.96);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-in 0.28s var(--ease-out);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-mobile a {
  display: block; padding: 13px 16px; border-radius: 14px;
  color: var(--text); text-decoration: none; font-size: 16px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-mobile a:hover, .nav-mobile a:active { background: rgba(59, 232, 255, 0.08); color: var(--lagoon); }
@keyframes sheet-in { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ─── buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px;
  background: linear-gradient(120deg, var(--lagoon) 0%, #58b6ff 55%, var(--violet-soft) 120%);
  color: #04121c; font-weight: 700; font-size: 15.5px;
  text-decoration: none; border: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 26px rgba(59, 232, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.18s var(--ease-out), box-shadow 0.25s, filter 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(59, 232, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4); filter: saturate(1.1); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 50px;
  background: rgba(59, 232, 255, 0.05); color: var(--lagoon);
  font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid rgba(59, 232, 255, 0.35);
  transition: background 0.2s, transform 0.18s var(--ease-out), border-color 0.2s;
}
.btn-ghost:hover { background: rgba(59, 232, 255, 0.12); transform: translateY(-2px); border-color: var(--lagoon); }

/* ─── layout primitives ─────────────────────────────────────── */
main { display: block; }
section { padding: 104px 40px; position: relative; }
.container { max-width: 1080px; margin: 0 auto; }
.container-narrow { max-width: 800px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--lagoon); margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1.5px;
  background: linear-gradient(90deg, var(--lagoon), transparent);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 580;
  font-variation-settings: "opsz" 60;
  letter-spacing: -0.5px; line-height: 1.12;
  margin-bottom: 16px;
  text-wrap: balance;
}
.section-title em {
  font-style: italic; font-weight: 480;
  background: linear-gradient(105deg, var(--lagoon) 10%, var(--violet-soft) 60%, var(--rose) 110%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.section-sub {
  font-size: 17px; color: var(--muted); max-width: 580px;
  line-height: 1.75; margin-bottom: 56px;
  text-wrap: pretty;
}
.section-sub a { color: var(--lagoon); text-decoration: none; }
.section-sub a:hover { text-decoration: underline; }

/* depth marker — little annotations as you sink */
.depth-marker {
  display: flex; align-items: center; gap: 12px;
  max-width: 1080px; margin: 0 auto; padding: 0 40px;
  color: var(--faint); font-size: 11.5px; font-weight: 600;
  letter-spacing: 2.6px; text-transform: uppercase;
  user-select: none;
}
.depth-marker::before, .depth-marker::after {
  content: ''; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ─── reveal on scroll ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.34s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.46s; }
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* ─── glass card base ───────────────────────────────────────── */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease-out), border-color 0.25s, box-shadow 0.35s, background 0.25s;
}
.glass::before {
  /* top inner highlight */
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent 5%, rgba(180, 225, 255, 0.22) 50%, transparent 95%);
  pointer-events: none;
}
.glass:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 232, 255, 0.32);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(59, 232, 255, 0.06);
  background: var(--surface-2);
}

/* ─── footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 40px 48px; text-align: center; position: relative;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(59, 232, 255, 0.2); }
.footer-brand span { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.3px; }
.footer-tagline { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.footer-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.footer-chips span {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 7px 14px; border-radius: 50px;
  border: 1px solid var(--line); background: rgba(16, 32, 61, 0.4);
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px;
  list-style: none; margin-bottom: 30px;
}
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--lagoon); }
.footer-note { font-size: 13px; color: var(--faint); line-height: 1.7; max-width: 620px; margin: 0 auto; }

/* ─── inner pages (privacy / support) ───────────────────────── */
.page-main { padding: 150px 40px 100px; }
.page-main h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 48px); font-weight: 580;
  letter-spacing: -0.5px; line-height: 1.15; margin-bottom: 18px;
  text-wrap: balance;
}
.page-main h1 em {
  font-style: italic; font-weight: 480;
  background: linear-gradient(105deg, var(--lagoon) 10%, var(--violet-soft) 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lede { font-size: 17.5px; color: var(--muted); line-height: 1.78; margin-bottom: 44px; max-width: 640px; text-wrap: pretty; }

.policy-body h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; margin: 42px 0 12px; color: var(--lagoon);
  letter-spacing: -0.2px;
}
.policy-body p, .policy-body li { font-size: 15.5px; color: var(--muted); line-height: 1.85; margin-bottom: 9px; }
.policy-body ul { padding-left: 22px; margin-bottom: 10px; }
.policy-body li { margin-bottom: 7px; }
.policy-body a { color: var(--lagoon); text-decoration: none; }
.policy-body a:hover { text-decoration: underline; }
.policy-body strong { color: var(--text); font-weight: 600; }
.policy-updated {
  font-size: 13px; color: var(--muted); margin-bottom: 30px;
  padding: 8px 16px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 32, 61, 0.5); border: 1px solid var(--line); border-radius: 50px;
}
.policy-updated::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lagoon); }

/* ─── FAQ ───────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 14px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 2px 24px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s, background 0.25s;
}
.faq-item:hover { border-color: rgba(59, 232, 255, 0.25); }
.faq-item[open] { border-color: var(--line-bright); background: var(--surface-2); }
.faq-item summary {
  list-style: none; cursor: pointer;
  font-size: 16px; font-weight: 650;
  padding: 19px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex-shrink: 0;
  width: 12px; height: 12px;
  border-right: 2px solid var(--lagoon); border-bottom: 2px solid var(--lagoon);
  transform: rotate(45deg); transform-origin: center;
  transition: transform 0.3s var(--ease-out);
  margin: -4px 6px 0 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq-body { padding-bottom: 22px; }
.faq-body, .faq-body p { font-size: 14.5px; color: var(--muted); line-height: 1.8; }
.faq-body p { margin-bottom: 8px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--text); }
.faq-body a { color: var(--lagoon); text-decoration: none; }
.faq-body a:hover { text-decoration: underline; }

/* ─── support cards ─────────────────────────────────────────── */
.support-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.support-card { padding: 28px 24px; }
.support-card .sc-icon {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(59, 232, 255, 0.14), rgba(139, 92, 246, 0.14));
  border: 1px solid var(--line);
  margin-bottom: 16px; font-size: 20px;
}
.support-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.support-card p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.support-card p:last-of-type { margin-bottom: 16px; }
.support-card a.sc-link { color: var(--lagoon); text-decoration: none; font-weight: 600; font-size: 14px; }
.support-card a.sc-link:hover { text-decoration: underline; }

/* ─── responsive ────────────────────────────────────────────── */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-badge { display: none; }
  .nav-toggle { display: inline-flex; }
  section { padding: 72px 22px; }
  .depth-marker { padding: 0 22px; }
  .page-main { padding: 124px 22px 72px; }
  footer { padding: 48px 22px 40px; }
}

/* ─── reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #bubbles { display: none; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}
