/* Mand's look on the web: Outfit and the app's colour tokens (Mand/Assets.xcassets/Mand, light and dark).
   One stylesheet for every page, so the CSP can say style-src 'self' with no inline styles. */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg-canvas: #FBF8F1;
  --bg-sheet: #FFFFFF;
  --surface-muted: #F2EEE6;
  --surface-raised: #FFFFFF;
  --surface-placeholder: #E2DCD1;
  --surface-inverse: #16182A;
  --surface-accent-subtle: #ECECFC;
  --surface-plan-subtle: #FFEFE2;
  --border-subtle: #E8E3DA;
  --text-primary: #16182A;
  --text-secondary: #5C5F70;
  --text-tertiary: #6E7082;
  --text-accent: #2A2AD4;
  --text-plan: #A6470D;
  --text-inverse: #FFFFFF;
  --shadow: rgba(22, 24, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-canvas: #141519;
    --bg-sheet: #1C1D23;
    --surface-muted: #2E2F37;
    --surface-raised: #24252C;
    --surface-placeholder: #34353E;
    --surface-inverse: #F2F2F5;
    --surface-accent-subtle: #24244A;
    --surface-plan-subtle: #3A2718;
    --border-subtle: #33343D;
    --text-primary: #F4F4F7;
    --text-secondary: #B4B6C2;
    --text-tertiary: #A2A4B0;
    --text-accent: #A3A3FF;
    --text-plan: #FFB27A;
    --text-inverse: #16182A;
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  /* Body: 17/24, Figma's 0.75 % tracking. */
  font: 400 17px/24px "Outfit", -apple-system, system-ui, sans-serif;
  letter-spacing: 0.0075em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-accent); text-underline-offset: 2px; }

h1, h2, h3 { font-weight: 600; margin: 0; }

/* Title 1: 30/36, -1.5 %. */
h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.015em; }
/* Title 3: 24/30, -1 %. */
h2 { font-size: 24px; line-height: 30px; letter-spacing: -0.01em; }
/* Body strong: 17/24, -0.5 %. */
h3 { font-size: 17px; line-height: 24px; letter-spacing: -0.005em; }

p, ul { margin: 0; }

/* Shared header: the icon and the name. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: block;
  /* The light icon is nearly the canvas colour: a hairline keeps its edge. */
  box-shadow: 0 0 0 1px var(--border-subtle);
}

/* One language at a time. lang.js sets data-lang from the link (#en, #nl) or the device's language;
   without it, English shows unless the link is #nl. */
:root[data-lang="nl"] .lang-en,
:root[data-lang="en"] .lang-nl,
:root:not([data-lang]):has(#nl:target) .lang-en,
:root:not([data-lang]):not(:has(#nl:target)) .lang-nl { display: none; }

/* The switcher: a segmented control, like the app's List / Week. */
.lang-switch {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.lang-switch a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
}
.lang-switch a[aria-current] {
  background: var(--bg-sheet);
  color: var(--text-primary);
  box-shadow: 0 1px 4px var(--shadow);
}
@media (prefers-color-scheme: dark) {
  /* Dark surfaces get lighter as they rise: a sheet-coloured track, a lighter selected segment. */
  .lang-switch { background: var(--bg-sheet); box-shadow: inset 0 0 0 1px var(--border-subtle); }
  .lang-switch a[aria-current] { background: var(--surface-placeholder); box-shadow: none; }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Invite page ---------- */

.invite {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  min-height: 100svh;
}

@media (min-width: 760px) {
  .invite { padding-top: 48px; gap: 32px; }
}

.card {
  background: var(--bg-sheet);
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 6px 22px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (prefers-color-scheme: dark) {
  .card { box-shadow: none; border: 1px solid var(--border-subtle); }
}

.card .eyebrow {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.0025em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.card .lede { color: var(--text-secondary); }

/* The sample list: what Mand looks like, in two lines. */
.sample {
  list-style: none;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-muted);
  font-size: 16px;
  line-height: 22px;
  display: grid;
  gap: 6px;
}
.sample li { display: flex; align-items: center; gap: 10px; }
.sample li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--text-tertiary);
}
.sample .dish { font-weight: 600; }
.sample .ingredient { padding-left: 28px; color: var(--text-secondary); }

.steps {
  padding-left: 22px;
  display: grid;
  gap: 6px;
  color: var(--text-primary);
}

/* Onboarding's primary button: 54 pt, surface/inverse, radius 14. */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
}
.button:active { opacity: 0.75; }

.fine {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.0025em;
  color: var(--text-tertiary);
}

.footer {
  margin-top: auto;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer a { color: var(--text-secondary); }

/* ---------- Privacy policy ---------- */

.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}
@media (min-width: 760px) { .doc { padding-top: 48px; } }

.doc article { margin-top: 40px; }

.doc h1 { margin-bottom: 8px; }
.doc .updated { color: var(--text-tertiary); font-size: 14px; line-height: 20px; }
.doc .summary {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface-accent-subtle);
}
.doc .summary ul { padding-left: 20px; display: grid; gap: 4px; }
.doc section { margin-top: 32px; }
.doc section h2 { font-size: 20px; line-height: 26px; margin-bottom: 10px; }
.doc section p + p, .doc section p + ul, .doc section ul + p { margin-top: 10px; }
.doc section ul { padding-left: 20px; display: grid; gap: 6px; }
.doc .processors { list-style: none; padding: 0; }
.doc .processors li {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-sheet);
  border: 1px solid var(--border-subtle);
}
.doc .processors strong { font-weight: 600; }
.doc .processors span { display: block; color: var(--text-secondary); font-size: 15px; line-height: 20px; }

