/* JoyMeals site. The tokens are copied from design/refresh/ds.css, the design system the
   app follows (#781), and the fonts are the same Nunito and Nunito Sans, self-hosted
   (licence in fonts/OFL.txt). The app has no dark theme, so the site has none either:
   oat and green are the brand, not a light-mode default. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/NunitoSans-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Ramps, as in ds.css */
  --green-900: #04382a;
  --green-800: #064e3b;
  --green-700: #125d47;
  --green-600: #1b6b52;
  --green-500: #2f8466;
  --green-200: #b9d5c8;
  --green-100: #d6e7de;
  --green-50: #edf4f0;
  --oat-0: #fffdf8;
  --oat-50: #fbf6ec;
  --oat-100: #f4ecdd;
  --oat-200: #e8dcc6;
  --oat-300: #d6c7ac;
  --oat-600: #7a6b55;
  --oat-700: #5a4e3d;
  --oat-800: #3d3428;
  --oat-900: #241e17;
  --saffron-600: #d9951a;
  --saffron-500: #f4b63f;
  --saffron-200: #fbe2ae;
  --saffron-50: #fef6e4;
  --tomato-700: #b8361f;
  --tomato-600: #d9452e;
  --tomato-500: #e5533d;
  --tomato-200: #f5bcaf;
  --tomato-50: #fdf0ec;

  /* Semantic roles */
  --bg: var(--oat-50);
  --surface: var(--oat-0);
  --surface-sunk: var(--oat-100);
  --line: var(--oat-200);
  --line-strong: var(--oat-300);
  --ink: var(--oat-900);
  --ink-2: var(--oat-700);
  --ink-3: var(--oat-600);
  --primary: var(--green-600);
  --primary-deep: var(--green-800);
  --joy: var(--saffron-500);
  --focus: var(--saffron-500);

  /* Shape and elevation */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --e1: 0 1px 2px rgba(61, 52, 40, 0.06), 0 1px 1px rgba(61, 52, 40, 0.04);
  --e2: 0 4px 14px rgba(61, 52, 40, 0.08), 0 1px 3px rgba(61, 52, 40, 0.06);
  --e3: 0 14px 40px rgba(61, 52, 40, 0.14), 0 4px 10px rgba(61, 52, 40, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-move: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-joy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-instant: 90ms;
  --t-fast: 140ms;
  --t-med: 240ms;

  /* Type: headings Nunito 800, body Nunito Sans */
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 40px);
  --measure: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* The header is sticky: an anchor (#hoe, #account-verwijderen) lands below it. */
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

strong {
  font-weight: 700;
  color: var(--ink);
}

a {
  color: var(--green-700);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color var(--t-fast) var(--ease-move);
}

a:hover {
  color: var(--green-900);
}

/* A green ring with a saffron halo: saffron alone is too pale on oat to see. */
:focus-visible {
  outline: 2px solid var(--green-800);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus);
  border-radius: 6px;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header: light, on the oat page, like the app bar. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 246, 236, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* The wordmark: the mark is the J. It stands on the baseline at cap height and its
   smile hangs below like a descender (ds.css, .jword). Size it with font-size only.
   The right margin is -0.27em, as in ds.css: the J's stem ends 0.50em in, and the
   earlier -0.415em put the "o" inside it (2.0 feedback). The app's JoyWordmark pulls
   in the same 0.27em. */
.brand {
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  font-size: 26px;
  text-decoration: none;
  padding: 4px 6px 6px 4px;
}

.brand svg {
  width: 1.137em;
  height: 1.137em;
  vertical-align: -0.341em;
  margin: 0 -0.27em 0 -0.295em;
}

.brand span {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--green-800);
}

.site-header nav a {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background-color var(--t-fast) var(--ease-move);
}

.site-header nav a:hover {
  background: var(--oat-100);
  color: var(--ink);
}

/* The language switch (#799): a link to the same page on the other domain, naming the
   other language in that language, with a globe so it reads as a language first. The
   same pill as the header's other links; the footer repeats it as its last item. */
.site-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switch svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Hero */

.hero {
  background:
    radial-gradient(circle at 82% 38%, var(--saffron-50) 0, var(--saffron-50) 22%, transparent 42%),
    var(--bg);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 80px;
}

.eyebrow {
  display: inline-block;
  font: 700 13px/1.4 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 68px);
  line-height: 1.05;
  color: var(--green-800);
}

/* "één": the joy accent, a saffron smile under the word. */
.hero h1 em {
  font-style: normal;
  padding: 0 0.04em;
  background: linear-gradient(var(--saffron-500), var(--saffron-500)) no-repeat 0 88% / 100% 0.16em;
  border-radius: 4px;
}

.lede {
  font-size: 19px;
  max-width: 34ch;
  margin: 20px 0 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

/* Buttons: ds.css .btn .btn-primary — a green pill standing on its own darker edge. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font: 700 16px/1.2 var(--font-body);
  text-decoration: none;
  box-shadow: 0 2px 0 var(--green-800);
  transition:
    transform var(--t-instant) var(--ease),
    background-color var(--t-fast) var(--ease-move);
}

.button:hover {
  background: var(--green-700);
  color: #fff;
}

.button:active {
  transform: scale(0.97);
}

/* The store links: styled text buttons, not Apple's or Google's badge artwork,
   like the ones on app.joymeals.nl. */
.cta-row.stores {
  gap: 12px;
}

.cta-note {
  font-size: 15px;
  color: var(--ink-3);
  margin: 18px 0 0;
}

/* The phone: built from the app's own parts, not a screenshot. */

.phone {
  justify-self: center;
  width: 290px;
  aspect-ratio: 9 / 19;
  background: var(--oat-900);
  border-radius: 46px;
  padding: 10px;
  box-shadow: var(--e3);
  transform: rotate(2.5deg);
}

.screen {
  position: relative;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen-bar {
  color: var(--ink);
  padding: 44px 18px 10px;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 26px;
}

.screen-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 12px;
}

.card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--e1);
  padding: 8px;
}

