/* datum: minimal, friendly, a few drinks floating around. */

:root {
  color-scheme: light;
  --cream: #fff8ef;
  --paper: #ffffff;
  --ink: #2d2640;
  --ink-2: #5d5672;
  --muted: #6f6883;
  --line: #efe4d6;
  --line-strong: #e2d4c2;

  --pink: #ff8fab;
  --pink-soft: #ffe3ea;
  --mint: #6fd3b0;
  --mint-soft: #dcf6ec;
  --lemon: #ffd166;
  --lemon-soft: #fff2cc;
  --sky: #8ecae6;
  --sky-soft: #e2f2fa;
  --berry: #b388eb;
  --peach: #ffad7a;

  --accent: #e8577e;
  --accent-ink: #ffffff;

  --good: #1d8a5f;
  --good-soft: #def5ea;
  --warn: #9a6400;
  --warn-soft: #fff1cf;
  --bad: #c43d3d;
  --bad-soft: #fde4e4;

  --series-1: #2a78d6;
  --series-2: #eb6834;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(45, 38, 64, 0.35);
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 239, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; text-decoration: none; }
.logo-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--pink) 19%); box-shadow: 10px -6px 0 -6px var(--mint), 14px 4px 0 -7px var(--lemon); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.nav-links a:hover { background: var(--paper); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--ink); color: #fff; }
@media (max-width: 560px) {
  .nav { height: 60px; }
  .nav-links a { padding: 6px 9px; font-size: 0.92rem; }
  .nav-links .hide-sm { display: none; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 0 var(--ink); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; box-shadow: 0 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tab:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 180px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.88rem; line-height: 1.5; }
.field { margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }

/* ---------- cards & sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.eyebrow { display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 620px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--mint-soft); font-weight: 700; font-size: 0.86rem; }

/* ---------- hero with floating drinks ---------- */
.hero { position: relative; padding: 96px 0 110px; text-align: center; overflow: hidden; }
.hero .lede { margin-inline: auto; }
.hero .btn-row { justify-content: center; margin-top: 28px; }
.hero-inner { position: relative; z-index: 2; }
.page-hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.page-hero h1, .page-hero .lede { max-width: 700px; }

.drinks-float { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.drink { position: absolute; width: var(--s, 72px); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); }
.drink svg { width: 100%; height: auto; overflow: visible; animation: bob var(--dur, 6s) ease-in-out var(--delay, 0s) infinite; filter: drop-shadow(0 8px 10px rgba(45, 38, 64, 0.12)); }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}
.bubble { position: absolute; bottom: -20px; border-radius: 50%; border: 2px solid rgba(45, 38, 64, 0.12); background: rgba(255, 255, 255, 0.7); animation: rise var(--dur, 12s) linear var(--delay, 0s) infinite; }
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-560px); opacity: 0; }
}
.drinks-parade { display: none; justify-content: center; gap: 14px; margin-bottom: 22px; }
.drinks-parade .p-drink { width: 44px; }
.drinks-parade .p-drink svg { animation: bob 5s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@media (max-width: 820px) {
  .hero .drinks-float, .page-hero .drinks-float { display: none; }
  .drinks-parade { display: flex; }
  .hero { padding: 48px 0 64px; }
  .page-hero { padding: 40px 0 28px; }
}

/* shelf of drinks above the footer */
.shelf { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 3vw, 28px); padding-top: 24px; border-bottom: 4px solid var(--line-strong); }
.shelf .s-drink { width: clamp(30px, 6vw, 46px); transition: transform 0.2s; }
.shelf .s-drink:hover { transform: translateY(-6px) rotate(-4deg); }

