/* batatu.app. The colours and the font are the app's (src/styles.css): plum skin, orange flesh, green leaf. */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --plum: #5a2440;
  --plum-deep: #3f172c;
  --plum-soft: #a8627f;
  --orange: #f28c1e;
  --flesh: #ffd9a8;
  --leaf: #2f8f5b;
  --bg: #f7f3f5;
  --surface: #ffffff;
  --ink: #24141c;
  --muted: #76626c;
  --line: #e7dde2;
  /* calorie levels, as in the app */
  --lv-low: #c5e8d0; --lv-ok: #2f8f5b; --lv-over: #d9382c;
  --font: 'Bricolage Grotesque Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --wide: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---- top bar ---- */
.top {
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap;
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: inherit; text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .14); font-size: 15px; font-weight: 600; }
.langs a, .langs span { padding: 5px 10px; border-radius: 9px; text-decoration: none; color: inherit; }
.langs span { background: var(--surface); color: var(--plum); }
.links { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: 16px; }
.links a:not(.button) { color: inherit; text-decoration: none; padding: 8px 0; }
.links a:not(.button):hover, .links a[aria-current='page']:not(.button) { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 16px;
  background: var(--plum); color: #fff; font-weight: 700; font-size: 18px; text-decoration: none;
}
.button:hover { background: var(--plum-deep); }
.button-small { min-height: 42px; padding: 0 16px; border-radius: 13px; font-size: 16px; }
.button-big { min-height: 60px; padding: 0 32px; border-radius: 18px; font-size: 20px; }
.button-ghost { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- landing: the top bar and the hero share the plum of the app's sign-in screen ---- */
.landing .top, .landing .hero { color: #fff; background: var(--plum); }
.landing .top { max-width: none; padding-left: max(var(--gutter), calc((100% - var(--wide)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--wide)) / 2)); }
.landing .top .button, .hero .button { background: var(--orange); color: var(--plum-deep); }
.landing .top .button:hover, .hero .button:hover { background: #ffa23d; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 48px;
  padding: 40px max(var(--gutter), calc((100% - var(--wide)) / 2)) 0;
}
.hero h1 { font-size: clamp(44px, 7.4vw, 88px); font-weight: 800; letter-spacing: -0.045em; line-height: .98; }
.hero .lead { margin-top: 24px; max-width: 30em; font-size: clamp(19px, 2.1vw, 23px); color: var(--flesh); }
.hero .actions { margin-top: 32px; }
.hero-note { margin-top: 16px; max-width: 34em; font-size: 16px; color: rgba(255, 255, 255, .78); }
.hero-text { padding-bottom: 56px; }
/* The phone stands on the lower edge of the plum and reaches into the page below. */
.hero .phone { justify-self: center; margin-bottom: -72px; }

.phone {
  width: min(300px, 78vw); flex: none;
  padding: 9px; border-radius: 44px; background: var(--plum-deep);
  box-shadow: 0 24px 48px -18px rgba(36, 20, 28, .5), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.phone img { width: 100%; border-radius: 35px; background: var(--bg); }

.landing main > section:not(.hero) { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 88px var(--gutter) 0; }
.landing main > section > h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; max-width: 18em; }

/* ---- three reasons ---- */
.reasons { padding-top: 152px !important; }
.reasons ol { counter-reset: reason; margin-top: 24px; }
.reasons li {
  counter-increment: reason;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 48px;
  padding: 56px 0; border-bottom: 2px solid var(--line);
}
.reasons li:last-child { border-bottom: 0; padding-bottom: 0; }
.reasons li:nth-child(even) .reason-text { order: 2; }
.reasons .phone { justify-self: center; width: min(264px, 70vw); }
.reason-text::before {
  content: counter(reason); display: block; margin-bottom: 12px;
  font-size: 88px; font-weight: 800; line-height: .9; letter-spacing: -0.05em; color: var(--orange);
}
.reasons h3 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.reasons p { margin-top: 14px; max-width: 30em; font-size: 20px; color: #4a3640; }

/* ---- four ways ---- */
.ways ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.ways li { padding: 24px 22px 26px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); }
.ways svg { color: var(--plum); }
.ways h3 { margin-top: 14px; font-size: 22px; font-weight: 800; }
.ways p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---- what to expect ---- */
.promises dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-top: 36px; }
.promises dt { padding-top: 16px; border-top: 4px solid var(--leaf); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.promises dd { margin-top: 8px; font-size: 17px; color: #4a3640; }

.closing { text-align: center; padding-bottom: 96px !important; }
.closing h2 { margin: 0 auto; }
.closing p { margin-top: 12px; color: var(--muted); }
.closing .actions { justify-content: center; margin-top: 28px; }

/* ---- footer ---- */
.foot {
  margin-top: 88px; padding: 32px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--line); text-align: center; font-size: 15px; color: var(--muted);
}
.landing .foot { margin-top: 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin-top: 12px; }
.foot a { color: inherit; padding: 6px 0; }

/* ---- Help ---- */
.help .top { border-bottom: 2px solid var(--line); }
.help .langs { background: #ebe1e6; color: var(--muted); }
.doc { max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 0; }
.doc h1 { font-size: clamp(40px, 7vw, 60px); font-weight: 800; letter-spacing: -0.04em; }
.doc .lead { margin-top: 12px; font-size: 20px; color: var(--muted); }
.toc { margin-top: 28px; }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: block; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); font-size: 16px; font-weight: 600; text-decoration: none; }
.toc a:hover { border-color: var(--plum-soft); }
.doc section { padding-top: 56px; scroll-margin-top: 8px; }
.doc h2 { font-size: clamp(26px, 4.4vw, 34px); font-weight: 800; }
.doc h3 { margin-top: 32px; font-size: 21px; font-weight: 750; }
.doc section > p { margin-top: 14px; }
.doc b { font-weight: 700; }

