/* Fonts are self-hosted, so visitors' browsers never contact Google */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Abril Fatface';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/abril-fatface-latin.woff2') format('woff2');
}

/* Palette of the mealio.ch logo, same tokens as the app */
:root {
  --ink: #2b342b;
  --sage: #b3d9b3;
  --leaf: #6aab80;
  --mint: #05e39c;
  --beet: #c53287;
  --beet-light: #fbe8f2;
  --brand: #3a7a50;
  --brand-dark: #2e6441;
  --brand-light: #e2f0e2;
  --background: #f2f7f0;
  --white: #ffffff;
  --border: #d6e4d4;
  --muted: #5b6b5b;
  --display: 'Abril Fatface', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 20px;
  --shadow: 6px 6px 0 var(--ink);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-dark);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 32px;
  }
}

.narrow {
  max-width: 980px;
}

/* --- Buttons --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.button:focus-visible,
.nav a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--beet);
  outline-offset: 3px;
}

.button-secondary {
  background: var(--white);
  color: var(--ink);
}

.button-small {
  min-height: 42px;
  padding: 6px 18px;
  font-size: 0.95rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--beet);
}

/* --- Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--sage);
  border-bottom: 2px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
}

.nav {
  display: none;
  gap: 24px;
  margin-left: auto;
}

.nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-inner .button {
  margin-left: auto;
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }

  .header-inner .button {
    margin-left: 0;
  }
}

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

.hero {
  background: var(--sage);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 48px;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

.eyebrow {
  color: var(--brand-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.lead {
  font-size: 1.2rem;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 420px;
}

.phone {
  width: 100%;
  max-width: 300px;
  filter: drop-shadow(0 24px 40px rgba(43, 52, 43, 0.28));
}

.phone-hero {
  max-width: 290px;
  transform: rotate(3deg);
}

.cast {
  position: absolute;
  left: 0;
  bottom: -20px;
  width: 100%;
  pointer-events: none;
}

.cast .emilio {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 150px;
}

.cast .emilia {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 140px;
}

.bubble {
  position: absolute;
  left: 0;
  bottom: 200px;
  max-width: 220px;
  margin: 0;
  padding: 12px 16px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

.bubble::after {
  content: '';
  position: absolute;
  left: 40px;
  bottom: -18px;
  border-style: solid;
  border-width: 18px 12px 0 12px;
  border-color: var(--ink) transparent transparent transparent;
}

@media (min-width: 560px) {
  .cast .emilio {
    width: 190px;
  }

  .cast .emilia {
    width: 170px;
  }

  .bubble {
    bottom: 250px;
  }
}

/* --- Sections -------------------------------------------------------- */

.section {
  padding: 72px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 104px 0;
  }
}

.section h2 {
  text-align: center;
}

.section-lead {
  max-width: 40em;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--muted);
  font-size: 1.15rem;
}

/* --- Video ----------------------------------------------------------- */

.video-frame {
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--ink);
}

.video-frame video {
  width: 100%;
}

/* --- Steps ----------------------------------------------------------- */

.steps-section {
  background: var(--white);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 72px;
}

.step {
  display: grid;
  gap: 32px;
  justify-items: center;
}

@media (min-width: 860px) {
  .step {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
  }

  .step:nth-child(even) .step-text {
    order: 2;
  }
}

.step-text {
  max-width: 30em;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--beet);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.5rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.step h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.checks li {
  position: relative;
  padding-left: 32px;
  font-weight: 600;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 2px solid var(--brand);
}

.checks li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  width: 6px;
  height: 10px;
  border: solid var(--brand-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Criteria -------------------------------------------------------- */

.criteria-inner {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .criteria-inner {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
  }

  .criteria-intro h2,
  .criteria-intro .section-lead {
    text-align: left;
    margin-left: 0;
  }
}

.emilia-side {
  width: 180px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .emilia-side {
    margin: 0;
  }
}

.criteria {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.criteria li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.criteria h3 {
  margin-bottom: 2px;
}

.criteria p {
  margin: 0;
  color: var(--muted);
}

.dot {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  border: 3px solid var(--ink);
}

.dot-leaf {
  background: var(--leaf);
}

.dot-mint {
  background: var(--mint);
}

.dot-beet {
  background: var(--beet);
}

.dot-brand {
  background: var(--brand);
}

.dot-sage {
  background: var(--sage);
}

/* --- Features -------------------------------------------------------- */

.features-section {
  background: var(--brand-light);
  border-top: 2px solid var(--ink);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.feature {
  padding: 26px 24px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature h3 {
  color: var(--beet);
}

.feature p {
  margin: 0;
}

/* --- Call to action -------------------------------------------------- */

.cta {
  background: var(--sage);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.cta-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  padding-top: 64px;
}

.cta-text {
  text-align: center;
  padding-bottom: 64px;
}

.cta-text p {
  font-size: 1.2rem;
  font-weight: 600;
}

.cta .emilio,
.cta .emilia {
  display: none;
  width: 160px;
  margin-bottom: -12px;
}

@media (min-width: 760px) {
  .cta .emilio,
  .cta .emilia {
    display: block;
  }
}

/* --- Footer ---------------------------------------------------------- */

.site-footer {
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.site-footer .brand {
  font-size: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav a {
  color: var(--ink);
  font-weight: 600;
}

.copyright {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
