/* ============================================================
   French Bites — Landing page
   Reuses French Bites brand fonts + palette (see css/tokens.css),
   layout inspired by mammouth.ai (clean, centered, generous space).
   Standalone: does NOT import the app's CSS so it can evolve freely.
   ============================================================ */

:root {
  /* Brand palette (mirrors css/tokens.css) */
  --paper: #f4f0e4;
  --paper-deep: #e8e2d4;
  --cream: #ffeed6;
  --ink: #3d2a1a;
  --muted: #6b5040;
  --border: rgba(61, 42, 26, 0.12);
  --shadow: 0 10px 28px rgba(61, 42, 26, 0.1);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Five-tense base colors — match the verb-search matrix (js/app-config.js TENSES). */
  --t-present: #e8c45a;    /* yellow  (= present) */
  --t-passe: #b83248;      /* red     (= passe-compose) */
  --t-imparfait: #5cad6e;  /* green   (= imparfait) */
  --t-futur: #4a78b5;      /* blue    (= futur) */
  --t-conditionnel: #a58ad6; /* purple  (= conditionnel présent) */

  --content-w: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Top nav ---------- */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 5vw, 40px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--border);
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.lp-brand-mark {
  width: 44px;
  height: auto;
  display: block;
}

.lp-brand-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lp-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--cream);
  background: var(--ink);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 80%, #000);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lp-nav-cta:hover {
  transform: translateY(-1px);
  background: #2c1d11;
  box-shadow: 0 8px 20px rgba(61, 42, 26, 0.22);
}

/* ---------- Layout ---------- */
.lp-main {
  width: 100%;
}

.lp-section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 110px) clamp(20px, 5vw, 32px);
  text-align: center;
}

/* ---------- Section 1: hero ---------- */
.lp-hero {
  /* Wider than the body sections so the one-line headline can scale up */
  max-width: 1160px;
  padding-top: clamp(40px, 8vw, 80px);
  container-type: inline-size;
}

.lp-hero-mascot {
  width: clamp(235px, 44.8vw, 325px);
  height: auto;
  display: block;
  margin: 0 auto 9px;
  filter: drop-shadow(0 4px 12px rgba(61, 42, 26, 0.1));
}