/* Stand-in food photos, as in the design system. */
.thumb {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: var(--r-sm);
}

.thumb.a {
  background:
    radial-gradient(circle at 35% 35%, #f7c873 0 18%, transparent 19%),
    radial-gradient(circle at 65% 60%, #e5533d 0 16%, transparent 17%),
    radial-gradient(circle at 40% 70%, #7fb069 0 12%, transparent 13%),
    linear-gradient(135deg, #f3e3c3, #e8c99a);
}
.thumb.b {
  background:
    radial-gradient(circle at 50% 50%, #fff6e0 0 30%, #f4b63f 31% 38%, transparent 39%),
    linear-gradient(160deg, #4e9b80, #1b6b52);
}
.thumb.c {
  background:
    radial-gradient(circle at 60% 40%, #e5533d 0 14%, transparent 15%),
    radial-gradient(circle at 35% 60%, #f4b63f 0 14%, transparent 15%),
    linear-gradient(150deg, #fbe2ae, #f6c9ae);
}

.card-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.25;
}

.card-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

.link-chip {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--saffron-500);
  color: var(--oat-900);
  font: 800 10px/1.6 var(--font-body);
  letter-spacing: 0.02em;
}

/* The one moving part: a pasted link lands in the list as a recipe, and the app says so. */

.card.new {
  animation: land 6s var(--ease) infinite;
  transform-origin: top center;
}

@keyframes land {
  0%, 10% { opacity: 0; transform: translateY(-10px) scale(0.96); }
  18%, 90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-4px); }
}

.fab {
  position: absolute;
  right: 16px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(27, 107, 82, 0.35), 0 2px 0 var(--green-800);
  animation: make-room 6s var(--ease-move) infinite;
}

.snack {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--oat-900);
  color: var(--oat-50);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--e3);
  animation: snack 6s var(--ease) infinite;
}

.snack .ok {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-500);
  display: grid;
  place-items: center;
}

@keyframes snack {
  0%, 18% { opacity: 0; transform: translateY(24px); }
  26%, 72% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: translateY(24px); }
}

@keyframes make-room {
  0%, 18% { transform: none; }
  26%, 72% { transform: translateY(-56px); }
  80%, 100% { transform: none; }
}

/* Selling points */

.points {
  padding: 88px 0 80px;
}

.points h2 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
  color: var(--green-800);
  max-width: 20ch;
}

.point-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.point {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--e1);
}

/* Tinted tiles carry a 1.5px border one step darker than their fill (ds.css, .notice). */
.point-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-700);
  box-shadow: inset 0 0 0 1.5px var(--green-100);
  margin-bottom: 18px;
}

.point:nth-child(2) .point-icon {
  background: var(--saffron-50);
  color: var(--saffron-600);
  box-shadow: inset 0 0 0 1.5px var(--saffron-200);
}

.point:nth-child(3) .point-icon {
  background: var(--tomato-50);
  color: var(--tomato-600);
  box-shadow: inset 0 0 0 1.5px var(--tomato-200);
}

.point h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.point p {
  margin: 0;
  font-size: 16px;
}

/* A notice, as in the design system: oat fill, a border one step darker. */
.honest {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 28px 0 0;
  padding: 14px 16px;
  max-width: 64ch;
  border-radius: var(--r-md);
  background: var(--oat-100);
  box-shadow: inset 0 0 0 1.5px var(--oat-200);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.honest svg {
  flex: none;
  margin-top: 1px;
  color: var(--ink-3);
}

/* Footer */

.site-footer {
  background: var(--green-900);
  color: var(--green-100);
  font-size: 14px;
  padding: 36px 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer a {
  color: var(--saffron-200);
}

.site-footer a:hover {
  color: #fff;
}

.colophon {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

/* Long-form pages (privacy, terms, support, account deletion) */

.doc {
  padding: 48px 0 80px;
}

.doc article {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--e1);
  padding: clamp(24px, 5vw, 56px);
}

.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  color: var(--green-800);
}

.doc .updated {
  display: inline-block;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 28px;
}

.doc h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 19px;
  margin: 24px 0 8px;
}

.doc li {
  margin-bottom: 6px;
}

.doc li::marker {
  color: var(--green-600);
  font-weight: 700;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 16px 0;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.doc th {
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-sunk);
}

.doc th:first-child {
  border-top-left-radius: var(--r-sm);
}

.doc th:last-child {
  border-top-right-radius: var(--r-sm);
}

.table-scroll {
  overflow-x: auto;
}

/* Dutch compounds ("serverlogboeken") are what overflows a phone-width table,
   so the page marks their breaks with &shy; rather than letting the table scroll. */
@media (max-width: 480px) {
  .doc table {
    font-size: 14px;
    hyphens: manual;
    -webkit-hyphens: manual;
  }

  .doc th,
  .doc td {
    padding: 8px 6px;
  }
}

/* Small screens */

@media (max-width: 820px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .hero {
    background:
      radial-gradient(circle at 50% 78%, var(--saffron-50) 0, var(--saffron-50) 24%, transparent 44%),
      var(--bg);
  }

  .phone {
    width: 250px;
    transform: none;
  }

  .point-grid {
    grid-template-columns: 1fr;
  }

  .points {
    padding: 56px 0 48px;
  }
}

/* Reduce Motion: the phone shows its still frame — the recipe landed, nothing moving. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .snack {
    opacity: 0;
  }

  .button:active {
    transform: none;
  }
}
