/* ===========================================================================
   Uwell Landing — Shared Base Stylesheet
   --------------------------------------------------------------------------
   Mobile-first. Per-variant HTMLs override :root custom properties AND add
   variant-specific component rules in an inline <style> block in <head>,
   placed AFTER this file. Body has a .variant-{clean|warm|editorial|app}
   class so variant-only behavior (both in CSS and JS) can key off it.
   ========================================================================= */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Palette — teal accent, off-blacks, neutrals */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-tint: rgba(13, 148, 136, 0.06);
  --color-text: #18181b;
  --color-text-soft: #52525b;
  --color-line: rgba(24, 24, 27, 0.08);
  --color-line-strong: rgba(24, 24, 27, 0.16);
  --accent: #0d9488;
  --accent-ink: #ffffff;
  --accent-hover: #0b7d73;
  --accent-soft: rgba(13, 148, 136, 0.08);

  /* Typography — each variant overrides --font-body / --font-display */
  --font-body: system-ui, sans-serif;
  --font-display: system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-size-base: 1rem;
  --font-size-sm: 0.9375rem;
  --font-size-xs: 0.8125rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-h1: clamp(2.5rem, 6vw, 5.5rem);
  --font-size-h2: clamp(1.875rem, 3vw, 2.75rem);
  --font-size-h3: clamp(1.125rem, 1.6vw, 1.375rem);
  --h1-tracking: -0.03em;
  --h1-leading: 0.95;
  --line-body: 1.6;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --section-pad-y: clamp(4rem, 8vw, 8rem);
  --container-max: 1200px;
  --container-pad-x: clamp(1rem, 4vw, 2.5rem);

  /* Tinted shadows — NOT black */
  --shadow-xs: 0 1px 2px rgba(13, 148, 136, 0.04);
  --shadow-sm: 0 4px 12px rgba(13, 148, 136, 0.06);
  --shadow-md: 0 12px 28px -10px rgba(13, 148, 136, 0.12);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.08);

  /* Motion — spring-like easing exclusively */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-mid: 320ms;
  --dur-slow: 600ms;
}

/* 2. Reset + base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dd {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
p { max-width: 65ch; }

h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-h1);
  line-height: var(--h1-leading);
  font-weight: 800;
  letter-spacing: var(--h1-tracking);
}
h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 3. Layout primitives --------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-x);
}
.section {
  padding-block: var(--section-pad-y);
  position: relative;
}
.section + .section { border-top: 1px solid var(--color-line); }

.cta-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

/* 4. Header + footer ----------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.topnav {
  display: flex;
  gap: var(--space-5);
}
.topnav a {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  font-weight: 500;
}
.topnav a:hover { color: var(--accent); }

.footer {
  padding-block: var(--space-7);
  border-top: 1px solid var(--color-line);
  text-align: center;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
}
.footer a { color: var(--accent); font-weight: 500; }

/* 5. Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--font-size-base);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  will-change: transform;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-store {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-line-strong);
}
.btn-store:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}
.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.btn-secondary:hover { background: rgba(13, 148, 136, 0.14); }
.btn-small {
  min-height: 40px;
  padding: 10px 18px;
  font-size: var(--font-size-sm);
}

/* 6. Hero ---------------------------------------------------------------- */
.hero {
  min-height: 100dvh;
  padding-top: clamp(3rem, 6vw, 6rem);
  padding-bottom: var(--section-pad-y);
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  gap: var(--space-6);
}
.hero-content > * + * { margin-top: var(--space-5); }
.hero h1 { max-width: 18ch; }
.hero-sub {
  font-size: var(--font-size-lg);
  color: var(--color-text-soft);
  max-width: 56ch;
  line-height: 1.5;
}
.social-proof {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}

/* Decorative hero art — shown/styled per-variant */
.hero-art {
  position: relative;
  min-height: 280px;
  display: grid;
}
.hero-art-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-art-label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-art-dot,
.hero-art-bar { display: block; }

/* Kinetic marquee band (V2 uses; hidden elsewhere by default) */
.kinetic-marquee {
  display: none;
  overflow: hidden;
  border-block: 1px solid var(--color-line);
  padding-block: var(--space-5);
}
.marquee-track {
  display: flex;
  gap: var(--space-5);
  width: max-content;
  white-space: nowrap;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--color-text-soft);
}
.marquee-track span { flex: 0 0 auto; }
.kinetic-marquee:hover .marquee-track { animation-play-state: paused; }

