/* WhenCanIEat -- shared stylesheet
   Plain CSS, no build step. Mobile-first. Light + dark via prefers-color-scheme. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f9f7;
  --surface: #f6faf8;
  --text: #101815;
  --text-muted: #5f6e68;
  --border: #eaf1ed;
  --accent: #12b981;
  --accent-dark: #0e9f6e;
  --accent-soft: #ddf6ec;
  --accent-contrast: #ffffff;
  --success: #12b981;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16, 24, 21, 0.05), 0 8px 24px -12px rgba(16, 24, 21, 0.18);
  --max-width: 1120px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1613;
    --bg-alt: #142019;
    --surface: #182620;
    --text: #eaf5ef;
    --text-muted: #9fb3aa;
    --border: #2a3a32;
    --accent: #34d399;
    --accent-dark: #4fd1a5;
    --accent-soft: #16332a;
    --accent-contrast: #0b1310;
    --success: #34d399;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

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

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

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand .mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex-shrink: 0;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
}

.main-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (min-width: 820px) {
  .main-nav {
    display: flex;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

@media (min-width: 820px) {
  .nav-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  display: block;
  padding: 10px 4px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 820px) {
  .mobile-nav { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.1;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--accent-contrast);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 56px 0 48px;
}

.hero .container {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-tagline {
  margin-top: 18px;
  font-weight: 700;
  color: var(--text);
}

/* Timer mock visual */
.timer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
}

.timer-card .timer-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.timer-card .timer-clock {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.timer-card .timer-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.timer-card .timer-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.timer-card .timer-window {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 32px;
}

.section-head p {
  color: var(--text-muted);
}

.section-alt {
  background: var(--bg-alt);
}

/* Pillars */
.pillars {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .pillars {
    grid-template-columns: 1fr 1fr;
  }
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 16px;
}

.pillar-card h3 {
  margin-bottom: 10px;
}

.pillar-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.pillar-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pillar-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pillar-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--success);
  margin-top: 3px;
}

/* Steps */
.steps {
  display: grid;
  gap: 24px;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  padding-left: 52px;
}

.step .step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Pricing / comparison */
.pricing-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.price-card.is-plus {
  border-color: var(--accent);
  position: relative;
}

.price-card .plan-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.price-card .plan-price {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 6px 0 2px;
}

.price-card .plan-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.price-card .plan-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.price-card ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.price-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.96rem;
}

.price-card li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--success);
  margin-top: 3px;
}

.badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.pricing-fineprint {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Final CTA band */
.cta-band {
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-lg);
  padding: 44px 28px;
  text-align: center;
}

.cta-band h2, .cta-band p {
  color: var(--accent-contrast);
}

.cta-band p {
  opacity: 0.92;
}

.cta-band .btn-primary {
  background: var(--accent-contrast);
  color: var(--accent-dark);
}

.cta-band .btn-primary:hover {
  background: var(--accent-contrast);
  opacity: 0.9;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-brand .mark {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.footer-grid p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 40ch;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* Page header (inner pages) */
.page-hero {
  padding: 44px 0 8px;
}

.page-hero .eyebrow {
  margin-bottom: 14px;
}

.page-hero .hero-lede {
  max-width: 60ch;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent-dark);
}

/* Prose / legal + guide content */
.prose {
  max-width: 74ch;
}

.prose h2 {
  margin-top: 2em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul, .prose ol {
  color: var(--text-muted);
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose p {
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 22px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.meta-line {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 78ch;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chev {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-item[open] summary .chev {
  transform: rotate(180deg);
}

.faq-item p, .faq-item ul {
  color: var(--text-muted);
  padding-bottom: 18px;
}

/* Guide grid (fasting hub) */
.guide-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 700px) {
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

.guide-card:hover {
  border-color: var(--accent);
  color: var(--text);
}

.guide-card .guide-schedule {
  font-weight: 800;
  color: var(--accent-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.guide-card .read-more {
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Example day table */
.day-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.day-table th, .day-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.day-table th {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-table tr:last-child td {
  border-bottom: none;
}

/* Comparison table (feature detail, used on index) */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-table th, .compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.94rem;
}

.compare-table thead th {
  background: var(--bg-alt);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

/* get/ router page */
.router-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 560px;
}

.router-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.router-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.router-option svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex-shrink: 0;
}

.router-option .router-option-body {
  flex-grow: 1;
}

.router-option h3 {
  margin-bottom: 2px;
  font-size: 1.02rem;
}

.router-option p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

noscript .router-card {
  margin-top: 20px;
}

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
