/* ============================================================
   Gliant Health — shared design system
   ============================================================ */

:root {
  /* surfaces */
  --bg:          #060609;
  --bg-2:        #0a0a12;
  --bg-card:     #0b0b14;
  --bg-elev:     #101019;

  /* lines */
  --line:        rgba(255, 255, 255, 0.075);
  --line-2:      rgba(255, 255, 255, 0.13);

  /* ink */
  --text:        #f3f3fb;
  --dim:         #a3a3bd;
  --mute:        #6b6b83;
  --faint:       rgba(122, 122, 148, 0.55);

  /* brand */
  --blue:        #1800FF;
  --blue-lite:   #6f7cff;
  --blue-glow:   rgba(24, 0, 255, 0.55);
  --red:         #FF0000;
  --red-lite:    #ff6a5c;
  --violet:      #a855f7;

  --radius:      14px;
  --radius-lg:   22px;
  --maxw:        1160px;

  --font:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:  ui-monospace, 'SF Mono', 'JetBrains Mono', 'Menlo', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

::selection { background: rgba(111, 124, 255, 0.32); color: #fff; }

a { color: inherit; }

/* ── Ambient background layers ─────────────────────────────── */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.fx-aurora {
  background:
    radial-gradient(42rem 32rem at 12% -8%,  rgba(24, 0, 255, 0.22), transparent 60%),
    radial-gradient(38rem 30rem at 92% 8%,   rgba(168, 85, 247, 0.13), transparent 62%),
    radial-gradient(46rem 34rem at 78% 108%, rgba(255, 0, 0, 0.11),   transparent 60%);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0)     scale(1); }
  50%  { transform: translate3d(-2%,1.5%,0) scale(1.06); }
  100% { transform: translate3d(1.5%,-1%,0) scale(1.02); }
}

.fx-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 25%, transparent 78%);
}

/* subtle film grain */
.fx-grain {
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Shell ─────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.rel  { position: relative; z-index: 1; }

/* ── Kicker (mono eyebrow) ─────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}
.kicker::before {
  content: '';
  width: 20px; height: 1px;
  background: linear-gradient(90deg, var(--blue-lite), transparent);
}
.kicker.no-line::before { display: none; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 11px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(.2,.7,.3,1), box-shadow 0.25s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s cubic-bezier(.2,.7,.3,1); }

.btn-primary {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, #3521ff, var(--blue));
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 8px 24px -10px var(--blue-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.28) inset, 0 16px 40px -12px var(--blue-glow);
}
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,0.045);
  border-color: var(--line-2);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
}

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  transition: padding 0.35s ease;
}
.nav-bar {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 9px 9px 18px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s;
}
.nav.scrolled .nav-bar {
  background: rgba(9, 9, 16, 0.72);
  border-color: var(--line);
  box-shadow: 0 10px 40px -18px rgba(0,0,0,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
}
.nav-logo img { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--dim);
  font-size: 14px; font-weight: 500;
  padding: 8px 15px; border-radius: 100px;
  transition: color 0.18s, background 0.18s;
}
.nav-links a:not(.nav-cta):hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-cta {
  color: #fff !important;
  background: linear-gradient(180deg, #3521ff, var(--blue));
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 18px -10px var(--blue-glow);
  font-weight: 600 !important;
}
.nav-cta:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 26px -10px var(--blue-glow); }

/* ── Section scaffolding ───────────────────────────────────── */
.section { position: relative; z-index: 1; padding: clamp(72px, 11vw, 128px) 0; }
.section-head { max-width: 640px; }
.section-title {
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 18px 0 0;
}
.lead {
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.75;
  color: var(--dim);
  margin-top: 22px;
}
.body-copy { font-size: 16px; line-height: 1.85; color: var(--dim); }
.body-copy + .body-copy { margin-top: 16px; }

.divider {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

/* ── Card w/ cursor spotlight ──────────────────────────────── */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(111,124,255,0.14), transparent 60%);
  pointer-events: none;
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
/* top hairline highlight */
.card::after {
  content: '';
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}

/* ── Footer ────────────────────────────────────────────────── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-top {
  display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap;
  padding-bottom: 44px; border-bottom: 1px solid var(--line);
}
.footer-brand-col { max-width: 300px; }
.footer-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.footer-brand img { width: 26px; height: 26px; }
.footer-tag { margin-top: 16px; font-size: 14px; line-height: 1.7; color: var(--mute); }
.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mute); margin-bottom: 16px; font-weight: 500; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { text-decoration: none; color: var(--dim); font-size: 14px; transition: color 0.18s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; }
.footer-copy { font-size: 13px; color: var(--faint); }
.footer-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--mute); }
.footer-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-lite); box-shadow: 0 0 10px var(--blue-lite); }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.07s; }
.d2 { transition-delay: 0.14s; }
.d3 { transition-delay: 0.21s; }
.d4 { transition-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Responsive nav ────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
}

/* ============================================================
   Document / legal pages
   ============================================================ */
.doc-shell { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 132px 26px 40px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--mute); font-size: 13px; font-weight: 500; text-decoration: none;
  margin-bottom: 36px; transition: color 0.18s, gap 0.18s;
}
.back-link:hover { color: var(--text); gap: 11px; }

.doc-header { max-width: 760px; }
.doc-header h1 {
  font-size: clamp(34px, 5.5vw, 58px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.04; margin: 16px 0 14px;
}
.doc-eff { font-family: var(--mono); font-size: 13px; color: var(--mute); }

.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; margin-top: 52px; }
.doc-layout.solo { display: block; max-width: 760px; }

/* sticky table of contents */
.toc { position: sticky; top: 108px; }
.toc h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 14px; }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--mute); font-size: 13px; line-height: 1.4; text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
}
.toc a:hover { color: var(--dim); }
.toc a.active { color: var(--text); border-left-color: var(--blue-lite); }

.doc-body { min-width: 0; }
.doc-intro {
  font-size: 17px; line-height: 1.8; color: var(--dim);
  padding-bottom: 40px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.doc-body h2 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  margin: 44px 0 14px; scroll-margin-top: 108px;
}
.doc-body h2:first-of-type { margin-top: 8px; }
.doc-body p { font-size: 15.5px; line-height: 1.85; color: var(--dim); margin-bottom: 15px; }
.doc-body a { color: var(--blue-lite); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; }
.doc-body ul.dash { list-style: none; margin: 0 0 15px; }
.doc-body ul.dash li { position: relative; padding: 6px 0 6px 22px; font-size: 15.5px; line-height: 1.8; color: var(--dim); }
.doc-body ul.dash li::before { content: ''; position: absolute; left: 0; top: 15px; width: 10px; height: 1px; background: var(--blue-lite); }

/* policy index cards */
.policy-cards { display: grid; gap: 14px; margin: 8px 0 40px; }
.policy-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 28px; text-decoration: none;
}
.policy-card .pc-body h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.policy-card .pc-body p { font-size: 13.5px; color: var(--mute); line-height: 1.6; }
.policy-card .pc-arrow { color: var(--mute); flex-shrink: 0; transition: transform 0.22s, color 0.22s; }
.policy-card:hover .pc-arrow { color: var(--text); transform: translateX(4px); }
.contact-note { font-size: 15px; line-height: 1.75; color: var(--dim); }
.contact-note a { color: var(--blue-lite); text-decoration: none; }
.contact-note a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
