/* ============ MEDUX LP — Tokens + Base ============ */
:root {
  --bg: #0A0908;
  --bg-2: #100E0C;
  --bg-3: #16130F;
  --fg: #F5F2EE;
  --fg-dim: #A8A39B;
  --fg-mute: #6B665E;
  --line: rgba(245, 242, 238, 0.08);
  --line-2: rgba(245, 242, 238, 0.14);
  --coral: #FF5B2C;
  --coral-2: #FF7A4D;
  --coral-glow: rgba(255, 91, 44, 0.45);
  --coral-glow-soft: rgba(255, 91, 44, 0.18);
  --bege: #FAF7F2;
  --bege-2: #F2EDE3;
  --ink: #15110D;
  --ink-dim: #4D463E;

  /* Category pastels (used in dashboard + §5) */
  --cat-1: #FCE7D6;  /* peach */
  --cat-2: #E8E1D4;  /* sand */
  --cat-3: #DCE8DA;  /* sage */
  --cat-4: #E2DEEC;  /* lavender */
  --cat-5: #F4DDD7;  /* coral pale */
  --cat-6: #DDE6EC;  /* sky */
  --cat-7: #ECE4D2;  /* wheat */
  --cat-8: #E6DCDA;  /* mauve */
  --cat-9: #D9E3DE;  /* mint */
  --cat-10:#EDDFD0;  /* clay */

  --r-card: 18px;
  --r-pill: 999px;
  --r-btn: 12px;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
  overflow-x: hidden;
}
.mono { font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--coral); color: #fff; }

/* ============ Layout ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

/* ============ Section curve dividers ============ */
.section-curve {
  position: relative;
}
.section-curve > .curve-top,
.section-curve > .curve-bot {
  position: absolute;
  left: 0; right: 0;
  height: 60px;
  z-index: 2;
  pointer-events: none;
}
.section-curve > .curve-top { top: -1px; }
.section-curve > .curve-bot { bottom: -1px; }
.curve-top svg, .curve-bot svg { width: 100%; height: 100%; display: block; }

/* Round the section edges directly */
.section-rounded-bot { border-bottom-left-radius: 48px; border-bottom-right-radius: 48px; }
.section-rounded-top { border-top-left-radius: 48px; border-top-right-radius: 48px; }
.section-rounded { border-radius: 48px; }

/* When two dark sections meet a light one, soften the seam */
.seam-light-into-dark, .seam-dark-into-light {
  position: relative;
}
@media (max-width: 720px) {
  .section-rounded-bot, .section-rounded-top, .section-rounded {
    border-radius: 32px;
  }
}

/* ============ Eyebrow Pill ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-wrap: balance;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 10px var(--coral-glow);
  animation: pulse 2.2s ease-in-out infinite;
}
.pill.light {
  border-color: rgba(21,17,13,0.12);
  background: rgba(21,17,13,0.04);
  color: var(--ink-dim);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* ============ Headlines ============ */
.h-display {
  font-size: clamp(44px, 7.6vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.h-1 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.h-2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
}
.lede {
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--fg-dim);
  line-height: 1.55;
  max-width: 64ch;
  margin: 0;
  text-wrap: pretty;
}
.lede.light { color: var(--ink-dim); }
.coral-grad {
  background: linear-gradient(95deg, #FF5B2C 0%, #FF8855 60%, #FFB897 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 8px 24px -6px var(--coral-glow);
}
.btn-primary:hover {
  background: var(--coral-2);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 14px 36px -6px var(--coral-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02);
  color: var(--fg);
}
.btn-ghost:hover { border-color: rgba(245,242,238,0.28); background: rgba(255,255,255,0.04); }
.btn.lg { padding: 18px 28px; font-size: 16px; border-radius: 14px; }
.btn.xl { padding: 22px 32px; font-size: 17px; border-radius: 16px; width: 100%; }
.btn-primary.glow {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 0 32px -4px var(--coral-glow),
    0 0 80px -10px var(--coral-glow);
  animation: btnGlow 3.4s ease-in-out infinite;
}
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 0 32px -4px var(--coral-glow), 0 0 80px -10px var(--coral-glow); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 0 48px 0 var(--coral-glow),  0 0 120px -6px var(--coral-glow); }
}

/* ============ Card primitives ============ */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
  position: relative;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--line-2); }
.card.light {
  background: #fff;
  border: 1px solid rgba(21,17,13,0.08);
  color: var(--ink);
}

/* ============ Coral glow surface ============ */
.coral-block {
  background: linear-gradient(140deg, var(--coral) 0%, #E8431A 100%);
  color: #fff;
  border-radius: 22px;
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
}
.coral-block::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,0.22), transparent 60%);
  pointer-events: none;
}

/* ============ Mesh background ============ */
.mesh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.mesh-bg::before, .mesh-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
}
.mesh-bg::before {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(255,91,44,0.55), transparent 60%);
  top: -260px; left: 50%; transform: translateX(-50%);
}
.mesh-bg::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,140,80,0.32), transparent 60%);
  top: 40%; left: 12%;
}