/* 7. Problem section ----------------------------------------------------- */
.problem .container > * + * { margin-top: var(--space-6); }
.problem-sub {
  font-size: var(--font-size-lg);
  color: var(--color-text-soft);
  max-width: 56ch;
}
.pain-list {
  display: grid;
  gap: 0;
}
.pain-list li {
  position: relative;
  padding: var(--space-4) 0 var(--space-4) 40px;
  border-bottom: 1px solid var(--color-line);
  line-height: 1.5;
}
.pain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border: 1.5px solid var(--color-line-strong);
  border-radius: 5px;
}
.consequences-intro {
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}
.consequences {
  display: grid;
  gap: var(--space-3);
}
.consequences li {
  padding-left: 28px;
  position: relative;
  color: var(--color-text-soft);
}
.consequences li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}
.emotional-pivot {
  margin-top: var(--space-6);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  color: var(--color-text);
  font-style: italic;
  line-height: 1.35;
  max-width: 44ch;
  padding-left: var(--space-5);
  border-left: 2px solid var(--accent);
}
.emotional-pivot p + p { margin-top: var(--space-3); }

/* 8. How section (timeline + features) ----------------------------------- */
.how .container > * + * { margin-top: var(--space-6); }
.how-sub {
  font-size: var(--font-size-lg);
  color: var(--color-text-soft);
}
.how-timeline {
  display: grid;
  gap: var(--space-4);
  counter-reset: step;
  margin-top: var(--space-6);
}
.how-timeline > li {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}
.how-timeline .step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--space-3);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.how-timeline p { color: var(--color-text-soft); }

.feature-sub-heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 700;
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

/* Features: NOT a plain 3-col row. Base = single column; variants override. */
.feature-grid {
  display: grid;
  gap: var(--space-4);
}
.feature-card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  position: relative;
}
.feature-card .lead {
  display: inline;
  font-weight: 700;
  color: var(--color-text);
}
.feature-card p {
  color: var(--color-text-soft);
  line-height: 1.5;
}

.accent-phrase {
  margin-top: var(--space-7);
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  font-style: italic;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.4;
  max-width: 48ch;
  padding-left: var(--space-5);
  border-left: 2px solid var(--accent);
}

/* 9. Pricing strip ------------------------------------------------------- */
.pricing-strip {
  background: var(--color-surface-tint);
  text-align: center;
}
.pricing-strip p {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.625rem);
  font-weight: 500;
  color: var(--color-text);
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.4;
}
.pricing-strip strong {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
}

/* 10. Testimonials ------------------------------------------------------- */
.testimonials .container > * + * { margin-top: var(--space-6); }
.testimonial-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.testimonial {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
}
.testimonial .stars {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 4px;
  margin-bottom: var(--space-3);
}
.testimonial blockquote {
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  font-size: 1rem;
}
.testimonial cite {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
}

/* 11. About -------------------------------------------------------------- */
.about .container > * + * { margin-top: var(--space-5); }
.about p {
  font-size: var(--font-size-lg);
  color: var(--color-text-soft);
  max-width: 62ch;
  line-height: 1.55;
}

/* 12. FAQ ---------------------------------------------------------------- */
.faq .container > * + * { margin-top: var(--space-6); }
.faq-list {
  display: grid;
  gap: 0;
  max-width: 880px;
  border-top: 1px solid var(--color-line);
}
.faq-item {
  border-bottom: 1px solid var(--color-line);
  background: transparent;
}
.faq-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-text);
  min-height: 56px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast) var(--ease);
}
.faq-trigger:hover { color: var(--accent); }
.faq-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-mid) var(--ease);
}
.faq-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.faq-answer {
  padding-bottom: var(--space-5);
  color: var(--color-text-soft);
  line-height: 1.6;
  max-width: 72ch;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height var(--dur-mid) var(--ease);
}
.faq-answer[hidden] {
  display: block;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* 13. Final CTA ---------------------------------------------------------- */
.final-cta {
  background: var(--color-surface-tint);
  text-align: center;
}
.final-cta .container > * + * { margin-top: var(--space-5); }
.final-cta h2 {
  max-width: 22ch;
  margin-inline: auto;
}
.final-cta p {
  font-size: var(--font-size-lg);
  color: var(--color-text-soft);
  max-width: 56ch;
  margin-inline: auto;
}
.final-cta .cta-row { justify-content: center; }

/* 14. Reveal-on-scroll --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 15. Responsive --------------------------------------------------------- */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--space-8);
  }
  .pain-list { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
  .pain-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--color-line); }
  .how-timeline { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .how-timeline { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
}

/* 16. Utilities ---------------------------------------------------------- */
.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;
}
