/* Brinebook's website. One page, two materials: the brine (the page) and the jar label (the download cards),
   and one moment: the pH line in the hero. Alegreya for what is read as a heading, Alegreya Sans for the rest. */

@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/alegreya-latin.woff2) format('woff2');
  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; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/alegreya-latin-ext.woff2) format('woff2');
  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: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/alegreya-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/alegreya-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/alegreya-sans-latin-400.woff2) format('woff2');
  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; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/alegreya-sans-latin-ext-400.woff2) format('woff2');
  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: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/alegreya-sans-cyrillic-400.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/alegreya-sans-cyrillic-ext-400.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/alegreya-sans-latin-700.woff2) format('woff2');
  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; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/alegreya-sans-latin-ext-700.woff2) format('woff2');
  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: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/alegreya-sans-cyrillic-700.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/alegreya-sans-cyrillic-ext-700.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  /* The brine: the page, and the band the downloads sit on */
  --brine: #0E2925;
  --brine-2: #143630;
  --brine-3: #1B443C;
  --line: rgba(222, 236, 229, 0.14);
  --text: #E4EEE9;
  --soft: #BFD3CB;
  --muted: #94B1A7;
  /* The jar label: the download cards, the main buttons */
  --label: #EFE8D6;
  --label-2: #E4DBC4;
  --label-ink: #1A2925;
  --label-muted: #55655F;
  /* The icon's green, and the pH line's amber (as Brinebook draws it) */
  --jar: #1C7A53;
  --jar-hover: #176947;
  --jar-light: #6FCB9C;
  --amber: #F2A93B;

  --serif: 'Alegreya', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Alegreya Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--brine); color: var(--text);
  font: 400 1.125rem/1.55 var(--sans);
  font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.82em; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--label); color: var(--label-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
#main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
/* On the brine: a button made of label paper */
.btn-label { background: var(--label); color: var(--label-ink); }
.btn-label:hover { background: #FFF8E6; }
.btn-small { min-height: 38px; padding: 7px 16px; font-size: .95rem; }
.btn-large { min-height: 54px; padding: 14px 28px; font-size: 1.1rem; }
/* On the label: the icon's green, and an outline in the label's ink */
.btn-primary { background: var(--jar); color: #fff; }
.btn-primary:hover { background: var(--jar-hover); }
.btn-ghost { border-color: rgba(26, 41, 37, 0.28); color: var(--label-ink); }
.btn-ghost:hover { border-color: var(--label-ink); background: rgba(26, 41, 37, 0.04); }
.btn.soon { pointer-events: none; background: transparent; color: var(--label-muted); border: 1.5px dashed rgba(26, 41, 37, 0.22); }
.btn.soon::after { content: attr(data-soon); font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--label-2); color: var(--label-muted); }
.os-icon:empty { display: none; }
.os-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- Navigation ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(14, 41, 37, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.35rem/1 var(--serif); }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--soft); text-decoration: none; font-size: 1.02rem; }
.nav-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--soft); padding: 6px 8px; border-radius: 8px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--text); }
.lang summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; padding: 6px; min-width: 170px;
  background: var(--brine-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.lang-list a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--soft); }
.lang-list a:hover { background: var(--brine-3); color: var(--text); }
.lang-list a[aria-current="page"] { color: var(--text); font-weight: 700; }

/* ---- Hero ---- */
.hero { padding: clamp(48px, 8vw, 104px) 0 0; overflow-x: clip; }
.hero h1 { font-size: clamp(2.75rem, 7.4vw, 5.75rem); line-height: 1; letter-spacing: -0.012em; max-width: 11em; }
.lede { max-width: 35em; margin-top: 26px; color: var(--soft); font-size: clamp(1.15rem, 1.9vw, 1.35rem); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 34px; }

/* Numbers that are data (a version, a pH, a day) stand on the line; old-style figures stay in the running text */
.curve-mark, .day-when, .p-head p, .p-version, .curve-safe-label { font-variant-numeric: lining-nums tabular-nums; }

/* The pH line: drawn once, left to right, crossing the line of 4.6 */
.curve { position: relative; margin-top: clamp(40px, 6vw, 72px); }
.curve-svg { width: 100%; height: clamp(150px, 22vw, 250px); overflow: visible; }
.curve-safe { position: absolute; left: 0; right: 0; top: var(--y); border-top: 1.5px dashed var(--muted); opacity: .7; }
.curve-line { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.curve-marks { position: absolute; inset: 0 0 auto; height: clamp(150px, 22vw, 250px); pointer-events: none; }
.curve-dot { position: absolute; left: var(--x); top: var(--y); width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--brine); border: 3px solid var(--amber); }
.curve-mark { position: absolute; left: var(--x); top: var(--y); font: 600 1.05rem/1 var(--sans); color: var(--amber); font-variant-numeric: tabular-nums; white-space: nowrap; }
.curve-start { transform: translate(-2px, -34px); }
.curve-end { transform: translate(-50%, 18px); }
.curve-safe-label { position: absolute; right: 0; top: var(--y); transform: translateY(-140%); color: var(--muted); font-size: .95rem; }
.curve figcaption { margin-top: 36px; color: var(--muted); font-size: .98rem; max-width: 40em; }

.js .curve-svg { clip-path: inset(-10px 100% -10px -10px); animation: pour 2.4s cubic-bezier(.33, .1, .25, 1) .35s forwards; }
.js .curve-dot-end, .js .curve-end { opacity: 0; animation: arrive .5s ease-out 2.55s forwards; }
@keyframes pour { to { clip-path: inset(-10px -10px -10px -10px); } }
@keyframes arrive { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .js .curve-svg { animation: none; clip-path: none; }
  .js .curve-dot-end, .js .curve-end { animation: none; opacity: 1; }
}