/* ---------- home page bits ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.step { position: relative; }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 1.2rem var(--font-head); border: 2px solid var(--ink); margin-bottom: 14px; }
.step:nth-child(1) .step-num { background: var(--pink-soft); }
.step:nth-child(2) .step-num { background: var(--lemon-soft); }
.step:nth-child(3) .step-num { background: var(--mint-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.mini-report { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: 8px 8px 0 var(--lemon); }
.mini-report .big { font: 600 3rem/1 var(--font-head); margin: 6px 0; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line-strong); font-size: 0.95rem; }
.mini-row strong { font-variant-numeric: tabular-nums; }

.band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 40px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.band p { color: #ddd8ea; margin: 0; }
.band .lock { width: 64px; }
@media (max-width: 640px) { .band { grid-template-columns: 1fr; padding: 28px; } }

.cta-card { text-align: center; background: var(--pink-soft); border: 2px solid var(--ink); border-radius: var(--radius); padding: 44px 28px; }
.cta-card .btn-row { justify-content: center; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }
.value-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 12px; border: 2px solid var(--ink); }

.founder { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start; }
.avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--sky-soft); border: 2px solid var(--ink); display: grid; place-items: center; font: 600 2rem var(--font-head); }
@media (max-width: 520px) { .founder { grid-template-columns: 1fr; } }

/* ---------- calculator ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; background: var(--paper); border: 2px solid var(--line); border-radius: 999px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; font: 700 0.98rem var(--font-body); color: var(--ink-2); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
@media (max-width: 560px) {
  .tabs { display: flex; flex-direction: column; border-radius: 20px; width: 100%; }
  .tab { border-radius: 14px; text-align: left; }
}
.calc-card + .calc-card { margin-top: 20px; }
.calc-card h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.calc-card h2 .step-num { width: 34px; height: 34px; font-size: 1rem; margin: 0; }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.status { margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.92rem; display: none; }
.status.show { display: block; }
.status.ok { background: var(--good-soft); color: var(--good); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.status a { font-weight: 700; }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.privacy { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.columns-help { font-size: 0.9rem; background: var(--cream); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.columns-help code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.85rem; }

/* ---------- report ---------- */
.report { margin-top: 36px; }
.report[hidden] { display: none; }
.report-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 760px) { .report-head { grid-template-columns: 1fr; } }
.headline { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 8px 8px 0 var(--mint); }
.headline .big { font: 600 clamp(3rem, 8vw, 4.6rem)/1 var(--font-head); margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.headline .range { color: var(--ink-2); font-weight: 600; }
.rating { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; margin-top: 14px; }
.rating .icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 0.8rem; font-weight: 900; }
.rating.green { background: var(--good-soft); color: var(--good); }
.rating.green .icon { background: var(--good); }
.rating.amber { background: var(--warn-soft); color: var(--warn); }
.rating.amber .icon { background: var(--warn); }
.rating.red { background: var(--bad-soft); color: var(--bad); }
.rating.red .icon { background: var(--bad); }
.meaning p:last-child { margin-bottom: 0; }

.report-section { margin-top: 20px; }
.report-section h3 { font-size: 1.25rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 800; }
th .sub, td .sub { display: block; font-size: 0.78rem; color: var(--muted); }
tr.pos td.money { color: var(--good); }
tr td.neg { color: var(--bad); }
td.pos { color: var(--good); }

.drivers { list-style: none; padding: 0; margin: 0; }
.drivers li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); }
.drivers li:last-child { border-bottom: 0; }
.drivers .val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drivers .unclear { color: var(--muted); }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); margin-left: 6px; vertical-align: 2px; }

.scale { position: relative; height: 56px; margin: 18px 0 8px; }
.scale-track { position: absolute; left: 0; right: 0; top: 22px; height: 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line-strong); }
.scale-band { position: absolute; top: 22px; height: 10px; background: var(--sky-soft); border: 1px solid var(--sky); }
.scale-range { position: absolute; top: 19px; height: 16px; border-radius: 999px; background: rgba(232, 87, 126, 0.25); }
.scale-mark { position: absolute; top: 14px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.scale-ticks { position: absolute; left: 0; right: 0; top: 40px; font-size: 0.78rem; color: var(--muted); }
.scale-ticks span { position: absolute; transform: translateX(-50%); }
.scale-key { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; color: var(--ink-2); }
.scale-key i { display: inline-block; width: 18px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: 0; }

.reasons { margin: 0; padding-left: 20px; }
.reasons li { margin-bottom: 8px; }

/* chart */
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 8px; }
.chart-legend .key { display: inline-block; width: 22px; height: 0; border-top: 3px solid; margin-right: 8px; vertical-align: middle; }
.chart-box { position: relative; }
.chart-box svg { width: 100%; height: auto; touch-action: pan-y; }
.chart-box .grid line { stroke: var(--line); stroke-width: 1; }
.chart-box .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart-box .promo-band { fill: var(--lemon-soft); }
.chart-tip { position: absolute; pointer-events: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; font-size: 0.85rem; box-shadow: 0 6px 18px -8px rgba(45, 38, 64, 0.4); min-width: 160px; opacity: 0; transition: opacity 0.1s; z-index: 3; }
.chart-tip.show { opacity: 1; }
.chart-tip .tip-date { color: var(--muted); font-size: 0.78rem; margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .tip-row strong { font-variant-numeric: tabular-nums; }
.chart-tip .tip-key { width: 14px; border-top: 3px solid; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
details.more .table-wrap { max-height: 320px; overflow: auto; margin-top: 10px; }

.report-cta { margin-top: 28px; }
.sources { margin-top: 18px; font-size: 0.82rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; padding-bottom: 36px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 22px; font-size: 0.9rem; color: var(--muted); }
.footer-row a { color: var(--ink-2); text-decoration: none; margin-left: 16px; }
.footer-row a:first-child { margin-left: 0; }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header, .site-footer, .page-hero, .no-print, .drinks-float, .drinks-parade, .chart-tip { display: none !important; }
  .report { margin-top: 0; }
  .card, .headline { box-shadow: none; break-inside: avoid; }
  details.more { display: none; }
}
