/* ================================================================
   LineRefine Marketing Site — Production styles
   Plain HTML + Tailwind CDN handoff version

   Sections:
   1. Design tokens (color + type + spacing + radius)
   2. Base + typography
   3. Layout primitives (container, section, grid)
   4. Buttons + pills
   5. Nav + footer
   6. Cards
   7. Device frames (iPad / phone)
   8. Pillar illustrations (used in pillar rows)
   9. Mock product screens (recreates real app UI)
   ================================================================ */

/* ─── 1. Design tokens ─────────────────────────────────────────── */
:root {
  /* Brand palette — from LineRefine design system */
  --lr-bg:              #F5F7FB;
  --lr-bg-alt:          #E2E8F5;
  --lr-cornflower:      #7E9AC8;
  --lr-primary:         #3A5FA0;
  --lr-primary-dark:    #2A4880;
  --lr-navy-mid:        #2E4470;
  --lr-navy:            #1A2E55;
  --lr-peach-light:     #F7DDD4;
  --lr-peach:           #EDAB96;
  --lr-peach-dark:      #C8805E;

  /* Warm marketing-site tones (extend brand palette) */
  --lr-cream:           #FAF5F1;
  --lr-cream-deep:      #F1E7DE;
  --lr-cream-dust:      #E8D8CB;
  --lr-shell:           #FBE9DF;
  --lr-rose:            #E8B6A2;
  --lr-ink:             #1A2E55;
  --lr-ink-soft:        #4A597A;

  /* Neutrals */
  --lr-neutral-50:    #F8F9FC;
  --lr-neutral-100:   #EEF1F8;
  --lr-neutral-200:   #D8E0EF;
  --lr-neutral-300:   #BDC9E0;
  --lr-neutral-400:   #96A8C4;
  --lr-neutral-500:   #6E84A0;
  --lr-neutral-600:   #516079;
  --lr-neutral-700:   #364155;
  --lr-neutral-800:   #222C3C;
  --lr-neutral-900:   #121824;

  /* Status */
  --lr-success:       #3A8C68;

  /* Type stacks — load Google Fonts in each page <head> */
  --font-sans:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif:   'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --r-2xl: 2rem;
  --r-pill: 9999px;

  /* Shadows */
  --shadow-sm:     0 1px 2px 0 rgb(26 46 85 / 0.05);
  --shadow-md:     0 8px 24px -8px rgb(26 46 85 / 0.10), 0 2px 4px -1px rgb(26 46 85 / 0.04);
  --shadow-lg:     0 24px 48px -16px rgb(26 46 85 / 0.18), 0 4px 12px -4px rgb(26 46 85 / 0.06);
  --shadow-device: 0 40px 80px -24px rgb(26 46 85 / 0.25), 0 12px 24px -8px rgb(26 46 85 / 0.10);
}

/* ─── 2. Base + typography ─────────────────────────────────────── */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--lr-ink);
  background: var(--lr-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  font-feature-settings: "ss01", "cv11";
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--lr-navy); color: var(--lr-shell); }

.font-serif-i { font-family: var(--font-serif); font-style: italic; }

.display-hero {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.125rem, 4.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--lr-navy);
  margin: 0;
}
.display-hero em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--lr-peach-dark);
}

.display-section {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--lr-navy);
  margin: 0;
}
.display-section em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--lr-peach-dark);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lr-peach-dark);
}

.editorial-rule {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--lr-peach-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.editorial-rule::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--lr-peach-dark);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--lr-ink-soft);
  max-width: 36rem;
  margin: 0;
}

.body-md { font-size: 1rem; line-height: 1.65; color: var(--lr-ink-soft); margin: 0; }
.body-lg { font-size: 1.0625rem; line-height: 1.7; color: var(--lr-ink-soft); margin: 0; }

.numbered {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  color: var(--lr-peach-dark);
  display: block;
}

