/* ============================================================
   SPOKY — DESIGN TOKENS
   ============================================================ */
:root {
  --bg:        #080c16;
  --surface:   rgba(255,255,255,0.03);
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(45,212,176,0.22);
  --teal:      #2dd4b0;
  --teal-soft: rgba(45,212,176,0.08);
  --white:     #eef2f7;
  --mid:       rgba(238,242,247,0.52);  /* home value; legal overrides below */
  --dim:       rgba(238,242,247,0.28);
  --grid:      rgba(255,255,255,0.025);
  --f:         'Plus Jakarta Sans', sans-serif;
}

/* Legal pages use slightly brighter body copy */
html.page-legal {
  --mid: rgba(238,242,247,0.58);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; }

/* Legal: scrollable */
html         { min-height: 100%; }
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: var(--f);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Home: fixed viewport, overflow hidden.
   100dvh = dynamic viewport height (excludes browser chrome on mobile).
   Falls back to 100% for older browsers. */
html.page-home,
html.page-home body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  min-height: unset;
}

/* ── Grid overlay ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

/* ── Atmospheric glow ──────────────────────────────────────── */
.atmo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  /* Home: three-gradient variant */
  background:
    radial-gradient(ellipse 65% 55% at 6% 5%,   rgba(45,212,176,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 94% 90%,  rgba(79,70,229,0.09)  0%, transparent 55%),
    radial-gradient(ellipse 38% 30% at 55% 100%, rgba(45,212,176,0.05) 0%, transparent 50%);
}

/* Legal pages: subtler two-gradient variant */
html.page-legal .atmo {
  background:
    radial-gradient(ellipse 60% 50% at 5% 0%,   rgba(45,212,176,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 95% 100%, rgba(79,70,229,0.07)  0%, transparent 55%);
}

/* ============================================================
   SHELL  (home-page flex column wrapper)
   ============================================================ */
.shell {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh;
  height: 100dvh; /* dynamic: excludes browser chrome on mobile */
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(8,12,22,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Legal: sticky header with slightly stronger blur tint */
html.page-legal header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,12,22,0.8);
}

.nav-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 48px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Logo ─────────────────────────────────────────────────── */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white);
  font-weight: 700; font-size: 15.5px;
  letter-spacing: -0.2px;
  transition: opacity 0.15s;
}
.logo:hover { opacity: 0.7; }

.logo-img {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* ── Home nav: LinkedIn icon button ───────────────────────── */
.nav-right { display: flex; align-items: center; gap: 12px; }

.li-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: rgba(238,242,247,0.44);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.li-link:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ── Legal nav: Back link ─────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--dim); text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--teal); }

/* ============================================================
   HOME — HERO
   ============================================================ */
main {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  padding: 0 48px;
}

.hero { max-width: 760px; width: 100%; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: rgba(45,212,176,0.55);
  margin-bottom: 28px;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.05s;
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal); flex-shrink: 0;
  box-shadow: 0 0 6px rgba(45,212,176,0.7);
}

.headline {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -2px; color: var(--white);
  margin-bottom: 20px;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.15s;
}
.headline .accent { color: var(--teal); }

.body-copy {
  font-size: 16px; font-weight: 400;
  line-height: 1.75; color: rgba(238,242,247,0.82);
  margin-bottom: 6px;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.24s;
}
.body-copy-2 {
  font-size: 15px; font-weight: 400;
  line-height: 1.72; color: var(--mid);
  margin-bottom: 36px;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.3s;
}

/* ============================================================
   HOME — FLOW DIAGRAM
   ============================================================ */
.flow {
  display: flex; align-items: stretch; justify-content: center;
  margin-bottom: 36px; width: 100%;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.36s;
}

.flow-node {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 14px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: 1;
  transition: border-color 0.2s;
}
.flow-node:hover { border-color: rgba(45,212,176,0.2); }

.flow-node-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(45,212,176,0.09);
  border: 1px solid rgba(45,212,176,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); flex-shrink: 0;
}

.flow-node-label {
  font-size: 12px; font-weight: 600;
  color: var(--white); letter-spacing: -0.1px;
  text-align: center;
}

.flow-node-sub {
  font-size: 10.5px; font-weight: 400;
  color: var(--dim); line-height: 1.5;
  text-align: center; padding: 0 12px;
}

.flow-arrow {
  display: flex; align-items: center;
  flex-shrink: 0; align-self: center;
  position: relative; width: 44px; padding: 0 2px;
}

.flow-arrow-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(45,212,176,0.3), var(--border));
  position: relative; overflow: visible;
}

.flow-arrow-dot {
  position: absolute;
  top: 50%; left: -4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(45,212,176,0.8);
  animation: travel 2.4s ease-in-out infinite;
}
/* nth-of-type counts ALL divs in .flow.
   Div order: node(1) arrow(2) node(3) arrow(4) node(5)
   Arrow 1 = 2nd div → fires first (no delay)
   Arrow 2 = 4th div → fires halfway through the 2.4s cycle → sequential left-to-right flow */
.flow-arrow:nth-of-type(2) .flow-arrow-dot { animation-delay: 0s; }
.flow-arrow:nth-of-type(4) .flow-arrow-dot { animation-delay: 1.2s; }

.flow-arrow-head {
  position: absolute; right: -1px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid rgba(45,212,176,0.3);
}