/* Draft markers for Tommy's review: anything legal that isn't settled. Remove before deploying. */
.verify {
  background: var(--surface-plan-subtle);
  color: var(--text-plan);
  font-weight: 600;
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.placeholder {
  background: var(--surface-plan-subtle);
  color: var(--text-plan);
  padding: 1px 6px;
  border-radius: 5px;
}

.doc .footer { margin-top: 56px; }


:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .button { transition: opacity 0.15s ease-out; }
}

/* ---------- Home page ---------- */

/* Which store the buttons point to: <html data-store="testflight|appstore"> in index.html. */
:root:not([data-store="appstore"]) .store-appstore,
:root[data-store="appstore"] .store-testflight { display: none; }

/* Light and dark versions of the same screenshot or demo, where <picture> can't choose (video). */
.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .on-light { display: none; }
  .on-dark { display: block; }
}

.home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  /* The hero's glow reaches past the edges; clip it, so a phone never scrolls sideways. */
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.home .page { display: flex; flex-direction: column; gap: 88px; }

.home h2 {
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.02em;
}
.home .lede { color: var(--text-secondary); font-size: 19px; line-height: 28px; }

/* A small label above a heading, in the accent: "The list", "Week". */
.home .eyebrow-tag {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-accent);
}

/* ----- The phone: a real screenshot or recording in an iPhone-shaped frame ----- */

.device {
  position: relative;
  flex: none;
  width: min(280px, 70vw);
  padding: 8px;
  border-radius: 46px;
  background: #0E0F14;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 24px 60px var(--shadow), 0 2px 6px var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .device { box-shadow: 0 0 0 1px var(--border-subtle), 0 24px 60px var(--shadow); }
}
/* The screen's own corners: the iPhone's display radius at this width. */
.device img,
.device video {
  width: 100%;
  vertical-align: top;
  height: auto;
  border-radius: 38px;
  background: var(--bg-canvas);
}

/* ----- Hero ----- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hero-text { display: flex; flex-direction: column; gap: 18px; }
.hero h1 {
  font-size: 42px;
  line-height: 46px;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.get { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* The demo sits on a soft glow of the app's two accents. */
.demo {
  position: relative;
  isolation: isolate;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.demo::before {
  content: "";
  position: absolute;
  inset: -12% -30% 8%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 35% 40%, var(--surface-accent-subtle), transparent),
    radial-gradient(closest-side at 70% 65%, var(--surface-plan-subtle), transparent);
}
.demo figcaption {
  max-width: 280px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-tertiary);
}
/* Pause and play for the looping demo (home.js shows it). */
.demo-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 24, 42, 0.72);
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-toggle[hidden] { display: none; }
.demo-toggle svg { width: 18px; height: 18px; }
.demo-toggle .icon-play,
.demo-toggle[data-paused] .icon-pause { display: none; }
.demo-toggle[data-paused] .icon-play { display: block; }

