/* ─── Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg: #fafaf7;          /* warm off-white — body */
  --surface: #ffffff;     /* cards / form / price-list */
  --surface-soft: #f5f5f0; /* subtle band */

  /* Ink */
  --ink: #0f172a;         /* primary text */
  --ink-2: #1e293b;       /* secondary headings */
  --muted: #475569;       /* body muted */
  --muted-2: #64748b;     /* captions / hints */
  --muted-3: #94a3b8;     /* faintest */

  /* Hairlines */
  --hairline: #e5e7eb;
  --hairline-2: #d1d5db;

  /* Brand accent — orange. [REPLACE-ACCENT] swap this one hex when you have the final brand orange. */
  --accent: #ea580c;        /* orange-600 */
  --accent-hover: #c2410c;  /* orange-700 */
  --accent-soft: #fff7ed;   /* orange-50 — barely-tinted bg */
  --accent-soft-2: #ffedd5; /* orange-100 — slightly stronger */

  /* Layout */
  --container: 1100px;
  --container-narrow: 720px;
  --container-tight: 640px;
  --radius: 8px;
  --radius-lg: 16px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ─── Reset / base ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}
a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.018em;
}

p {
  margin: 0;
}

::selection {
  background: var(--accent-soft-2);
  color: var(--accent-hover);
}

/* ─── Layout helpers ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.center {
  text-align: center;
}
.center.cta-stack {
  align-items: center;
  justify-content: center;
}

.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;
}

/* ─── Header ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 25%, transparent);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.014em;
}
.wordmark__mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
}
.wordmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.header-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.6rem 0.4rem;
  border-radius: 6px;
  transition: color 180ms ease;
}
.header-link:hover {
  color: var(--ink);
}
.header-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}
.btn--primary:active {
  transform: translateY(1px);
}

.btn--lg {
  padding: 1.1rem 1.9rem;
  font-size: 1.05rem;
}

.link-cta {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.link-cta:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.link-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* ─── Section atoms ───────────────────────────────────────────────── */
section {
  padding: 4rem 0;
}

.hero {
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  max-width: 20ch;
}

.center .section-title {
  margin-left: auto;
  margin-right: auto;
}

.section-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 52ch;
}

.center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Hero ────────────────────────────────────────────────────────── */
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.028em;
  max-width: 16ch;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 48ch;
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  order: -1; /* visual ABOVE copy on mobile so phone is the first thing seen */
}

.hero-shot {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 28px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow:
    0 25px 50px -20px rgba(15, 23, 42, 0.18),
    0 10px 20px -8px rgba(15, 23, 42, 0.10);
}

/* ─── App Store Reviews (between Hero and Price Anchor) ─────────── */
.reviews {
  padding: 0.5rem 0 2.75rem;
}

.reviews__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: center;
  margin: 0 0 1.5rem;
}

.reviews-grid {
  display: grid;
  gap: 0.85rem;
}

.review {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.review__stars {
  color: var(--accent);
  display: block;
  margin-bottom: 0.85rem;
}

.review__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
}

.review__quote {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.review__meta {
  font-size: 0.8rem;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ─── SECTION 2 — Price anchor (THE CENTERPIECE) ─────────────────── */
.anchor {
  padding: 3rem 0 4rem;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      var(--accent-soft) 0%,
      transparent 60%
    ),
    var(--bg);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.02),
    0 12px 24px -16px rgba(15, 23, 42, 0.08);
}

/* Competitor rows — quiet, muted */
.price-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.price-list__row:last-child {
  border-bottom: 0;
}

.price-list__label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.price-list__sublabel {
  font-size: 0.85rem;
  color: var(--muted-2);
  font-weight: 400;
  margin-top: 0.15rem;
}

.price-list__value {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: right;
  font-size: 0.98rem;
  white-space: nowrap;
}

/* The FitLifeAI row — DRAMATIC scale jump. This is the moment. */
.price-list__row--us {
  background: linear-gradient(
    180deg,
    var(--accent-soft) 0%,
    color-mix(in srgb, var(--accent-soft) 60%, var(--accent-soft-2)) 100%
  );
  padding: 2rem 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  align-items: center;
}

.price-list__row--us .price-list__label {
  font-size: 1.1rem;
}

