/* JoyMeals site. The tokens mirror app/lib/src/core/design_tokens.dart and the
   fonts are the app's own files, so the site and the app share one look. The
   app has no dark theme, so the site has none either: champagne and emerald
   are the brand, not a light-mode default. */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/WorkSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/WorkSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;

  --emerald-900: #04382a;
  --emerald-800: #064e3b;
  --emerald-600: #1b6b52;
  --emerald-100: #d6e7de;
  --emerald-50: #edf4f0;
  --champagne-700: #e9d2a9;
  --champagne-500: #f8e7c9;
  --champagne-300: #fcf3e2;
  --champagne-100: #fdf9f1;
  --terracotta-600: #c25a2a;
  --terracotta-500: #e2703a;
  --terracotta-50: #fdefe6;
  --ink-900: #241f1a;
  --ink-700: #453d34;
  --ink-500: #6b6055;
  --ink-300: #a79c8e;
  --ink-50: #f5f1e9;
  --paper: #fffdf8;
  --hairline: #e4dcce;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

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

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

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

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

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0;
}

a {
  color: var(--emerald-600);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--emerald-800);
}

:focus-visible {
  outline: 3px solid var(--terracotta-500);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Header: the emerald band the app puts over every list. */

.site-header {
  background: var(--emerald-800);
  color: var(--champagne-100);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--champagne-100);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.brand:hover {
  color: var(--champagne-500);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(248, 231, 201, 0.25);
}

.site-header nav a {
  color: var(--champagne-500);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--champagne-100);
  text-decoration: underline;
}

/* Hero */

.hero {
  background:
    radial-gradient(circle at 85% 20%, var(--champagne-500) 0, transparent 45%),
    var(--champagne-300);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

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

.eyebrow {
  display: inline-block;
  background: var(--emerald-100);
  color: var(--emerald-900);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  color: var(--emerald-800);
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--terracotta-600);
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--emerald-800);
  color: var(--champagne-300);
  font-weight: 500;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--emerald-900);
  color: var(--champagne-100);
}

.cta-note {
  font-size: 14px;
  color: var(--ink-500);
}

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

.phone {
  justify-self: center;
  width: 280px;
  aspect-ratio: 9 / 19;
  background: var(--ink-900);
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 30px 60px -20px rgba(6, 78, 59, 0.35),
    0 12px 24px -12px rgba(36, 31, 26, 0.3);
  transform: rotate(3deg);
}

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

.screen-bar {
  background: var(--emerald-800);
  color: var(--champagne-100);
  padding: 38px 18px 16px;
  font-family: var(--serif);
  font-size: 22px;
}

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

.card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 8px;
}

.thumb {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
}

.thumb.a { background: linear-gradient(135deg, #e2703a, #f6c9ae); }
.thumb.b { background: linear-gradient(135deg, #1b6b52, #b9d5c8); }
.thumb.c { background: linear-gradient(135deg, #e9d2a9, #c25a2a); }

.card-title {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-900);
  line-height: 1.2;
}

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

/* The one moving part: a pasted link lands in the list as a recipe. */

.card.new {
  animation: land 5s ease-in-out infinite;
  transform-origin: top center;
}

.card.new .card-title {
  position: relative;
}

.link-chip {
  font-size: 11px;
  color: var(--emerald-600);
  font-family: var(--sans);
}

@keyframes land {
  0%, 12% { opacity: 0; transform: translateY(-8px) scale(0.96); }
  24%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-4px); }
}

.fab {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--terracotta-500);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 8px 16px -6px rgba(194, 90, 42, 0.6);
}

/* Selling points */

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

.points h2 {
  font-size: clamp(30px, 4vw, 40px);
  color: var(--emerald-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(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px 24px;
}

.point-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--emerald-50);
  color: var(--emerald-800);
  margin-bottom: 18px;
}

.point:nth-child(2) .point-icon {
  background: var(--terracotta-50);
  color: var(--terracotta-600);
}

.point:nth-child(3) .point-icon {
  background: var(--champagne-500);
  color: var(--emerald-900);
}

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

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

.honest {
  margin-top: 28px;
  font-size: 15px;
  color: var(--ink-500);
  max-width: 60ch;
}

/* Footer */

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

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

.site-footer a {
  color: var(--champagne-500);
}

.site-footer a:hover {
  color: var(--champagne-100);
}

.site-footer ul {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Long-form page (privacy policy) */

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

.doc article {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: clamp(24px, 5vw, 56px);
}

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

.doc .updated {
  color: var(--ink-500);
  font-size: 14px;
  margin: 8px 0 32px;
}

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

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

.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(--hairline);
}

.doc th {
  font-weight: 500;
  color: var(--ink-900);
  background: var(--ink-50);
}

.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: 48px;
    padding-bottom: 56px;
  }

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

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

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

@media (prefers-reduced-motion: reduce) {
  .card.new {
    animation: none;
  }
}
