/* Kawa website. Same system as the app (apps/mobile/src/constants/theme.ts): white
   enamel, a cobalt rim, coffee brown for the coffee itself, one typeface (Atkinson
   Hyperlegible Next, self-hosted: the site makes no third-party requests either).
   The page is a cupboard: screens stand on cobalt shelves, labelled underneath.
   No build step, no JavaScript. */

@font-face { font-family: "Atkinson"; src: url("/fonts/AtkinsonNext-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/AtkinsonNext-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/AtkinsonNext-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --enamel: #f1f3ef;
  --sheet: #ffffff;
  --ink: #1b2333;
  --ink-soft: #566072;
  --cobalt: #2b47a6;
  --on-cobalt: #ffffff;
  --coffee: #7a4a2a;
  --line: #d5dad2;
  --bezel: #1b2333;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --enamel: #121722; --sheet: #1b2232; --ink: #e9edf4; --ink-soft: #a3adbd;
    --cobalt: #93a9f2; --on-cobalt: #121722; --coffee: #c68b5e; --line: #2a3242; --bezel: #2a3242;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font: 400 1.125rem/1.6 "Atkinson", system-ui, -apple-system, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 38rem; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 2.25rem; height: 2.25rem; border-radius: 0.55rem; }
.lang { font-weight: 600; }

/* Type */
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.4rem, 5.5vw, 4.1rem); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-weight: 600; font-size: 1.3rem; line-height: 1.3; }
p { margin: 0; }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--ink-soft); }
.soft { color: var(--ink-soft); }
.small { font-size: 0.95rem; }

/* A shelf: things stand on a cobalt rim, labels sit under it. */
.shelf { position: relative; }
.shelf-items { display: flex; align-items: flex-end; gap: clamp(1rem, 3vw, 2.5rem); }
.rim { height: 4px; border-radius: 2px; background: var(--cobalt); margin: 0 -1.25rem; }
.shelf-labels { display: flex; gap: clamp(1rem, 3vw, 2.5rem); padding-top: 1rem; }
.shelf-labels > * { flex: 1; }

/* Phone: a screenshot in a plain bezel, standing on the rim like a packet. */
.phone {
  flex: 1;
  min-width: 0;
  border: 0.45rem solid var(--bezel);
  border-bottom-width: 0.6rem;
  border-radius: 1.6rem;
  overflow: hidden;
  background: var(--bezel);
}
.phone img { width: 100%; }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 0; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero-text { display: grid; gap: 1.5rem; padding-bottom: clamp(2rem, 6vw, 5rem); }
/* Two packets of different heights; each label sits under its own. */
.hero .shelf-items > :nth-child(2), .hero .shelf-labels > :nth-child(2) { flex: 0.82; }
.availability { display: grid; gap: 0.35rem; }
.availability strong { font-weight: 800; font-size: 1.15rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.5rem; padding: 0 1.4rem; border-radius: 0.65rem;
  background: var(--cobalt); color: var(--on-cobalt);
  font-weight: 800; font-size: 1.1rem; text-decoration: none; width: fit-content;
}

.label-title { font-weight: 600; }
.label-level { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.15rem; }

/* The three squares of the app: how much is left, and here, how far along you are. */
.squares { display: inline-flex; gap: 0.3rem; }
.squares i { width: 0.7rem; height: 0.7rem; border-radius: 0.14rem; border: 1.5px solid var(--line); }
.squares i.on { background: var(--coffee); border-color: var(--coffee); }

/* Sections */
section { padding: clamp(4rem, 9vw, 7rem) 0 0; }
.section-head { display: grid; gap: 1rem; margin-bottom: 2.5rem; }

/* Formats */
.formats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-top: 2.5rem; }
.format { display: grid; justify-items: center; gap: 0.6rem; padding: 1.4rem 0.5rem; border: 2px solid var(--line); border-radius: 0.65rem; background: var(--sheet); font-weight: 600; }
.format svg { width: 2.2rem; height: 2.2rem; color: var(--ink); }

/* Steps: a second shelf, three screens, the labels say what to do. Each column carries
   its own piece of rim, stretched by half the gap on both sides, so on a wide screen
   the pieces meet into one shelf, and on a phone each step gets its own. */
.steps { list-style: none; margin: 0; padding: 0; --gap: clamp(1.5rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); row-gap: 3.5rem; }
.step { display: grid; align-content: start; }
.step .phone { width: min(100%, 19rem); justify-self: center; }
.step .rim { margin: 0 calc(var(--gap) / -2); }
.step .label { display: grid; gap: 0.45rem; padding-top: 1.1rem; }
.step h3 { margin-top: 0.2rem; }

.formats { list-style: none; padding: 0; }

/* Private */
.private { border-left: 4px solid var(--coffee); padding-left: 1.5rem; display: grid; gap: 1rem; }

/* Footer */
footer { margin-top: clamp(4rem, 9vw, 7rem); padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.95rem; }
footer .cols { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
footer a { color: var(--ink-soft); }
footer .credit { margin-top: 1.25rem; }

/* Text pages (privacy, support) */
.page { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.page h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: 1rem; }
.page h2 { font-size: 1.6rem; margin: 3rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.page h3 { font-size: 1.15rem; margin: 1.75rem 0 0.4rem; }
.page p, .page li { margin: 0.6rem 0; }
.page ul { padding-left: 1.2rem; }
.updated { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.5rem !important; }
.note { border-left: 4px solid var(--coffee); padding-left: 1.25rem; margin: 1.75rem 0; }
table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 1rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem 0.65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); }

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding-bottom: 0; }
  .formats { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step .phone { width: min(78%, 17rem); }
  .step .rim { margin: 0 -1.25rem; }
}
@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .phone { border-width: 0.3rem; border-bottom-width: 0.4rem; border-radius: 1.1rem; }
}