/* ─── 3. Layout primitives ─────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding-inline: 1.5rem; }
@media (min-width: 768px) { .container { padding-inline: 2.5rem; } }

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.stack-sm > * + * { margin-top: 0.75rem; }
.stack-md > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* ─── 4. Buttons + pills ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--lr-navy);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 8px 16px -8px rgba(26,46,85,0.4);
}
.btn-primary:hover { background: #0F1F3F; }

.btn-peach {
  background: var(--lr-peach);
  color: var(--lr-navy);
}
.btn-peach:hover { background: var(--lr-rose); }

.btn-ghost {
  background: transparent;
  color: var(--lr-navy);
  border-color: var(--lr-cream-dust);
}
.btn-ghost:hover { background: rgba(255,255,255,0.6); border-color: var(--lr-peach); }

.btn-ghost-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.05); border-color: var(--lr-peach); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--lr-cream-dust);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lr-navy-mid);
  backdrop-filter: blur(8px);
}

/* ─── 5. Nav ───────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 241, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(232, 216, 203, 0.5);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.125rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.025em;
  color: var(--lr-navy);
}
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-logo em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--lr-peach-dark);
}
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1280px) { .nav-links { display: flex; } }
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--lr-navy-mid);
  white-space: nowrap;
  transition: color 160ms ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--lr-navy); }
.nav-link.is-active { font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-login {
  display: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--lr-navy-mid);
  white-space: nowrap;
}
@media (min-width: 1280px) { .nav-login { display: inline-flex; } }
.nav-login:hover { color: var(--lr-navy); }

.nav-actions .btn-primary { display: none; }
@media (min-width: 1280px) { .nav-actions .btn-primary { display: inline-flex; } }

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--lr-cream-dust);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  color: var(--lr-navy);
}
@media (min-width: 1280px) { .nav-hamburger { display: none; } }

.mobile-menu {
  display: none;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--lr-cream-dust);
  background: var(--lr-cream);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.625rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--lr-navy);
  border-bottom: 1px solid var(--lr-cream-dust);
}
.mobile-menu a:last-child { border: 0; }

/* ─── 6. Cards ─────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--lr-cream-dust);
  border-radius: var(--r-xl);
  padding: 2rem;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--lr-peach);
}

/* ─── 7. Device frames ─────────────────────────────────────────── */
.device-phone {
  background: #1A2E55;
  border-radius: 38px;
  padding: 8px;
  box-shadow: var(--shadow-device);
}
.device-phone-screen {
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 9/19;
  position: relative;
}
.device-phone-screen::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 22px;
  background: #1A2E55;
  border-radius: 12px;
  z-index: 10;
}

/* ─── 8. Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--lr-navy);
  color: rgba(255,255,255,0.7);
  padding-block: 4rem 2rem;
}
.footer h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lr-peach);
  margin: 0 0 1rem;
}
.footer a {
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  transition: color 160ms ease;
}
.footer a:hover { color: var(--lr-peach); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand p {
  color: rgba(255,255,255,0.6);
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0;
}

/* ─── 9. Mock screens (faux product UI) ────────────────────────── */
.mock {
  font-family: var(--font-sans);
  background: #fff;
  width: 100%; height: 100%;
  color: var(--lr-navy);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  overflow: hidden;
}
.mock-notch { height: 36px; flex-shrink: 0; }
.mock-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #F7DDD4, #EDAB96 60%, #C8805E);
}

/* Patient home — effectiveness gauge + timeline */
.mock-gauge { display: flex; justify-content: center; margin-bottom: 6px; }
.mock-gauge-ring { position: relative; width: 104px; height: 104px; }
.mock-gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mock-gauge-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.mock-gauge-pct {
  font-size: 1.25rem; font-weight: 700;
  color: var(--lr-success); letter-spacing: -0.025em;
}
.mock-gauge-sub { font-size: 9px; color: var(--lr-neutral-500); }
.mock-treated {
  text-align: center; font-size: 9px;
  color: var(--lr-neutral-500); margin-bottom: 14px;
}
.mock-timeline {
  border-top: 1px solid #EEF1F8; padding-top: 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 9px; position: relative;
}
.mock-timeline-line {
  position: absolute; top: 16px; left: 8%; right: 8%;
  height: 1px; background: #D8E0EF;
}
.mock-timeline-step {
  text-align: center; position: relative; z-index: 2;
  color: var(--lr-neutral-500);
}
.mock-timeline-step.is-today { color: var(--lr-primary); font-weight: 600; }
.mock-timeline-dot {
  width: 9px; height: 9px; border-radius: 50%;
  margin: 0 auto 4px; box-shadow: 0 0 0 3px #fff;
  background: #96A8C4;
}
.mock-timeline-dot.is-today { background: var(--lr-primary); }
.mock-timeline-dot.is-future { background: #BDC9E0; }
.mock-alert {
  margin-top: 10px; padding: 8px 10px;
  background: var(--lr-peach-light);
  border: 1px solid var(--lr-peach);
  border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  font-size: 9px; color: #7A2E10; font-weight: 500;
}
.mock-cta {
  margin-top: 8px; background: var(--lr-navy); color: #fff;
  border-radius: 8px; padding: 11px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; font-weight: 600;
}
.mock-nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #EEF1F8; padding: 8px 0;
  background: #fff; flex-shrink: 0;
}
.mock-nav-tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--lr-neutral-500);
  margin: 0 6px; padding: 4px 0; border-radius: 6px;
  font-size: 8.5px; font-weight: 500;
}
.mock-nav-tab.is-active {
  color: var(--lr-primary); background: var(--lr-bg-alt);
}

