/* GLiPra site design system, shared across all glipra.com pages.
   Brand: "Crystalline Vigilance", deep violet, clinical warmth, pharmaceutical precision.
   Palette mirrors the app tokens (src/theme/tokens.ts). */

:root {
  --violet:        #6d28d9;   /* primary */
  --violet-dark:   #5b21b6;   /* primary-dark / logo mark */
  --violet-tint:   rgba(109, 40, 217, 0.08);
  --blue:          #2563eb;
  --teal:          #0284c7;
  --hero-gradient: linear-gradient(135deg, #6d28d9 0%, #2563eb 55%, #0284c7 100%);

  --ink:           #140e26;   /* deep violet-black for dark sections + footer */
  --ink-soft:      #2a2342;

  --cream:         #faf8f5;   /* warm background */
  --surface:       #ffffff;
  --surface-2:     #fbfaf8;
  --border:        #e8e4dd;   /* warm border */
  --border-strong: #d9d3c9;

  --text:          #111827;
  --text-2:        #6b7280;
  --text-3:        #9ca3af;
  --on-dark:       #ffffff;
  --on-dark-2:     #b9b2c9;

  --success:       #059669;
  --amber:         #d97706;
  --error:         #ef4444;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --max-w:     1120px;
  --shadow-sm: 0 1px 3px rgba(40, 22, 90, 0.06);
  --shadow:    0 8px 28px rgba(40, 22, 90, 0.08);
  --shadow-lg: 0 20px 50px rgba(40, 22, 90, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Logo lockup (clean inline mark + wordmark) ─────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
h1, h2, h3 { font-family: var(--font-heading); }

.logo-word {
  font-size: 1.22rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  font-family: var(--font-heading);
}
.logo-word .dot { color: var(--violet); }
.logo--on-dark .logo-word { color: var(--on-dark); }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 245, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font); font-size: 1rem; font-weight: 700; line-height: 1.1;
  text-align: center; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 4px 14px rgba(109,40,217,0.30); }
.btn-primary:hover { background: var(--violet-dark); box-shadow: 0 8px 22px rgba(109,40,217,0.40); }
.btn-gradient { background: var(--hero-gradient); color: #fff; box-shadow: 0 8px 22px rgba(109,40,217,0.34); }
.btn-gradient:hover { box-shadow: 0 12px 30px rgba(109,40,217,0.45); }
.btn-ghost { background: transparent; color: var(--violet); border: 1.5px solid var(--violet); }
.btn-ghost:hover { background: var(--violet-tint); }
.btn-full { width: 100%; }

/* ── Shared section helpers ─────────────────────────────────────────────── */
.section-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 12px;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--violet-tint); border: 1px solid rgba(109,40,217,0.22);
  color: var(--violet-dark); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 6px 14px; border-radius: 999px;
}
.pro-chip {
  display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; background: var(--hero-gradient); color: #fff;
  border-radius: 5px; padding: 2px 6px; margin-left: 6px; vertical-align: middle;
}

/* ── Medical banner (top disclaimer strip) ──────────────────────────────── */
.medical-banner {
  background: #f5f0ff; border-bottom: 1px solid #e4d9fb; text-align: center;
  padding: 9px 20px; font-size: 0.8rem; color: var(--violet-dark); line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--on-dark-2); padding: 44px 0 36px; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.footer-disclaimer { font-size: 0.8rem; color: #8a83a0; max-width: 560px; line-height: 1.6; }
.footer-links { display: flex; gap: 18px 24px; flex-wrap: wrap; justify-content: center; font-size: 0.84rem; }
.footer-links a { color: var(--on-dark-2); transition: color .15s; padding: 8px 4px; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy { font-size: 0.78rem; color: #6f688a; }

/* ── Legal / doc page layout (.doc-wrap) ────────────────────────────────── */
.doc-wrap { max-width: 760px; margin: 0 auto; padding: 56px 22px 80px; }
.doc-wrap h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text); margin-bottom: 6px; }
.doc-wrap .meta { font-size: 0.85rem; color: var(--text-2); margin-bottom: 6px; }
.doc-wrap h2 {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin: 38px 0 10px; padding-top: 18px; border-top: 1px solid var(--border);
}
.doc-wrap h3 { font-size: 0.98rem; font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.doc-wrap p { margin-bottom: 14px; font-size: 0.975rem; }
.doc-wrap ul, .doc-wrap ol { padding-left: 22px; margin-bottom: 14px; }
.doc-wrap li { font-size: 0.975rem; margin-bottom: 6px; }
.doc-wrap table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem; }
.doc-wrap th { background: var(--surface-2); color: var(--text); font-weight: 700; text-align: left; padding: 9px 12px; border: 1px solid var(--border); }
.doc-wrap td { padding: 9px 12px; border: 1px solid var(--border); vertical-align: top; }
.intro-box {
  background: var(--surface); border-left: 3px solid var(--violet);
  padding: 15px 18px; margin: 22px 0 36px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem; box-shadow: var(--shadow-sm);
}
.intro-box a, .contact-box a { font-weight: 700; }
.contact-box {
  background: var(--violet-tint); border: 1px solid rgba(109,40,217,0.18);
  padding: 16px 18px; margin: 22px 0 36px; border-radius: var(--radius); font-size: 0.975rem;
}
.rights-box { background: #f5f0ff; border: 1px solid #e4d9fb; border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.rights-box h3 { margin-top: 0; color: var(--violet-dark); }
.warn-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; font-size: 0.95rem; color: #991b1b; }
.emergency-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; font-size: 0.95rem; color: #92400e; }
.draft-banner {
  background: #fffbeb; border-bottom: 2px solid var(--amber); text-align: center;
  padding: 12px 20px; font-size: 0.85rem; font-weight: 700; color: #92400e;
}
.attorney-note { margin-top: 44px; font-size: 0.8rem; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 16px; }

/* ── Form validation states ─────────────────────────────────────────────── */
.input-error { border-color: var(--error) !important; }
.form-error { font-size: 0.8rem; color: var(--error); margin-top: 6px; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ── Founder pricing card ───────────────────────────────────────────────── */
.price-badge--amber { background: linear-gradient(135deg, var(--amber), #b45309); }
.founder-card { border: 2px solid var(--amber); }
.founder-card .price-badge { background: linear-gradient(135deg, var(--amber), #b45309); }

/* ── Anchor offset for sticky nav ───────────────────────────────────────── */
section[id] { scroll-margin-top: 80px; }

/* ── Keyboard focus visibility ──────────────────────────────────────────── */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--violet); outline-offset: 2px;
}

/* ── Desktop nav anchor links ───────────────────────────────────────────── */
.nav-links { display: none; gap: 26px; }
.nav-links a { color: var(--text-2); font-size: 0.9rem; font-weight: 600; transition: color .15s; }
.nav-links a:hover { color: var(--violet); text-decoration: none; }
@media (min-width: 760px) { .nav-links { display: flex; align-items: center; } }

/* ── Scroll-reveal (gated behind .reveal-on, set by JS only when motion is OK) */
.reveal-on .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on .reveal.in { opacity: 1; transform: none; }

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