/* ----- The facts under the hero ----- */

.facts {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}
.facts svg { flex: none; width: 22px; height: 22px; color: var(--text-accent); }

/* ----- Feature rows: words, then a big tinted panel with the phone ----- */

.feature-row { display: flex; flex-direction: column; gap: 28px; }
.feature-text { display: flex; flex-direction: column; gap: 12px; }
.feature-text p { color: var(--text-secondary); font-size: 18px; line-height: 27px; }

.panel {
  position: relative;
  border-radius: 32px;
  padding: 40px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}
.tint-accent { background: var(--surface-accent-subtle); }
.tint-plan { background: var(--surface-plan-subtle); }
.tint-muted { background: var(--surface-muted); }

/* Callouts: what to look at in the screenshot. On a phone they're labels under it. */
.callouts {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.callouts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--bg-sheet);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  box-shadow: 0 2px 8px var(--shadow);
}
.callouts li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-accent);
}

/* The household picture: a list card and its toast, from the app, on the app's own canvas. */
.panel-together { background: var(--bg-canvas); border: 1px solid var(--border-subtle); }
.panel.panel-together { align-items: center; }
.together {
  display: block;
  width: min(420px, 100%);
  height: auto;
  border-radius: 20px;
}

/* ----- The details: a small grid of tiles ----- */

.details { display: flex; flex-direction: column; gap: 24px; }
.tiles { display: grid; gap: 12px; }
.tile {
  background: var(--bg-sheet);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (prefers-color-scheme: dark) {
  .tile { border: 1px solid var(--border-subtle); }
}
.tile h3 { font-size: 19px; line-height: 26px; letter-spacing: -0.01em; }
.tile p { color: var(--text-secondary); }
.tile svg { width: 28px; height: 28px; color: var(--text-accent); margin-bottom: 4px; }
/* The offline tile shows the app's own banner: the top of the screen, framed like a phone's. */
.tile-offline { padding-bottom: 0; overflow: hidden; }
.tile-offline .shot {
  display: block;
  margin-top: auto;
  padding-top: 12px;
}
.tile-offline .shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

/* ----- How it works: three steps with big numbers ----- */

.how { display: flex; flex-direction: column; gap: 28px; }
.how-steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 28px;
  counter-reset: step;
}
.how-steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 18px;
  line-height: 26px;
}
.how-steps li::before {
  content: "0" counter(step);
  font-size: 44px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-accent);
}

/* ----- The last call to action ----- */

.cta {
  border-radius: 32px;
  padding: 40px 24px;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.cta picture { display: block; }
.cta img { display: block; width: 64px; height: 64px; border-radius: 15px; }
.cta h2 { font-size: 34px; line-height: 40px; }
.cta .lede { color: inherit; opacity: 0.78; }
.cta .fine { color: inherit; opacity: 0.68; }
/* On the inverse panel the button flips: canvas on ink. */
.cta .button { background: var(--bg-canvas); color: var(--text-primary); align-self: stretch; }
.cta :focus-visible { outline-color: var(--bg-canvas); }

.home .footer { padding-top: 24px; border-top: 1px solid var(--border-subtle); }

/* ----- Wider screens ----- */

@media (min-width: 760px) {
  .home { padding-top: 40px; gap: 64px; }
  .home .page { gap: 128px; }
  .home h2 { font-size: 44px; line-height: 50px; letter-spacing: -0.025em; }

  .hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; min-height: 640px; }
  .hero-text { max-width: 540px; }
  .hero h1 { font-size: 68px; line-height: 70px; }
  .hero .lede { font-size: 21px; line-height: 31px; }
  .get { align-items: flex-start; }
  .demo { margin: 0 32px 0 0; }
  .demo .device { width: 300px; }

  .facts { grid-template-columns: repeat(4, auto); justify-content: space-between; padding: 24px 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }

  .feature-row { display: grid; grid-template-columns: 5fr 6fr; align-items: center; gap: 64px; }
  .feature-row.flip { grid-template-columns: 6fr 5fr; }
  .feature-row.flip .feature-text { order: 2; }
  .feature-text { max-width: 440px; }
  .feature-text p { font-size: 19px; line-height: 29px; }

  .panel { padding: 48px 40px 32px; }
  .panel .device { width: 260px; }


  .tiles { grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; gap: 16px; }
  .tile-offline { grid-row: span 2; }
  .tile-wide { grid-column: span 2; }

  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }

  .cta { padding: 64px; display: grid; grid-template-columns: auto 1fr; column-gap: 32px; align-items: center; }
  .cta > * { grid-column: 2; }
  .cta picture { grid-column: 1; grid-row: 1 / span 5; align-self: start; }
  .cta img { width: 96px; height: 96px; border-radius: 22px; }
  .cta h2 { font-size: 48px; line-height: 54px; }
  .cta .button { align-self: start; justify-self: start; }
}

