/* CAVTAR landing — palette and type lifted from the app (cavtar-frontend/src/App.jsx). */
:root {
  --paper: #F4F2EC;
  --card: #FBFAF6;
  --ink: #211D17;
  --ink-soft: #55503F;
  --line: #E2DCCE;
  --chili: #A8341F;
  --chili-soft: #F0E0D8;
  --herb: #5C6B3C;
  --herb-soft: #E7EADD;
  --display: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

a { color: var(--chili); }

/* ---- header ---- */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 3px;
  color: var(--chili);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark sup { font-size: 1rem; font-weight: 700; color: var(--ink-soft); margin-left: 1px; }
.header-cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--chili);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--chili);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background 0.15s, color 0.15s;
}
.header-cta:hover {
  background: var(--chili);
  color: #fff;
  text-decoration: none;
}

/* ---- shared bits ---- */
section { padding: 64px 0; }
.eyebrow {
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--chili);
  margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--display); margin: 0; }
h2 { font-weight: 800; font-size: clamp(1.625rem, 5vw, 2.25rem); letter-spacing: -0.5px; line-height: 1.1; margin-bottom: 14px; }
.section-intro { color: var(--ink-soft); font-size: 1rem; max-width: 560px; margin: 0 0 36px; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
  padding: 15px 28px;
  border-radius: 14px;
  border: none;
  background: var(--chili);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { opacity: 1; border-color: var(--ink-soft); }

.quiet { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 12px; }

/* Placeholder blocks standing in for app screenshots — replace later. */
.shot-placeholder {
  border: 2px dashed var(--line);
  border-radius: 18px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.4px;
  padding: 18px;
}

/* ---- photos ---- */
.hero-photo {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 18px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
}
.section-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 6px 0 32px;
}
.step-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 14px;
}
.value-photo {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 16px;
  margin-top: 28px;
}
.mode-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.mode-strip figure { margin: 0; }
.mode-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}
.mode-strip figcaption {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.84375rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 8px;
}

/* ---- hero ---- */
.hero { padding: 56px 0 72px; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.25rem, 8vw, 3.625rem);
  letter-spacing: -1.5px;
  line-height: 1.04;
  margin: 0 0 18px;
}
.hero .subhead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 28px;
}
.hero-shot {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-top: 44px;
  margin-left: auto;
  margin-right: auto;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  cursor: zoom-in;
}
.shot-caption {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 0;
}