.steps { margin-top: 20px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line); }
.steps > div { padding: 18px 20px; }
.steps > div + div { border-top: 2px solid var(--line); }
.steps dt { font-size: 19px; font-weight: 750; }
.steps dd { margin-top: 4px; font-size: 17px; color: #4a3640; }

.plain { margin-top: 14px; padding-left: 1.2em; list-style: disc; }
ol.plain { list-style: decimal; }
.plain li { padding: 4px 0 4px 4px; }
.plain li::marker { color: var(--plum-soft); font-weight: 700; }

.levels { margin-top: 20px; display: grid; gap: 10px; }
.levels li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
.levels b { align-self: end; }
.levels li > span:last-child { grid-column: 2; align-self: start; font-size: 16px; color: var(--muted); }
.swatch { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; }
.swatch.lv-low { background: var(--lv-low); }
.swatch.lv-ok { background: var(--lv-ok); }
.swatch.lv-over { background: var(--lv-over); }
.levels + .plain { margin-top: 20px; }

.ability { margin-top: 12px; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); }
.ability li { font-weight: 650; padding: 2px 0; }
.ability p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---- 404 ---- */
.notfound main { max-width: 480px; margin: 0 auto; padding: 20vh var(--gutter) 0; display: grid; gap: 28px; }
.notfound .brand { margin: 0; }

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .hero-text { padding-bottom: 0; }
  .reasons li { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
  .reasons li:nth-child(even) .reason-text { order: 0; }
  .ways ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promises dl { grid-template-columns: 1fr; }
  .landing main > section:not(.hero) { padding-top: 64px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .links a:not(.button) { display: none; } /* Help stays in the footer; the bar keeps the language and the app */
  .landing .links a:not(.button) { display: inline; }
  .landing .links .button { display: none; } /* the hero's own button is right below */
  .ways ul { grid-template-columns: 1fr; }
  .button-big { width: 100%; }
  .reasons p { font-size: 18px; }
}