/* Patient report — aesthetic insights */
.mock-report-body { flex: 1; padding: 12px 16px 0; }
.mock-report-pre {
  font-size: 9px; color: var(--lr-peach-dark);
  font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase;
}
.mock-report-h {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 20px; line-height: 1.1; margin-top: 4px;
  color: var(--lr-navy);
}
.mock-zone-card {
  background: linear-gradient(135deg, #FBE9DF 0%, #F7DDD4 100%);
  border-radius: 12px; padding: 10px 12px;
  margin-top: 12px;
}
.mock-zone-card h6 {
  font-size: 9px; font-weight: 600; color: #7A2E10;
  margin: 0 0 6px;
}
.mock-face-icon {
  position: relative; width: 80px; height: 90px;
  margin: 0 auto;
}
.mock-face-icon::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #F2D6C2 0%, #D6B098 60%, #B58A6D 100%);
  border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
}
.mock-face-zone {
  position: absolute; border: 1.5px dashed var(--lr-navy);
  opacity: 0.6;
}
.mock-zone-row {
  display: flex; justify-content: space-around;
  margin-top: 6px; font-size: 8px; color: var(--lr-navy);
}
.mock-tl-label { font-size: 9px; font-weight: 600; color: var(--lr-neutral-500); margin: 12px 0 6px; }
.mock-tl-axis { display: flex; justify-content: space-between; font-size: 7.5px; color: var(--lr-neutral-500); }

/* Compare scans */
.mock-compare-header {
  padding: 8px 14px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 11px;
}
.mock-compare-range {
  padding: 0 14px 8px; display: flex; justify-content: space-between;
  font-size: 9px; color: var(--lr-neutral-500);
}

/* ─── 10. Pillar illustrations ─────────────────────────────────── */
.illus {
  border-radius: 16px;
  padding: 22px;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.illus-shell { background: linear-gradient(135deg, #FBE9DF 0%, #F7DDD4 100%); }
.illus-shell-flip { background: linear-gradient(135deg, #F1E7DE 0%, #FBE9DF 100%); }

.illus-report-card {
  background: #fff; border: 1px solid var(--lr-cream-dust);
  border-radius: 10px; padding: 12px;
  width: 100%;
  font-size: 10px;
  box-shadow: var(--shadow-md);
}
.illus-eyebrow {
  font-size: 9px; color: var(--lr-peach-dark);
  font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 4px;
}

.illus-gauge-card {
  background: #fff; border: 1px solid var(--lr-cream-dust);
  border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center;
  width: 85%;
}

.illus-ranges-card {
  background: #fff; border: 1px solid var(--lr-cream-dust);
  border-radius: 10px; padding: 14px 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
}
.illus-range-row { margin-bottom: 8px; }
.illus-range-row:last-child { margin-bottom: 0; }
.illus-range-label {
  display: flex; justify-content: space-between;
  font-size: 9px; margin-bottom: 3px; color: var(--lr-navy);
}
.illus-range-track {
  position: relative; height: 6px;
  background: #F1F4FA; border-radius: 3px;
}
.illus-range-fill {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--lr-primary), var(--lr-peach));
  border-radius: 3px;
}
.illus-range-mark {
  position: absolute; top: -3px; width: 2px; height: 12px;
  background: var(--lr-navy);
}

/* ─── 11. Misc utility ─────────────────────────────────────────── */
.bg-navy { background: var(--lr-navy); color: #fff; }
.bg-cream { background: var(--lr-cream); }
.bg-cream-deep { background: var(--lr-cream-deep); }
.bg-white { background: #fff; }
.text-white { color: #fff; }
.text-peach { color: var(--lr-peach); }
.text-navy { color: var(--lr-navy); }
.text-soft { color: var(--lr-ink-soft); }