/* ---- lightbox (app screenshot click-to-enlarge) ---- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 17, 12, 0.82);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* ---- how it works ---- */
.steps { display: grid; gap: 28px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--herb-soft);
  color: var(--herb);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { font-weight: 800; font-size: 1.1875rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---- features ---- */
.features { display: grid; gap: 14px; }
.feature {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
}
/* Per-card Mediterranean tints, light enough to keep AA contrast for --ink-soft body text. */
.features .feature:nth-child(1) { background: #F8EAE4; } /* five modes — pale terracotta */
.features .feature:nth-child(2) { background: #DEF0E9; } /* languages — soft aegean */
.features .feature:nth-child(3) { background: #F8EDD2; } /* avoid list — warm sand */
.features .feature:nth-child(4) { background: #F6E7ED; } /* favorites — palest rose */
.features .feature:nth-child(5) { background: #E9EBD9; } /* works where you cook — soft olive */
.feature h3 { font-weight: 800; font-size: 1.0625rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* ---- value ---- */
.value {
  background: var(--herb-soft);
  border-radius: 22px;
  padding: 44px 28px;
}
.value h2 { color: var(--herb); }
.value p { max-width: 620px; margin: 0; font-size: 1.0625rem; }

/* ---- pricing ---- */
.plans { display: grid; gap: 16px; }
.plan {
  position: relative;
  background: var(--card);
  border: 1.5px solid #D8D0BE;
  border-radius: 18px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(33,29,23,0.05);
}
.plan h3 { font-weight: 800; font-size: 1.125rem; margin-bottom: 4px; }
.plan .price { font-family: var(--display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.5px; }
.plan .price .per { font-size: 0.875rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0; }
.plan .alt-price { font-size: 0.84375rem; color: var(--ink-soft); margin: 2px 0 14px; }
.plan .allowance { font-weight: 700; font-size: 0.90625rem; margin: 0 0 8px; }
.plan .pitch { margin: 0 0 20px; color: var(--ink-soft); font-size: 0.90625rem; flex-grow: 1; }
.plan .btn { text-align: center; font-size: 0.9375rem; padding: 13px 18px; }
.plan-popular { border: 2px solid var(--chili); }
.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--chili);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.trial-note { text-align: center; color: var(--ink-soft); font-size: 0.875rem; margin-top: 24px; }
/* Paid plans hidden until Stripe goes live: one centered Free card + note. */
.plans.plans-solo { grid-template-columns: minmax(0, 360px); justify-content: center; }
.coming-soon { color: var(--ink); font-weight: 700; font-size: 1rem; }

/* ---- FAQ ---- */
.faq details {
  background: var(--card);
  border: 1.5px solid #D8D0BE;
  border-radius: 16px;
  padding: 0 22px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.375rem; color: var(--ink-soft); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ---- footer ---- */
.site-footer {
  border-top: 1.5px solid var(--line);
  margin-top: 24px;
  padding: 36px 0 44px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.footer-links a { color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .legal { font-size: 0.78125rem; margin-top: 10px; }

/* ---- inner pages (terms / privacy / support) ---- */
.page { padding: 48px 0 72px; min-height: 55vh; }
.page h1 { font-weight: 800; font-size: clamp(28px, 6vw, 40px); letter-spacing: -1px; margin: 6px 0 18px; }
.page-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  max-width: 620px;
}
.page-card p { margin: 0 0 14px; color: var(--ink-soft); }
.page-card p:last-child { margin-bottom: 0; }
.support-email {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(18px, 4.5vw, 24px);
  color: var(--chili);
  margin: 6px 0 10px;
  word-break: break-all;
}

/* ---- wider screens ---- */
/* ---- install section ("Put CAVTAR on your phone") ---- */
/* The icon sits beside the heading rather than above it, so the heading keeps
   its normal left edge and the row reads as one unit. */
.install-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.install-head h2 { margin-bottom: 0; }
.install-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(33, 29, 23, 0.14);
}
.install-steps { display: grid; gap: 14px; }
.install-step {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
}
.install-step h3 { font-weight: 800; font-size: 1.0625rem; margin-bottom: 6px; }
.install-step p { color: var(--ink-soft); font-size: 0.9375rem; margin: 0; }
/* The CTA leads the section -- both columns start "Tap Open the app" -- so it
   uses the solid primary .btn, and sits between the intro and the columns. */
.install-cta { margin-bottom: 28px; }

@media (min-width: 640px) {
  section { padding: 84px 0; }
  .hero { padding: 76px 0 90px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .step { flex-direction: column; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .install-steps { grid-template-columns: repeat(2, 1fr); }
  .feature-wide { grid-column: 1 / -1; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .value { padding: 56px 48px; }
  .mode-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1000px) {
  .plans { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
  .plan-popular { transform: translateY(-8px); box-shadow: 0 10px 28px rgba(33, 29, 23, 0.10); }
}

/* ---- narrow phones: keep header from colliding ---- */
@media (max-width: 520px) {
  .wordmark { font-size: 1.875rem; letter-spacing: 2px; }
  .header-cta { font-size: 0.8125rem; padding: 6px 14px; }
}

/* ---- legal documents (/terms/, /privacy/) ----
   Lifted verbatim from the <style> block that ships with the generated Terms
   and Privacy fragments (both blocks were byte-identical). Kept here so the two
   pages share one copy. Scoped to article.legal, not bare .legal: the footer's
   copyright line is a div.legal, and these rules must never touch it. */
article.legal { max-width: 46rem; margin: 0 auto; line-height: 1.6; }
article.legal h1 { margin-bottom: .25rem; }
article.legal .legal-updated { font-style: italic; margin-top: 0; margin-bottom: 1.5rem; }
article.legal h2 { font-size: 1.15em; margin-top: 1.75rem; margin-bottom: .5rem; }
article.legal .legal-sub { margin-left: 1.25rem; }
article.legal .legal-sub p { margin: 0 0 .75rem; }
article.legal a { overflow-wrap: anywhere; }

/* Language switch above the legal documents ("English · Français"). The
   current language is plain text and only the other one is a link, so the
   pair reads as a single line rather than two competing buttons. Sits
   between the eyebrow and the document title. */
.lang-switch { font-size: 0.875rem; margin: -4px 0 18px; color: var(--ink-soft, #5a5048); }
.lang-switch a { color: inherit; }