/* ============================================================
   HOME — CTA BUTTON
   ============================================================ */
.actions {
  display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: rise 0.5s cubic-bezier(.22,1,.36,1) both 0.46s;
}

.btn-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 13px 28px;
  background: var(--teal);
  border-radius: 8px;
  color: #050810;
  font-family: var(--f);
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.1px; text-decoration: none;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(45,212,176,0.25);
}

/* ============================================================
   LEGAL PAGES — PAGE CONTENT
   ============================================================ */
.page-wrap {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto;
  padding: 64px 48px 96px;
}

.page-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 7px;
}
.page-label::before {
  content: '';
  display: block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px rgba(45,212,176,0.7);
  flex-shrink: 0;
}

h1 {
  font-size: 36px; font-weight: 800;
  letter-spacing: -1.2px; line-height: 1.1;
  color: var(--white);
  margin-bottom: 8px;
}

.effective-date {
  font-size: 13px; color: var(--dim);
  margin-bottom: 32px;
}

.intro {
  font-size: 14.5px; line-height: 1.8;
  color: var(--mid); margin-bottom: 48px;
}

/* ── Sections ────────────────────────────────────────────── */
.section {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }

.section h2 {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.2px; color: var(--white);
  margin-bottom: 14px;
}

.section p {
  font-size: 14.5px; font-weight: 400;
  line-height: 1.8; color: var(--mid);
}
.section p + p { margin-top: 10px; }

.section ul {
  list-style: none; margin-top: 12px;
}
.section ul li {
  font-size: 14.5px; line-height: 1.8;
  color: var(--mid);
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.section ul li::before {
  content: '–';
  position: absolute; left: 0;
  color: var(--teal);
}
.section strong { color: rgba(238,242,247,0.8); font-weight: 600; }
.section a { color: var(--teal); text-decoration: none; }
.section a:hover { text-decoration: underline; }

/* ── Terms-page overrides ────────────────────────────────── */
.section-num {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.page-terms .section {
  margin-bottom: 40px;
  padding-bottom: 40px;
}

.page-terms .section h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}

.foot-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 48px; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
}

.foot-l { font-size: 12px; color: rgba(238,242,247,0.44); }

.foot-r { display: flex; align-items: center; gap: 24px; }
.foot-r a {
  font-size: 12px; color: rgba(238,242,247,0.44);
  text-decoration: none; transition: color 0.15s;
}
.foot-r a:hover { color: var(--teal); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes travel {
  0%   { left: -4px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 2px); opacity: 0; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 680 px)
   ============================================================ */
@media (max-width: 680px) {

  /* ── html/body: dvh already set in base; reinforce here ──── */
  html.page-home,
  html.page-home body { height: 100dvh; }

  html.page-home .shell { height: 100dvh; }

  /* ── Nav: reduce height and horizontal padding ───────────── */
  .nav-inner { padding: 0 20px; height: 52px; }

  /* ── Footer: reduce height and padding ──────────────────── */
  .foot-inner { padding: 0 20px; height: 40px; }

  /* ── Main: tighten padding, keep vertical centering ─────── */
  main {
    padding: 0 20px;
    align-items: center;
    justify-content: center;
  }

  .hero { text-align: center; width: 100%; }

  /* ── Eyebrow ──────────────────────────────────────────────── */
  .eyebrow { margin-bottom: 20px; }

  /* ── Headline ─────────────────────────────────────────────── */
  .headline {
    font-size: clamp(28px, 7.5vw, 38px);
    letter-spacing: -1.4px;
    margin-bottom: 22px;
  }

  /* ── Body copy ────────────────────────────────────────────── */
  .body-copy {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 12px;
  }

  .body-copy-2 {
    font-size: 13.5px;
    line-height: 1.65;
    margin-bottom: 30px;
  }

  /* ── Flow diagram ─────────────────────────────────────────── */
  .flow { margin-bottom: 28px; }

  .flow-node { padding: 12px 0; gap: 6px; }

  .flow-node-icon { width: 28px; height: 28px; border-radius: 6px; }
  .flow-node-icon svg { width: 14px; height: 14px; }

  .flow-node-label { font-size: 11px; }

  .flow-node-sub { font-size: 9.5px; padding: 0 6px; line-height: 1.4; }

  .flow-arrow { width: 20px; padding: 0; }

  /* ── CTA ──────────────────────────────────────────────────── */
  .btn-cta { padding: 12px 24px; font-size: 14px; }

  /* ── Legal pages ──────────────────────────────────────────── */
  .page-wrap { padding: 40px 20px 64px; }
}

/* ============================================================
   RESPONSIVE — VERY SHORT PHONES  (height ≤ 680 px, e.g. SE)
   ============================================================ */
@media (max-width: 680px) and (max-height: 680px) {
  .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .headline { font-size: clamp(24px, 7vw, 32px); margin-bottom: 16px; }
  .body-copy { font-size: 12.5px; margin-bottom: 8px; }
  .body-copy-2 { font-size: 12px; margin-bottom: 20px; }
  .flow { margin-bottom: 20px; }
  .flow-node { padding: 8px 0; gap: 4px; }
  .flow-node-icon { width: 24px; height: 24px; }
  .flow-node-label { font-size: 10px; }
  .flow-node-sub { display: none; }
  .btn-cta { padding: 10px 20px; font-size: 13px; }
}
