/* ============================================================================
   Landing page (marketing) styles.
   Reuses the theme tokens defined in app.css :root (--mint, --ink, band colors …);
   this sheet is loaded after app.css so those custom properties cascade in.
   All selectors are scoped under .landing / .lp-* so nothing leaks into the app.
   ============================================================================ */

.landing {
  --lp-max: 1040px;
  color: var(--ink);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  animation: lp-fade 0.5s ease both;
}
@keyframes lp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .landing { animation: none; } }

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

/* back-to-landing link on the auth card */
.lp-back {
  background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  color: var(--muted); padding: 4px 6px; margin: -4px 0 4px -4px; align-self: flex-start;
}
.lp-back:hover { color: var(--mint-deep); }

/* ---------------------------------------------------------------- hero */
.lp-hero {
  background:
    radial-gradient(120% 90% at 50% -10%, var(--mint-tint) 0%, rgba(230, 247, 238, 0) 60%),
    linear-gradient(180deg, var(--mint-tint) 0%, var(--bg) 100%);
  padding: 40px 20px 48px;
  text-align: center;
}
.lp-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mint-deep);
  background: #fff; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
/* Big multicolor tagline — each word its own color */
.lp-tagline {
    font-size: clamp(1.375rem, 5.2vw, 1.8rem);
  font-weight: 800; letter-spacing: -0.01em; line-height: 1.15;
  margin: 0 auto 16px; max-width: 15ch;
}
.lp-tagline span { white-space: nowrap; }

.lp-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  line-height: 1.12; font-weight: 800; margin: 0 auto 14px; max-width: 18ch;
  letter-spacing: -0.02em; color: var(--ink);
}
.lp-hero h1 .accent { color: var(--mint-deep); }
.lp-sub {
  color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.15rem);
  max-width: 46ch; margin: 0 auto 8px; line-height: 1.55;
}
.lp-sub strong { color: var(--ink); font-weight: 700; }

.lp-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.lp-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: 999px; padding: 13px 26px; font-size: 1rem;
  border: 1px solid transparent; transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.lp-btn:active { transform: translateY(1px); }
.lp-btn-primary { background: var(--mint-deep); color: #fff; box-shadow: 0 6px 18px rgba(66, 184, 131, 0.32); }
.lp-btn-primary:hover { background: var(--mint-deep-h); }
.lp-btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.lp-btn-ghost:hover { border-color: var(--mint-deep); color: var(--mint-deep); }
.lp-btn-lg { padding: 15px 34px; font-size: 1.05rem; }
.lp-note { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }

/* Google sign-in mount (rendered by GIS when a client id is configured) */
.lp-google { display: flex; justify-content: center; margin: 4px 0 2px; min-height: 0; }
.lp-google:empty { margin: 0; }

/* Anything the user can click to jump into the app (guest mode) */
.lp-clickable { cursor: pointer; }
.lp-clickable:focus-visible { outline: 2px solid var(--mint-deep); outline-offset: 3px; border-radius: var(--radius); }
.lp-chip.lp-clickable:hover { border-color: var(--mint-deep); color: var(--mint-deep); }
.lp-visual.lp-clickable { transition: box-shadow 0.15s ease, transform 0.12s ease; }
.lp-visual.lp-clickable:hover { transform: translateY(-2px); }
.lp-visual.lp-clickable:hover .lp-panel { box-shadow: 0 16px 36px rgba(35, 50, 56, 0.14); }

/* Live-rendered nutrient table: scroll inside the card so 26 rows don't dominate */
.lp-ntable-scroll { max-height: 340px; overflow-y: auto; }
.lp-ntable-scroll .ntable { margin: 0; }

/* Injected real plate SVGs (app's .plate-svg / .rainbow-svg) */
.lp-plate #lpWheel svg, .lp-plate #lpRainbow svg, .lp-plate #lpPie svg {
  width: 100%; height: auto; max-width: 168px;
}
.lp-plate [data-key] { cursor: pointer; }

/* Hover-detail panel under the plates (reuses the app's .wheel-detail / .wd-* styles) */
.lp-plate-detail { text-align: left; margin: 14px 4px 0; }
.lp-plate-detail.open { background: var(--card); }

/* Sign-up prompt popup (guest hits a signed-in-only / AI feature) */
#signupScrim { z-index: 90; }
.signup-modal {
  position: fixed; inset: 0; z-index: 91;
  display: grid; place-items: center; padding: 20px; pointer-events: none;
}
.signup-modal[hidden] { display: none; }
.signup-modal-card {
  pointer-events: auto; cursor: pointer; width: 100%; max-width: 340px; text-align: center;
  background: var(--card); border-radius: 20px; padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: lp-pop 0.18s ease both;
}
.signup-modal-card:hover { box-shadow: 0 26px 66px rgba(0, 0, 0, 0.32); }
@keyframes lp-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .signup-modal-card { animation: none; } }
.signup-modal-emoji { font-size: 2.2rem; line-height: 1; }
.signup-modal-card h3 { font-size: 1.25rem; font-weight: 800; margin: 10px 0 6px; }
.signup-modal-card p { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.signup-modal-card .btn-block { display: block; width: 100%; }
.signup-exit {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.85rem;
  color: var(--muted); margin-top: 14px; text-decoration: underline;
}
.signup-exit:hover { color: var(--ink); }

/* Typewriter box in the "Type your own recipe" card */
.lp-typebox {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 0 0 12px; min-height: 96px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem;
  line-height: 1.5; color: var(--ink); text-align: left; white-space: pre-line;
}
.lp-typed { white-space: pre-line; }
.lp-caret {
  display: inline-block; width: 2px; height: 1.05em; background: var(--mint-deep);
  margin-left: 1px; vertical-align: -2px; animation: lp-blink 1s steps(1) infinite;
}
@keyframes lp-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lp-caret { animation: none; } }