/* ============ Fade up animation ============ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.d1 { transition-delay: .08s; }
.fade-up.d2 { transition-delay: .16s; }
.fade-up.d3 { transition-delay: .24s; }
.fade-up.d4 { transition-delay: .32s; }
.fade-up.d5 { transition-delay: .40s; }

/* ============ Section padding ============ */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section.tight { padding: clamp(56px, 7vw, 96px) 0; }
.section.light {
  background: var(--bege);
  color: var(--ink);
  border-radius: 48px;
  margin: 0 12px;
  position: relative;
  z-index: 2;
}
.section.light + .section.light {
  margin-top: -48px;
  padding-top: clamp(96px, 12vw, 180px);
}
.section.dark-rounded {
  background: var(--bg);
  border-radius: 48px;
  margin: 0 12px;
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  .section.light, .section.dark-rounded { border-radius: 28px; margin: 0 6px; }
  .section.light + .section.light { margin-top: -28px; padding-top: 80px; }
}

/* ============ Divider line ============ */
.hr-line {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: inline-flex;
  gap: 16px;
  align-items: center;
}
.marquee-item .sep {
  width: 5px; height: 5px; border-radius: 50%; background: var(--coral);
}

/* ============ Focus ============ */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ Advanced card hover ============ */
.card {
  transition: border-color .35s ease, transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, background .35s ease;
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(220px 160px at var(--mx, 50%) var(--my, 0%), rgba(255,91,44,0.10), transparent 60%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 24px 48px -28px rgba(0,0,0,0.7); }
.card:hover::after { opacity: 1; }

/* ============ Pill hover ============ */
.pill { transition: border-color .25s ease, color .25s ease, transform .25s ease; }
.pill:hover { border-color: rgba(255,91,44,0.4); color: var(--fg); }

/* ============ Marquee speed-up on hover ============ */
.marquee:hover .marquee-track { animation-duration: 80s; }

/* ============ Section padding mobile ============ */
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section.tight { padding: 48px 0; }
  :root { --gutter: 18px; }
  .h-display { font-size: clamp(38px, 12vw, 64px) !important; }
  .h-1 { font-size: clamp(28px, 8vw, 44px) !important; }
}

@media (max-width: 460px) {
  .btn.lg { padding: 16px 22px; font-size: 14.5px; }
  .btn { width: auto; }
}

/* ============ Bullet-separated meta row ============
   Each child is white-space: nowrap so it never breaks mid-segment.
   Bullets are injected via ::before on every non-first child, so they
   stay glued to the following text — no orphan bullets at line ends. */
.meta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}
.meta-row > * { white-space: nowrap; }
.meta-row > * + *::before {
  content: '·';
  color: var(--fg-dim);
  padding: 0 12px;
  display: inline-block;
}

/* ============ Mobile sticky-CTA bottom buffer ============
   Reserve space at the bottom so the fixed CTA bar never covers
   the last lines of any section. Desktop hides .sticky-cta. */
/* ============ Center section headers — all viewports ============
   Targets the 8 section headers that share the pattern
   <div class="fade-up" style="display:flex; flex-direction:column;
     align-items:flex-start; ... maxWidth: 760">
   Override inline alignItems with !important and center child text.
   Applies to all sizes, including desktop. */
.section .container > .fade-up[style*="flex-start"] {
  align-items: center !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.section .container > .fade-up[style*="flex-start"] .pill {
  margin-left: auto !important;
  margin-right: auto !important;
}
.section .container > .fade-up[style*="flex-start"] .lede {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 56ch !important;
}

/* ============ Mobile-only rules (sticky CTA buffer, pill tightening, etc) ============ */
@media (max-width: 760px) {
  /* Body padding accounts for sticky CTA + Android gesture bar / iOS home indicator */
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .sticky-cta {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Long-text pill: tighten so the hero eyebrow doesn't balloon */
  .pill {
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.35;
    padding: 5px 12px;
  }

  /* Hide WhatsApp FAB on mobile (defensive — overlap risk with sticky-cta) */
  .whatsapp-fab { display: none !important; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade-up { opacity: 1 !important; transform: none !important; }
}

/* ============ Dashboard Mock — Mobile ============ */
@media (max-width: 720px) {
  .dash-shell {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    border-radius: 14px !important;
  }
  .dash-sidebar {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(245,242,238,0.06) !important;
  }
  .dash-nav-section,
  .dash-lib-section { display: none !important; }
  .dash-user-footer {
    margin-top: 0 !important;
    padding: 0 !important;
    border-top: none !important;
    flex: 0 0 auto !important;
  }
  .dash-user-name { font-size: 11px !important; }
  .dash-main { padding: 18px 16px 22px !important; }
  .dash-header-row { gap: 10px !important; }
  .dash-search { padding: 5px 9px !important; font-size: 10.5px !important; }
  .dash-greeting {
    font-size: 20px !important;
    line-height: 1.15 !important;
    margin-top: 12px !important;
  }
  .dash-stats { gap: 18px !important; margin-top: 16px !important; padding-bottom: 14px !important; }
  .dash-section-head { flex-wrap: wrap !important; gap: 4px 12px !important; }
  .dash-section-meta { font-size: 9.5px !important; }
  .dash-cats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 420px) {
  .dash-search span:not(.mono) { display: none !important; }
  .dash-search .mono { margin-left: 0 !important; }
  .dash-stats { gap: 14px !important; }
  .dash-greeting { font-size: 18px !important; }
}
