/* MealDeals marketing site — shared styles.
 *
 * Brand palette matches the app theme (mobile/lib/src/theme/app_theme.dart):
 * forest green #2E7D32 seed, bright green #74D67E. Warm orange CTA.
 *
 * Deliberately self-contained: a system font stack (no webfont CDN) avoids the
 * well-known German Google-Fonts GDPR liability, and there is no analytics or
 * third-party script, so the page loads with zero cross-origin requests. Any
 * analytics added later must be consent-gated (see docs/web-landing.md). */

:root {
  --brand: #2e7d32;
  --brand-bright: #43a047;
  --brand-dark: #1b5e20;
  --accent: #f97316;
  --accent-dark: #ea580c;

  --bg: #ffffff;
  --bg-alt: #f2f8f2;
  --surface: #ffffff;
  --border: #d8e6d8;
  --text: #12241a;
  --text-muted: #4c5c50;
  --shadow: 0 8px 24px rgba(18, 36, 26, 0.08);

  --maxw: 1120px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #74d67e;
    --brand-bright: #8ee397;
    --brand-dark: #205227;
    --accent: #fb923c;
    --accent-dark: #f97316;

    --bg: #0f1311;
    --bg-alt: #141816;
    --surface: #1c2220;
    --border: #313833;
    --text: #e4e6e2;
    --text-muted: #bcc4bd;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Focus visibility for keyboard navigation. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}
.brand .mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 9px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}
@media (max-width: 760px) {
  .nav .nav-link {
    display: none;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 16px;
}
.hero .lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 34ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.badge-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
/* Placeholder store badges — swap for the official Play / App Store artwork
   once store listings exist (#1037, #1038). */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero .lead {
    margin-inline: auto;
  }
  .hero-cta,
  .badge-row {
    justify-content: center;
  }
}

/* Colored placeholder phone mockup (imagery is added later — #733). */
.phone {
  justify-self: center;
  width: 260px;
  height: 540px;
  border-radius: 36px;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  border: 10px solid color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: 24px;
}
.phone span {
  font-size: 14px;
  opacity: 0.85;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section {
  padding: 64px 0;
}
.section-head {
  text-align: center;
  max-width: 40ch;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 10px;
}
.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.steps {
  counter-reset: step;
}
.step .num {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ── Premium ────────────────────────────────────────────────────────────── */
.premium {
  background: var(--bg-alt);
}
.price-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
}
.price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  text-align: left;
  display: inline-block;
}
.price-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  color: var(--text);
}
.price-card li svg {
  flex: none;
  color: var(--brand);
  margin-top: 3px;
}
.note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ── Premium flow (premium.html, premium/manage.html — #1073) ──────────── */
.flow-note {
  max-width: 460px;
  margin: 0 auto 20px;
  text-align: center;
}
.alert-error {
  background: color-mix(in srgb, #dc2626 12%, var(--bg));
  border: 1px solid #dc2626;
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 0.95rem;
}
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.form-field {
  margin: 14px 0;
}
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.form-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* >=16px prevents iOS zoom-on-focus */
}
.form-field input:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 1px;
}
.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  cursor: pointer;
}
.linklike:hover {
  text-decoration: underline;
}
.plan-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 760px;
  margin: 0 auto;
}
.plan-grid .price-card {
  margin: 0;
  max-width: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}

/* ── Legal pages ────────────────────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.legal h1 {
  font-size: 2rem;
}
.legal h2 {
  font-size: 1.25rem;
  margin-top: 32px;
}
.legal p,
.legal li {
  color: var(--text);
}
.placeholder-banner {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 28px;
  color: var(--text);
  font-size: 0.95rem;
}
.back-link {
  display: inline-block;
  margin-top: 8px;
}
