/* ------------------------------------------------------------------
   Fasting — marketing site styles
   Palette lifted from app/Fasting/DesignSystem.swift (Theme enum).
   ------------------------------------------------------------------ */

:root {
  /* Brand — fasting (greens) */
  --fasting-start: #22c55e;
  --fasting-end:   #166534;
  /* Brand — eating (ambers) */
  --eating-start:  #d97706;
  --eating-end:    #9a3412;

  /* Surface (light) */
  --bg-top:        #f5f7f2;
  --bg-bottom:     #e8ede6;
  --text-primary:  #0f172a;
  --text-secondary: rgba(15, 23, 42, 0.70);
  --text-tertiary:  rgba(15, 23, 42, 0.55);
  --card-fill:     rgba(15, 23, 42, 0.04);
  --card-fill-strong: rgba(15, 23, 42, 0.07);
  --card-stroke:   rgba(15, 23, 42, 0.10);
  --shadow:        0 18px 40px rgba(15, 23, 42, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top:        #0a1f18;
    --bg-bottom:     #020604;
    --text-primary:  #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --text-tertiary:  rgba(255, 255, 255, 0.50);
    --card-fill:     rgba(255, 255, 255, 0.05);
    --card-fill-strong: rgba(255, 255, 255, 0.08);
    --card-stroke:   rgba(255, 255, 255, 0.10);
    --shadow:        0 18px 40px rgba(0, 0, 0, 0.45);

    /* Slightly brighter accents in dark, matching the app's adaptive palette */
    --eating-start:  #fbbf24;
    --eating-end:    #c2410c;
  }
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

html, body {
  background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Decorative blur blob, echoing PageChrome in the app */
body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  top: -180px;
  left: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--fasting-start), var(--fasting-end));
  filter: blur(120px);
  opacity: 0.30;
  pointer-events: none;
  z-index: -1;
}

/* Layout */
.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  padding: 22px 0 8px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(22, 101, 52, 0.30);
}
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--text-primary); }

/* Hero */
.hero {
  padding: 56px 0 28px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--fasting-start), var(--fasting-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-secondary);
}

/* CTA — Coming Soon to the App Store */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 14px 22px 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--fasting-start), var(--fasting-end));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(22, 101, 52, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(22, 101, 52, 0.40);
}
.cta:active { transform: translateY(0); }
.cta-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: #fff;
}
.cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  text-align: left;
}
.cta-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.cta-title { font-size: 17px; font-weight: 700; }
.cta-note {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Sections */
.section {
  padding: 56px 0;
}
.section h2 {
  font-size: clamp(26px, 4.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section .lede {
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 32px;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .features { grid-template-columns: 1fr 1fr 1fr; }
}

.card {
  padding: 22px;
  border-radius: 22px;
  background: var(--card-fill);
  border: 1px solid var(--card-stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--text-secondary);
  font-size: 15px;
}
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--fasting-start), var(--fasting-end));
  color: #fff;
  font-size: 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px rgba(22, 101, 52, 0.30);
}
.card.eating .icon {
  background: linear-gradient(135deg, var(--eating-start), var(--eating-end));
  box-shadow: 0 8px 18px rgba(154, 52, 18, 0.30);
}

/* Privacy pitch panel */
.privacy-pitch {
  margin-top: 16px;
  padding: 28px;
  border-radius: 24px;
  background: var(--card-fill-strong);
  border: 1px solid var(--card-stroke);
  display: grid;
  gap: 14px;
}
.privacy-pitch h2 {
  font-size: clamp(22px, 4vw, 28px);
  background: linear-gradient(135deg, var(--fasting-start), var(--fasting-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.privacy-pitch p { color: var(--text-secondary); }
.privacy-pitch ul {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.privacy-pitch li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-secondary);
}
.privacy-pitch li::before {
  content: "✓";
  color: var(--fasting-start);
  font-weight: 800;
  flex-shrink: 0;
  width: 18px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding: 36px 0 56px;
  border-top: 1px solid var(--card-stroke);
  font-size: 14px;
  color: var(--text-tertiary);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text-primary); }
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Privacy page typography */
.legal {
  padding: 32px 0 16px;
}
.legal h1 {
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal .effective {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 16px;
}
.legal p { margin-bottom: 12px; }
.legal ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
}
.legal a {
  color: var(--fasting-start);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
  .legal a { color: #4ade80; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