.shot { margin-top: clamp(40px, 6vw, 64px); }
.shot img { width: 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45)); }

/* ---- Sections ---- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section h2 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); letter-spacing: -0.008em; }
.section-text { margin-top: 12px; color: var(--soft); font-size: 1.2rem; }

/* A ferment's life, as Brinebook's journal shows it: a dot for each day on one line */
.days { list-style: none; padding: 0; margin-top: clamp(36px, 5vw, 56px); max-width: 860px; }
.day { position: relative; display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 40px; padding-bottom: 40px; }
.day::before { content: ''; position: absolute; left: calc(9rem + 19px); top: 12px; bottom: -12px; width: 1.5px; background: var(--line); }
.day:last-child::before { display: none; }
.day::after { content: ''; position: absolute; left: calc(9rem + 14px); top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--brine); border: 2.5px solid var(--jar-light); }
.day > div { padding-left: 8px; }
.day-when { font: 500 1.3rem/1.2 var(--serif); color: var(--label); text-align: right; }
.day h3 { font-size: 1.55rem; }
.day p:not(.day-when) { margin-top: 8px; color: var(--soft); max-width: 36em; }

.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: clamp(40px, 6vw, 72px); padding-top: 40px; border-top: 1px solid var(--line); }
.more h3 { font-size: 1.4rem; }
.more p { margin-top: 8px; color: var(--soft); font-size: 1.05rem; }

/* ---- Download: three jar labels on the brine ---- */
.download { background: var(--brine-2); }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 40px; align-items: start; }
.platform {
  display: flex; flex-direction: column; gap: 18px; padding: 26px 24px 22px;
  background: var(--label); color: var(--label-ink); border-radius: 18px;
}
.p-head { display: flex; align-items: center; gap: 14px; }
.p-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--label-ink); }
.p-icon svg { width: 24px; height: 24px; fill: var(--label); }
.p-icon rect, .p-icon [d^="M7 9"] { fill: none; stroke: var(--label); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p-head h3 { font-size: 1.55rem; }
.p-head p { color: var(--label-muted); font-size: .95rem; line-height: 1.35; margin-top: 2px; }
.p-actions { display: grid; gap: 10px; }
.p-actions .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.25; }
.p-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p-pair:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
.p-pair .btn { padding: 10px; font-size: .95rem; border-radius: 14px; }
.p-pair .btn > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.p-pair .btn.soon { flex-direction: column; gap: 6px; }
.p-arch { font: 400 .8rem/1 var(--mono); opacity: .8; }
.p-help { border-top: 1px solid rgba(26, 41, 37, 0.15); padding-top: 14px; }
.p-help summary { cursor: pointer; font-weight: 700; font-size: .98rem; }
.p-help p { color: var(--label-muted); font-size: .95rem; margin-top: 10px; }
.p-help p b { color: var(--label-ink); }
.p-help .cmd { margin-top: 10px; }
.p-key { overflow-wrap: anywhere; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--label-ink); }
.cmd code { color: var(--label); font-size: .82rem; overflow-wrap: anywhere; }
.copy { flex: none; font: 700 .85rem/1 var(--sans); padding: 8px 12px; border-radius: 8px; border: 0; cursor: pointer; background: var(--label); color: var(--label-ink); }
.copy.done { background: var(--jar-light); }
.p-version { color: var(--label-muted); font-size: .9rem; font-variant-numeric: tabular-nums; margin-top: auto; }
.platform.current { box-shadow: 0 0 0 3px var(--jar-light); }

/* ---- Questions ---- */
.faq > * { max-width: 820px; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0; font: 500 1.35rem/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--sans); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 24px; color: var(--soft); max-width: 38em; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: .98rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: center; }
.footer .brand { font-size: 1.15rem; color: var(--text); }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer nav:first-of-type { justify-content: flex-end; }
.footer-langs { grid-column: 1 / -1; }
.footer-langs a[aria-current="page"] { color: var(--text); }
.footer-copy { grid-column: 1 / -1; }

/* ---- The legal notice and the 404 page ---- */
.page { min-height: 100vh; padding: 48px 0 72px; }
.page .brand { margin-bottom: 48px; }
.legal { max-width: 720px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 14px; }
.legal h2 { font-size: 1.45rem; margin: 32px 0 8px; }
.legal p, .legal address { color: var(--soft); font-style: normal; }
.legal a { color: var(--text); }
.legal-translation { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.legal-back { margin-top: 56px; }
.notfound { text-align: left; }
.notfound-code { font: 500 clamp(5rem, 16vw, 9rem)/1 var(--serif); color: var(--amber); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 8px; }
.notfound p:not(.notfound-code) { margin: 14px 0 32px; color: var(--soft); max-width: 32em; }

/* ---- Narrower screens ---- */
@media (max-width: 960px) {
  .platforms { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .more { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .lang { margin-left: auto; }
  .nav-inner { gap: 12px; }
  .lang-name { display: none; }
  .day { grid-template-columns: minmax(0, 1fr); padding-left: 34px; }
  .day::before { left: 5px; }
  .day::after { left: 0; }
  .day-when { text-align: left; font-size: 1.1rem; color: var(--jar-light); margin-bottom: 4px; }
  .day > div { padding-left: 0; }
  .curve-safe-label { left: 0; right: auto; transform: translateY(10px); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer nav:first-of-type { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .brand span { font-size: 1.2rem; }
  .p-pair { grid-template-columns: minmax(0, 1fr); }
}