.lp-hero-title {
  margin: 0 auto 22px;
  max-width: none;
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 700;
  /* Wide screens: one line, scales to fit (cqi = 1% of .lp-hero inline size) */
  font-size: clamp(1.2rem, 3.5cqi, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Forced line break only shows on small screens */
.lp-br { display: none; }

.lp-hero-lead {
  margin: 0 0 22px;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--muted);
}

/* Five color-coded tense cards — row 1: three, row 2: two */
.lp-tenses {
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lp-tense-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.lp-tense {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 9px;
  /* soft tinted chip; text is the tense color itself */
  background: color-mix(in srgb, var(--tc) 16%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--tc) 22%, transparent);
  color: var(--tc-ink, var(--tc));
  font-family: var(--sans); /* clean sans-serif */
  font-weight: 400;
  font-size: clamp(0.82rem, 2.4vw, 1.02rem);
  letter-spacing: 0.005em;
  line-height: 1.2;
  white-space: nowrap;
}

/* --tc = chip tint base (matrix color); --tc-ink = readable text shade */
.lp-tense--present { --tc: var(--t-present); --tc-ink: #a9790c; }
.lp-tense--passe { --tc: var(--t-passe); --tc-ink: var(--t-passe); }
.lp-tense--imparfait { --tc: var(--t-imparfait); --tc-ink: #3f8e54; }
.lp-tense--futur { --tc: var(--t-futur); --tc-ink: var(--t-futur); }
.lp-tense--conditionnel { --tc: var(--t-conditionnel); --tc-ink: #7e5fc4; }

.lp-hero-tagline {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--ink);
}

/* ---------- Toggle rows ---------- */
.lp-toggles {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lp-toggle {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Row 1 — primary CTA link (width hugs its text) */
.lp-toggle--cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 14px 28px;
  text-decoration: none;
  color: var(--cream);
  background: var(--t-passe);
  border-color: color-mix(in srgb, var(--t-passe) 70%, #000);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lp-toggle--cta:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--t-passe) 84%, #000);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--t-passe) 36%, transparent);
}

.lp-toggle--cta .lp-toggle-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Row 2 — accordion (native <details>): closed hugs the summary text,
   open grows to the reading column. */
.lp-toggle--accordion {
  width: fit-content;
  max-width: min(92vw, 460px);
}

.lp-toggle-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  user-select: none;
}

.lp-toggle-summary::-webkit-details-marker {
  display: none;
}

.lp-toggle-body {
  width: min(86vw, 420px);
  padding: 4px 22px 20px;
  border-top: 1px solid var(--border);
  margin-top: -1px;
  text-align: left;
}

.lp-toggle-body p {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--muted);
}

.lp-toggle-body p:last-child {
  margin-bottom: 0;
}

.lp-toggle-body strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Section 2: Your Toolkit ---------- */
.lp-toolkit {
  max-width: 1040px;
}

.lp-section-lead {
  margin: 0 auto 44px;
  max-width: none;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--muted);
}
@media (min-width: 760px) {
  .lp-section-lead { white-space: nowrap; }
}

.lp-toolkit-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
}

.lp-toolkit-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px;
  min-height: 300px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.lp-toolkit-card-title {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* --- shared demo wrapper inside each card (no inner panel; the card color
       shows through) --- */
.lp-demo {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

/* ===== 1 · Look it up (on the blue card) ===== */
.lp-demo-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.lp-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--cream);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  font-size: 0.85rem;
}
.lp-search-icon { color: var(--muted); font-size: 1rem; }
.lp-search-ph { color: color-mix(in srgb, var(--ink) 45%, transparent); }

.lp-verb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.lp-verb-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 4px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.82rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.lp-verb-chip em { color: var(--muted); font-style: italic; font-size: 0.72rem; }
.lp-verb-chip.is-active {
  background: color-mix(in srgb, var(--t-present) 50%, var(--cream));
  box-shadow: 0 0 0 2px var(--t-present);
}

/* lookup demo fills the card height; spacing spreads so the bottom image
   lines up with the other two cards' bottom content */
.lp-demo--lookup {
  flex: 1;
  justify-content: space-between;
}
.lp-mx-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* ===== 2 · Spell it right (on the white card) ===== */
.lp-demo--quiz { gap: 0; }

.lp-quiz-header {
  padding: 8px 14px;
  background: var(--t-present);
  border-radius: 12px;
  color: var(--ink);
}
.lp-quiz-verbline { display: flex; align-items: center; gap: 6px; }
.lp-quiz-inf { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.lp-quiz-ipa { font-size: 0.78rem; color: color-mix(in srgb, var(--ink) 55%, transparent); }
.lp-quiz-rules {
  margin-left: auto;
  padding: 3px 10px;
  background: #fff;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.lp-quiz-items {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.lp-quiz-item {
  padding: 6px 10px;
  background: var(--paper-deep);
  border-radius: 9px;
}
.lp-quiz-person {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lp-quiz-fr {
  margin: 3px 0 2px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}
.lp-blank {
  display: inline-block;
  width: 54px;
  height: 0.9em;
  margin: 0 3px;
  vertical-align: baseline;
  border-bottom: 2px solid var(--t-present);
}
.lp-quiz-en { margin: 0; font-size: 0.74rem; color: var(--muted); }

/* 3 · Use it for real — scenario grid */
.lp-scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lp-scene {
  margin: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.lp-scene img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.lp-scene figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 10px;
}

.lp-scene-fr {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.lp-scene-en {
  font-size: 0.7rem;
  line-height: 1.25;
  color: var(--muted);
}

.lp-toolkit-card--bleu {
  color: #fff;
  background: #4a78b5;
  border: 1px solid color-mix(in srgb, #3d68a2 70%, #000);
  box-shadow: 0 10px 28px color-mix(in srgb, #4a78b5 42%, transparent);
}

.lp-toolkit-card--blanc {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
}

.lp-toolkit-card--rouge {
  color: #fff;
  background: #b83248;
  border: 1px solid color-mix(in srgb, #9e2a3d 70%, #000);
  box-shadow: 0 10px 28px color-mix(in srgb, #b83248 38%, transparent);
}

.lp-toolkit-card--bleu .lp-toolkit-card-title,
.lp-toolkit-card--rouge .lp-toolkit-card-title {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
}

/* ---------- Placeholder sections ---------- */
.lp-section--placeholder {
  border-top: 1px solid var(--border);
}

.lp-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.lp-section-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.12;
  color: var(--ink);
}

.lp-placeholder-note {
  margin: 0;
  font-style: italic;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

/* ---------- Section 4: Q&A ---------- */
.lp-qa {
  max-width: 720px;
  border-top: 1px solid var(--border);
}

.lp-qa .lp-section-title {
  margin-bottom: 36px;
}

.lp-qa-list {
  display: flex;
  flex-direction: column;
  text-align: left;
  border-top: 1px solid var(--border);
}

.lp-qa-item {
  border-bottom: 1px solid var(--border);
}

.lp-qa-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.35;
  color: var(--ink);
  user-select: none;
}

.lp-qa-q::-webkit-details-marker {
  display: none;
}

.lp-qa-q::after {
  content: "+";
  flex-shrink: 0;
  margin-top: 0.05em;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.lp-qa-item[open] .lp-qa-q::after {
  content: "−";
}

.lp-qa-a {
  padding: 0 4px 20px;
}

.lp-qa-a p,
.lp-qa-a li {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--muted);
}

.lp-qa-a p:last-child,
.lp-qa-a ul:last-child {
  margin-bottom: 0;
}

.lp-qa-a ul {
  margin: 0 0 12px;
  padding-left: 1.15em;
}

.lp-qa-a li {
  margin-bottom: 8px;
}

.lp-qa-a li:last-child {
  margin-bottom: 0;
}

.lp-qa-a strong {
  color: var(--ink);
  font-weight: 600;
}

.lp-qa-a em {
  font-style: italic;
}

/* ---------- Footer ---------- */
.lp-footer {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 8vw, 80px) 20px;
  text-align: center;
}

.lp-footer-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--cream);
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lp-footer-cta:hover {
  transform: translateY(-1px);
  background: #2c1d11;
  box-shadow: 0 12px 28px rgba(61, 42, 26, 0.24);
}

.lp-footer-note {
  margin: 22px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.lp-footer-legal {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.lp-footer-link {
  color: var(--muted);
  font-weight: 400;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
/* Small / portrait phones: let the headline wrap to two lines so it stays
   clearly larger than the lead text instead of shrinking to fit one line. */
@media (max-width: 680px) {
  .lp-hero-title {
    white-space: normal;
    font-size: clamp(1.3rem, 5.6vw, 1.9rem);
    line-height: 1.18;
  }
  .lp-br { display: inline; }

  /* Tricolore must stay horizontal (it's the French flag). On phones it
     becomes a swipe carousel: card 1 prominent, card 2 peeking, no scrollbar. */
  .lp-toolkit-cards {
    flex-wrap: nowrap;
    justify-content: flex-start; /* override centering so scroll starts at card 1 */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: 12px;
  }
  .lp-toolkit-cards::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  .lp-toolkit-card {
    flex: 0 0 68%; /* ~half of the next card peeks on the right */
    scroll-snap-align: start;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
