/* ==========================================================================
   MealMaxx — brand foundation
   Sharp white ground, near-black ink, one confident green. High contrast,
   crisp edges — cards read by border and shadow rather than by a tinted page.
   Accents track MealMaxx/Theme/Aurora.swift so the site and the app agree.
   ========================================================================== */

:root {
  /* MealMaxx commits to a single light world on purpose. Declaring the scheme keeps
     the UA from auto-darkening form controls for viewers whose OS is in dark mode. */
  color-scheme: light;

  /* Grounds — pure white page; cards read by border and shadow, not by tint */
  --paper:        #FFFFFF;
  --paper-2:      #F3F6F4;
  --card:         #FFFFFF;

  /* Ink — a true black with barely enough green in it to sit with the accent */
  --ink:          #0B0F0D;
  --muted:        #5B655F;
  --faint:        #8B958F;

  /* Lines */
  --border:       #E4E9E6;
  --border-strong:#C6D0CA;

  /* Accents — taken from the app's Aurora palette so the two match */
  --green:        #0E9A4E;
  --green-dark:   #0B5C30;
  --green-tint:   #EDFAF1;
  --amber:        #D9A21B;
  --blue:         #2E86DE;
  --track:        #EDF2EE;

  /* Type */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body:    "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;

  /* Shape */
  --r-card:  20px;
  --r-soft:  16px;
  --r-chip:  999px;

  /* Shadow — low and neutral, mixed from the ink so edges stay crisp. */
  --shadow-sm: 0 1px 2px rgba(11,15,13,.04), 0 2px 8px rgba(11,15,13,.04);
  --shadow-md: 0 2px 4px rgba(11,15,13,.04), 0 12px 28px rgba(11,15,13,.07);
  --shadow-lg: 0 4px 8px rgba(11,15,13,.05), 0 28px 60px rgba(11,15,13,.11);

  /* Rhythm */
  --gut: clamp(20px, 5vw, 32px);
  --max: 1140px;
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.15rem); }
h2 { font-size: clamp(1.95rem, 4.2vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.42rem); letter-spacing: -0.016em; }
p  { margin: 0; }

/* ------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 760px; }
section { padding-block: clamp(64px, 9vw, 116px); }

.lede {
  font-size: clamp(1.09rem, 1.65vw, 1.28rem);
  color: var(--muted);
  line-height: 1.55;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav-in {
  display: flex; align-items: center; gap: 14px;
  height: 70px;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gut);
}
/* The wordmark is a single image lockup (icon + type), so it sizes by height
   and keeps its own aspect ratio — no gap, no separate text node. */
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand img { height: 30px; width: auto; display: block; }
.foot .brand img { height: 34px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-size: 1rem; font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--r-chip);
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 1px 2px rgba(11,92,48,.18), 0 8px 20px rgba(14,154,78,.22);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost {
  background: var(--card); color: var(--ink);
  border-color: var(--border); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-sm { padding: 10px 20px; font-size: .93rem; }

/* -------------------------------------------------------------- chips */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-tint);
  border: 1px solid rgba(14,154,78,.16);
  padding: 7px 15px; border-radius: var(--r-chip);
}
.eyebrow.neutral { color: var(--muted); background: var(--paper-2); border-color: var(--border); }

/* -------------------------------------------------------------- cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: 30px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); }

/* ------------------------------------------------------- email capture */
.capture { display: flex; gap: 10px; flex-wrap: wrap; }
.capture input {
  flex: 1 1 250px; min-width: 0;
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.capture input::placeholder { color: var(--faint); }
.capture input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(14,154,78,.12);
}
.capture-note {
  margin-top: 12px; font-size: .87rem; color: var(--faint);
  display: flex; align-items: center; gap: 7px;
}

/* -------------------------------------------------------------- misc */
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }
.stat-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.7rem); letter-spacing: -0.03em; line-height: 1;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ------------------------------------------------------------- footer */
.foot { background: var(--paper-2); border-top: 1px solid var(--border); padding-block: 60px 44px; }
.foot-grid { display: grid; gap: 36px; grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot h4 {
  font-family: var(--body); font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 14px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* email addresses are single unbreakable tokens — without this they set a min-content
   floor on the grid column and force the whole page to scroll sideways on small phones */
/* `anywhere` split the support address mid-domain (…gmail.co / m). `break-word`
   keeps the atom whole and wraps at the @ when the column is too narrow. */
.foot a { color: var(--muted); text-decoration: none; font-size: .94rem; overflow-wrap: break-word; }
.foot a:hover { color: var(--ink); }
.foot-base {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .86rem; color: var(--faint);
}

/* ------------------------------------------------------------ reveal */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .rise.in { opacity: 1; transform: none; }
}