/* device-framed screenshot mock */
.lp-shot {
  max-width: 420px; margin: 30px auto 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: 0 20px 50px rgba(35, 50, 56, 0.16);
  padding: 14px; text-align: left; overflow: hidden;
}
.lp-shot-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; padding: 4px 6px 12px;
}
.lp-shot-head .dish-emoji { font-size: 1.3rem; }
.lp-shot-head .lp-score { margin-left: auto; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- sections */
.lp-section { padding: 46px 0; }
.lp-section.tint { background: var(--mint-tint); }
.lp-kicker { text-align: center; color: var(--mint-deep); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.lp-section h2 {
  text-align: center; font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.01em; margin: 0 auto 10px; max-width: 20ch;
}
.lp-section .lp-lead { text-align: center; color: var(--muted); max-width: 52ch; margin: 0 auto 30px; line-height: 1.6; }

/* card grid */
.lp-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(35, 50, 56, 0.1); }
.lp-card-ico {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  font-size: 1.5rem; border-radius: 14px; background: var(--mint-tint); margin-bottom: 14px;
}
.lp-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.lp-card p { color: var(--muted); margin: 0; line-height: 1.55; font-size: 0.95rem; }
.lp-card .lp-more { display: block; margin-top: 10px; font-size: 0.85rem; color: var(--mint-deep); font-weight: 600; }

/* chips (section 2) */
.lp-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.lp-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow);
}

/* section-2 visual: nutrient-table mock beside the three plate charts */
.lp-visual {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); margin-top: 6px;
}
@media (max-width: 720px) { .lp-visual { grid-template-columns: 1fr; } }
.lp-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; box-shadow: 0 12px 30px rgba(35, 50, 56, 0.08);
}
.lp-plates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-plate { text-align: center; }
.lp-plate.full { grid-column: 1 / -1; }
.lp-plate .cap { display: block; margin-top: 8px; font-weight: 700; font-size: 0.85rem; }
.lp-plate .cap small { display: block; color: var(--muted); font-weight: 500; font-size: 0.78rem; }

/* CSS mini-charts echoing the app's real plate visuals */
.lp-wheel {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto; position: relative;
  background: conic-gradient(#2e9e93 0 26%, #4db6ac 26% 50%, #86cfc8 50% 68%,
                             #4db6ac 68% 86%, #cfe8e4 86% 100%);
}
.lp-wheel::after { content: ""; position: absolute; inset: 27%; border-radius: 50%;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.lp-wheel .score { position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem; color: var(--mint-deep); z-index: 1; }

.lp-rainbow { width: 132px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.lp-rainbow i { display: block; height: 13px; }

.lp-pie {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(#4db6ac 0 22%, #5bc66a 22% 40%, #ffb547 40% 55%,
                             #ff6b6b 55% 67%, #8b7cf8 67% 80%, #64b5f6 80% 91%, #8d6e63 91% 100%);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------- trust */
.lp-trust { text-align: center; padding: 30px 20px; }
.lp-trust .lp-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.lp-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-weight: 700; font-size: 0.88rem; box-shadow: var(--shadow);
}
.lp-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
.lp-trust p { color: var(--muted); max-width: 48ch; margin: 6px auto 0; line-height: 1.55; }

/* ---------------------------------------------------------------- pricing */
.lp-pricing { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 10px; }
.lp-price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.lp-price-card.feature { border-color: var(--mint-deep); box-shadow: 0 10px 28px rgba(66, 184, 131, 0.18); }
.lp-price-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.lp-price-big { font-size: 2rem; font-weight: 800; color: var(--mint-deep); margin: 6px 0; }
.lp-price-big small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.lp-price-card p { color: var(--muted); margin: 6px 0 0; line-height: 1.55; font-size: 0.92rem; }
.lp-rate { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.lp-rate:last-child { border-bottom: 0; }
.lp-rate b { font-weight: 700; }
.lp-price-foot { color: var(--muted); font-size: 0.82rem; text-align: center; margin-top: 14px; }

/* ---------------------------------------------------------------- final CTA */
.lp-final {
  text-align: center; margin: 12px 20px 0;
  background: linear-gradient(135deg, var(--mint-deep), var(--teal));
  color: #fff; border-radius: 24px; padding: 46px 24px;
}
.lp-final h2 { color: #fff; max-width: 18ch; margin: 0 auto 8px; }
.lp-final p { color: rgba(255, 255, 255, 0.9); margin: 0 auto 22px; max-width: 40ch; }
.lp-final .lp-btn-primary { background: #fff; color: var(--mint-deep); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.lp-final .lp-btn-primary:hover { background: #f3fff9; }

/* ---------------------------------------------------------------- footer */
.lp-footer {
  text-align: center; padding: 34px 20px calc(20px + env(safe-area-inset-bottom));
  color: var(--muted); font-size: 0.88rem;
}
.lp-footer .lp-foot-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lp-footer .lp-foot-brand img { width: 26px; height: 26px; border-radius: 7px; }
.lp-footer a { color: var(--mint-deep); font-weight: 700; text-decoration: none; }
.lp-footer a:hover { text-decoration: underline; }
.lp-footer .lp-tag { display: block; margin-top: 6px; }
