/* Prepped marketing site.
   Tokens mirror Prepped/DesignSystem/Colors.swift, Spacing.swift and
   Radius.swift. Change them there first, then here. Light only: the app
   has no dark mode in v1. */

:root {
  /* raw ramp */
  --clay-50: #FAF3EF;
  --clay-100: #F5E6DE;
  --clay-200: #E8C9B8;
  --clay-500: #C0603C;
  --clay-600: #A34D2F;
  --clay-700: #7E3A24;
  --warm-50: #FAF7F2;
  --warm-100: #F2EDE5;
  --warm-200: #E8E1D9;
  --warm-400: #C8C1BA;
  --warm-600: #8A8078;
  --warm-700: #6B625C;
  --warm-900: #1F1B18;
  --white: #FFFFFF;

  /* semantic */
  --background: var(--warm-50);
  --surface: var(--white);
  --surface-sunken: var(--warm-100);
  --border: var(--warm-200);
  --accent: var(--clay-500);
  --accent-pressed: var(--clay-600);
  --accent-tint: var(--clay-100);
  --text-primary: var(--warm-900);
  --text-secondary: var(--warm-700);
  --text-tertiary: var(--warm-600);
  --text-on-accent: var(--white);

  /* spacing, 4pt scale */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-xxl: 32px;
  --sp-xxxl: 48px;
  --sp-section: 96px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --measure: 60ch;
  --container: 1080px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-pressed); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
p + p { margin-top: var(--sp-lg); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: var(--measure);
}

.muted { color: var(--text-secondary); }
.small { font-size: 0.9rem; color: var(--text-tertiary); }

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding-block: var(--sp-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.brand:hover { color: var(--text-primary); }
.brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  font-size: 0.95rem;
}
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--text-primary); }
/* The link rule above outranks .button on specificity, so the
   accent button names its own text colour. */
.nav-links .button, .nav-links .button:hover { color: var(--text-on-accent); }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  background: var(--accent);
  color: var(--text-on-accent);
  border: 1px solid transparent;
  white-space: nowrap;
}
.button:hover { background: var(--accent-pressed); color: var(--text-on-accent); }

.button-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.button-secondary:hover { background: var(--surface-sunken); color: var(--text-primary); }

/* Apple's badge ships at 40pt tall in its own SVG; 50px keeps the
   required clear space and matches the button height beside it. */
.store-badge { display: inline-flex; }
.store-badge img { height: 50px; width: auto; }

/* Sections */

.section { padding-block: var(--sp-section); }
.section + .section { padding-top: 0; }
.section-header { max-width: var(--measure); margin-bottom: var(--sp-xxl); }
.section-header h2 { margin-top: var(--sp-sm); }
.section-header p { margin-top: var(--sp-md); color: var(--text-secondary); }

/* A full-bleed band in the accent. It keeps its own padding on both
   sides because the "section + section" collapse above would otherwise
   leave the band and the section after it flush. */
.section-accent {
  background: var(--accent);
  color: var(--text-on-accent);
}
.section + .section-accent,
.section-accent + .section { padding-top: var(--sp-section); }
.section-accent .eyebrow { color: var(--accent-tint); }
.section-accent .phone { box-shadow: 0 16px 32px rgba(126, 58, 36, 0.35); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-xxxl);
  align-items: center;
  padding-block: var(--sp-xxxl) 0;
}
.hero h1 { max-width: 14ch; }
.hero .lede { margin-top: var(--sp-xl); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-xxl);
}
.hero-visual { display: flex; justify-content: center; }

/* Phone frame: a placeholder until real screenshots land in
   assets/screenshots. The frame is CSS so the screenshot can be a plain
   device capture with no bezel baked in. */

.phone {
  width: min(100%, 300px);
  /* The iPhone 17 Pro capture, exactly, so nothing is cropped. */
  aspect-ratio: 1206 / 2622;
  border-radius: 44px;
  background: var(--warm-900);
  padding: 10px;
  box-shadow: 0 24px 48px rgba(31, 27, 24, 0.18);
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--surface-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--sp-lg);
}
.phone-screen:has(img) { padding: 0; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Claims */

.claims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.claim {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}
.claim h3 { font-size: 1.35rem; font-weight: 700; }
.claim p { margin-top: var(--sp-sm); color: var(--text-secondary); }

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xxl) var(--sp-xxxl);
}
.feature h3 { font-size: 1.2rem; }
.feature p { margin-top: var(--sp-sm); color: var(--text-secondary); max-width: 46ch; }
.feature-glyph {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
}
.feature-glyph svg { width: 20px; height: 20px; }

/* Screenshots */

.frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xl);
}
.frame { text-align: center; }
.frame .phone { width: min(100%, 220px); margin: 0 auto; border-radius: 32px; padding: 7px; box-shadow: none; }
.frame .phone-screen { border-radius: 26px; }
.frame figcaption { margin-top: var(--sp-lg); font-weight: 600; }

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
}
.plan-pro { border-color: var(--clay-200); background: var(--clay-50); }
.plan h3 { font-size: 1.35rem; }
.price { margin-top: var(--sp-sm); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.price small { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.price-alt { color: var(--text-secondary); font-size: 0.95rem; }
.plan ul { list-style: none; padding: 0; margin: var(--sp-xl) 0 0; display: grid; gap: var(--sp-sm); }
.plan li { display: flex; gap: var(--sp-sm); align-items: flex-start; color: var(--text-secondary); }
.plan li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent) center / 10px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.6 2.5L10 3.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.plan .small { margin-top: auto; padding-top: var(--sp-xl); }

/* Callout */

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xxl);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-xl);
  align-items: center;
}
.callout p { color: var(--text-secondary); margin-top: var(--sp-sm); max-width: 56ch; }

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-xxl);
  font-size: 0.9rem;
  color: var(--text-tertiary);
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-lg);
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-xl); }
.footer-links a { color: var(--text-secondary); }

/* Document pages: privacy, terms, support */

.doc { padding-block: var(--sp-xxl) var(--sp-section); }
.doc .prose { max-width: var(--measure); margin-inline: auto; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.prose h2 { font-size: 1.5rem; margin-top: var(--sp-xxxl); }
.prose h3 { margin-top: var(--sp-xl); }
.prose p, .prose ul { margin-top: var(--sp-lg); color: var(--text-secondary); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--sp-sm); }
.prose .updated { margin-top: var(--sp-sm); }
.notice {
  margin-top: var(--sp-xl);
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--accent-tint);
  border-radius: var(--radius-md);
  color: var(--clay-700);
}

/* Support questions: one block each, with a glyph beside the heading. */

.faq { display: grid; gap: var(--sp-xxl); margin-top: var(--sp-xxxl); }
.faq-item h2 {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-top: 0;
}
.faq-item h2 .feature-glyph { margin-bottom: 0; flex: none; }
.faq-item p { margin-top: var(--sp-md); }

/* Responsive */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--sp-xl); }
  .hero-visual { order: -1; }
  .hero-copy { text-align: center; }
  .hero h1, .hero .lede { max-width: none; margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .phone { width: min(100%, 240px); }
  .claims, .frames { grid-template-columns: 1fr; }
  .features, .plans { grid-template-columns: 1fr; }

  /* Stacked, the features read as a list: a divider between each and
     alternating grounds, bled to the screen edge. */
  .features { gap: 0; }
  .feature {
    padding: var(--sp-xl);
    margin-inline: calc(-1 * var(--sp-xl));
    border-top: 1px solid var(--border);
  }
  .feature:last-child { border-bottom: 1px solid var(--border); }
  /* The list runs straight into the accent band, no gap, and the
     band edge replaces the last divider. */
  .section:has(+ .section-accent) { padding-bottom: 0; }
  .section:has(+ .section-accent) .feature:last-child { border-bottom: 0; }
  .feature:nth-child(even) { background: var(--surface-sunken); }
  .feature p { max-width: none; }

  .faq { gap: 0; }
  .faq-item {
    padding: var(--sp-xl);
    margin-inline: calc(-1 * var(--sp-xl));
    border-top: 1px solid var(--border);
  }
  /* The list runs straight into the footer, whose own top line
     replaces the last divider. */
  .doc:has(.faq) { padding-bottom: 0; }
  .faq-item:nth-child(even) { background: var(--surface-sunken); }
  .callout { grid-template-columns: 1fr; }
  .nav-links { gap: var(--sp-lg); }
  :root { --sp-section: 64px; }
}

@media (max-width: 520px) {
  .nav-links a:not(.button) { display: none; }
}

/* Hero device pair: iPad behind, iPhone in front. Both screens are
   placeholders until real captures land in assets/screenshots. */

.device-pair {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding-bottom: 40px;
  padding-right: 40px;
}
.tablet {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: var(--warm-900);
  padding: 10px;
  box-shadow: 0 24px 48px rgba(31, 27, 24, 0.18);
}
.tablet .phone-screen { border-radius: 14px; }
.device-pair .phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  border-radius: 28px;
  padding: 6px;
}
.device-pair .phone .phone-screen { border-radius: 22px; font-size: 0.75rem; }

@media (max-width: 880px) {
  .device-pair { max-width: 420px; }
}