.price-list__row--us .price-list__label strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.price-list__row--us .price-list__sublabel {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.price-list__value--us {
  text-align: right;
  white-space: nowrap;
}

.price-list__value--us strong {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.anchor-caption {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ─── How it works ────────────────────────────────────────────────── */
.how {
  padding: 4rem 0;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: flex-start;
}
.step:first-child {
  padding-top: 0;
}
.step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.step__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.3rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

.step__body {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 52ch;
}

/* ─── Screenshot carousel ─────────────────────────────────────────── */
.screenshots {
  padding: 3.5rem 0;
}

.screenshots .section-sub {
  margin-bottom: 2.25rem;
}

.carousel {
  position: relative;
}

.carousel__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 1.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.5rem 1.25rem 1.25rem;
  margin: 0 -1.5rem;
  overscroll-behavior-inline: contain;
}
.carousel__track::-webkit-scrollbar {
  display: none;
}
.carousel__track:focus {
  outline: none;
}
.carousel__track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.carousel__slide {
  flex: 0 0 70%;
  max-width: 240px;
  scroll-snap-align: center;
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.carousel__shot {
  width: 100%;
  aspect-ratio: 280 / 606;
  border-radius: 28px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  box-shadow:
    0 25px 50px -20px rgba(15, 23, 42, 0.18),
    0 10px 20px -8px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

.carousel__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-style: dashed;
  border-color: var(--hairline-2);
  padding: 1rem;
}

.carousel__placeholder p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted-2);
  margin: 0;
}

.carousel__placeholder code {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
}

.carousel__caption {
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Prev/Next buttons — hidden on mobile, visible on tablet+ */
.carousel__btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.1);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.carousel__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel__btn--prev {
  left: 0.25rem;
}
.carousel__btn--next {
  right: 0.25rem;
}

/* Dot indicators */
.carousel__dots {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
}

.carousel__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline-2);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}
.carousel__dots button:hover {
  background: var(--muted-2);
}
.carousel__dots button[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.4);
}
.carousel__dots button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── SECTION 4 — Sample form ─────────────────────────────────────── */
.sample {
  padding: 4rem 0;
  background: var(--surface-soft);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.sample-form {
  margin-top: 2rem;
  display: grid;
  gap: 0.75rem;
}

.sample-form__input {
  width: 100%;
  padding: 1rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.sample-form__input::placeholder {
  color: var(--muted-3);
}

.sample-form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.sample-form__submit {
  width: 100%;
}

.sample-form__status {
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin: 0;
}
.sample-form__status[data-state="success"] {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.sample-form__status[data-state="error"] {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ─── SECTION 5 — Close ───────────────────────────────────────────── */
.close {
  padding: 5rem 0 5.5rem;
}

.close .section-title {
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  max-width: 22ch;
}

.close .cta-stack {
  margin-top: 2.25rem;
}

/* ─── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-row nav {
  display: flex;
  gap: 1.5rem;
}

.footer-row nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-row nav a:hover {
  color: var(--ink);
}

.copyright {
  color: var(--muted-2);
  font-size: 0.88rem;
}

/* ─── Responsive: ≥ 640px (large phone / small tablet) ───────────── */
@media (min-width: 640px) {
  body {
    font-size: 18px;
  }

  section {
    padding: 5rem 0;
  }

  .hero {
    padding-top: 4rem;
    padding-bottom: 5.5rem;
  }

  .reviews {
    padding: 1rem 0 4rem;
  }

  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
  }

  .review {
    display: flex;
    flex-direction: column;
  }

  .review__quote {
    flex: 1;
  }

  .anchor {
    padding: 4rem 0 5rem;
  }

  .price-list__row {
    padding: 1.5rem 2rem;
  }

  .screenshots {
    padding: 5rem 0;
  }

  .carousel__slide {
    flex: 0 0 calc((100% - 2rem) / 3);
    max-width: none;
  }

  .carousel__btn {
    display: inline-flex;
  }

  .price-list__row--us {
    padding: 2.5rem 2rem;
  }

  .price-list__row--us .price-list__label strong {
    font-size: 1.4rem;
  }

  .price-list__value--us strong {
    font-size: 2.6rem;
  }

  .cta-stack {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .sample-form {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.75rem;
  }
  .sample-form__submit {
    width: auto;
  }
  .sample-form__status {
    grid-column: 1 / -1;
  }

  .footer-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ─── Responsive: ≥ 960px (desktop hero split) ────────────────────── */
@media (min-width: 960px) {
  .hero {
    padding-top: 5.5rem;
    padding-bottom: 7rem;
  }

  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 4.5rem;
  }

  /* Restore natural reading order on desktop: copy left, phone right */
  .hero-visual {
    order: 0;
  }

  .hero-shot {
    max-width: 300px;
  }

  .reviews {
    padding: 1.5rem 0 5rem;
  }

  .anchor {
    padding: 5.5rem 0 6.5rem;
  }

  .how {
    padding: 6rem 0;
  }

  .screenshots {
    padding: 6rem 0;
  }

  .carousel__slide {
    flex: 0 0 calc((100% - 3rem) / 4);
  }

  .sample {
    padding: 6rem 0;
  }

  .close {
    padding: 7rem 0 8rem;
  }

  .price-list__row--us .price-list__label strong {
    font-size: 1.5rem;
  }

  .price-list__value--us strong {
    font-size: 3rem;
  }
}

/* ─── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