/* Callouts point at their line in the screenshot, from beside the phone, once the panel is wide enough
   for the longest label (Dutch); narrower, they stay chips under the phone. */
@media (min-width: 1100px) {
  .panel { padding: 56px 40px; align-items: flex-start; }
  .panel .device { margin-left: 8px; }
  .panel .callouts { display: contents; }
  .panel .callouts li {
    position: absolute;
    left: calc(40px + 8px + 260px + 28px);
    top: calc(56px + 8px + (100% - 112px - 16px) * var(--at, 0.5));
    transform: translateY(-50%);
    max-width: 200px;
  }
  /* A leader line from the label to the phone. */
  .panel .callouts li::after {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    width: 52px;
    border-top: 1.5px solid var(--text-accent);
  }
  /* Where each label points: a share of the screenshot's height, below the panel's and the frame's padding. */
  .at-27 { --at: 0.27; }
  .at-29 { --at: 0.29; }
  .at-43 { --at: 0.43; }
  .at-46 { --at: 0.46; }
  .at-52 { --at: 0.52; }
  .at-68 { --at: 0.68; }
  .at-70 { --at: 0.70; }
  .at-74 { --at: 0.74; }
}

/* ----- Motion: the phone rises in, and sections fade up as they scroll in (CSS only) ----- */

@media (prefers-reduced-motion: no-preference) {
  .demo .device { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
  }
  @supports (animation-timeline: view()) {
    .feature-row, .tile, .how-steps li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
  .tile { transition: transform 0.2s ease-out; }
  .tile:hover { transform: translateY(-2px); }
}

/* ---------- Landing pages (/plannen, /recepten, /verspilling) and the waitlist ---------- */

/* The headline is a full promise, longer than the home page's: a step smaller. */
.landing .hero h1 { font-size: 38px; line-height: 42px; }

/* The waitlist form: email and button, the fine print. */
.waitlist { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.field-label { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--text-secondary); }
.field-row { display: flex; flex-direction: column; gap: 10px; }
.field {
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-sheet);
  color: var(--text-primary);
  font: inherit;
  font-size: 17px;
  width: 100%;
}
.field:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 1px; }
.waitlist .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.form-message {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-plan-subtle);
  color: var(--text-plan);
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
}
.form-message a { color: inherit; }
.form-message[hidden] { display: none; }
/* The bots' field: off screen, never tabbed to. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.details .source { margin-top: -8px; }

/* What it costs: Free beside Plus. */
.prices { display: flex; flex-direction: column; gap: 24px; }
.price-cards { display: grid; gap: 12px; }
.price {
  border-radius: 24px;
  padding: 24px;
  background: var(--bg-sheet);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-plus { background: var(--surface-accent-subtle); border-color: transparent; }
.price .amount { font-size: 19px; line-height: 26px; font-weight: 600; }
.price ul { padding-left: 20px; display: grid; gap: 4px; color: var(--text-secondary); }

@media (min-width: 760px) {
  .landing .hero h1 { font-size: 56px; line-height: 60px; }
  .field-row { flex-direction: row; }
  .field-row .field { flex: 1; }
  .field-row .button { flex: none; }
  .price-cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .price { padding: 32px; }
}
