/* Libut Café — public site.
   Palette and type come from the app (docs/02-design.md, lib/theme/): Stone & Matcha in light,
   Basalt & Matcha in dark, Newsreader for display, Geist for everything else. Coffee and crema
   are the caffeine cup's colours (lib/theme/cup_colors.dart). The one loud thing is the postcard
   on the home page, after the app's own "Postcard" share design. */

@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-VF.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-Italic-VF.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #ECEAE5;          /* Stone */
  --paper: #F6F4F0;       /* surface */
  --paper-2: #E3E0DA;     /* surfaceMuted */
  --ink: #1B1F1C;
  --ink-2: #5C605A;       /* textMuted */
  --line: #CFCBC3;
  --accent: #3F6B2E;      /* matcha */
  --coffee: #6B4630;      /* the cup's coffee */
  --crema: #B98A62;       /* the cup's crema, decoration only */
  --field: #3F6B2E;       /* the postcard's picture side */
  --band: #1B1F1C;        /* the promise band */
  --on-band: #ECEAE5;
  --on-band-2: #A8C98E;
  --shadow: 0 1px 0 rgba(27, 31, 28, .06), 0 30px 60px -30px rgba(27, 31, 28, .45);
  --phone-edge: #1B1F1C;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: min(1180px, 100% - 32px);
  --radius-photo: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614;        /* Basalt */
    --paper: #1C1F1B;
    --paper-2: #232622;
    --ink: #E9E6DF;
    --ink-2: #9A9E96;
    --line: #2E322D;
    --accent: #A8C98E;    /* light matcha */
    --coffee: #C79B72;
    --crema: #C79B72;
    --field: #2B3F24;
    --band: #232622;
    --on-band: #E9E6DF;
    --on-band-2: #A8C98E;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 30px 60px -30px rgba(0, 0, 0, .8);
    --phone-edge: #050605;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "ss01" 0;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.wrap { width: var(--wrap); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.site-head .mark { display: block; width: 116px; margin-left: -6px; }
.site-head .mark img { width: 100%; }
.site-head ul { display: flex; gap: 4px 20px; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.site-head nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding-block: 8px; display: inline-block; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); }
.site-head nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- phone frame ---------- */
.phone { margin: 0; position: relative; container-type: inline-size; }
.phone picture { display: block; padding: 3.2cqi; border-radius: 15cqi; background: var(--phone-edge); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 18px 40px -22px rgba(14, 16, 14, .55); }
.phone img { width: 100%; border-radius: 12cqi; }

/* ---------- home: the postcard ---------- */
.hero { padding-block: 12px 72px; }
.card {
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow);
  position: relative;
}
.card-photo {
  position: relative;
  background: var(--field);
  border-radius: 4px 4px 0 0;
  height: clamp(300px, 46vw, 470px);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 40px);
  padding-top: clamp(28px, 4.5vw, 56px);
}
.card-photo .phone { width: clamp(150px, 21vw, 250px); flex: none; }
.card-photo .phone:nth-child(2) { margin-top: -14px; }
.card-photo .phone:nth-child(1), .card-photo .phone:nth-child(3) { margin-top: 30px; }
.card-photo .caption { position: absolute; left: 16px; bottom: 12px; font-size: 12.5px; color: rgba(246, 244, 240, .82); background: rgba(14, 16, 14, .55); padding: 3px 9px; border-radius: 999px; }
.card-back { display: grid; grid-template-columns: 1.25fr 1px 1fr; gap: 0 clamp(20px, 3.4vw, 48px); padding: clamp(24px, 4vw, 52px); }
.card-back::before { content: ""; grid-column: 2; grid-row: 1; background: var(--line); }
.card-greet { grid-column: 1; grid-row: 1; }
.card-addr { grid-column: 3; grid-row: 1; position: relative; padding-top: 6px; }
.greet { font: italic 400 clamp(20px, 2.1vw, 26px)/1.2 var(--serif); color: var(--ink-2); margin-bottom: .35em; }
.hero h1 { font-style: italic; font-weight: 450; font-size: clamp(44px, 6.6vw, 88px); line-height: .98; letter-spacing: -.03em; color: var(--accent); }
.hero .lede { margin-top: 22px; max-width: 34ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink); }
.addr { list-style: none; margin-top: 8px; }
.addr li { border-bottom: 1px solid var(--line); padding: 10px 0 7px; font-size: 15.5px; color: var(--ink-2); }
.addr li:first-child { padding-top: 0; }
.addr .wm { width: 190px; margin-left: -8px; margin-bottom: -4px; }
.status { margin-top: 22px; font-size: 15.5px; }
.status strong { display: block; font: italic 500 26px/1.15 var(--serif); color: var(--coffee); letter-spacing: -.01em; }
.status span { color: var(--ink-2); }
.stamp-wrap { position: absolute; top: -6px; right: 0; width: 92px; height: 108px; }
.stamp {
  width: 84px; height: 100px; padding: 8px;
  background: var(--paper-2);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 3.2px, #000 3.7px) -5px -5px / 10px 10px round, linear-gradient(#000 0 0) content-box;
  mask: radial-gradient(circle at 50% 50%, transparent 3.2px, #000 3.7px) -5px -5px / 10px 10px round, linear-gradient(#000 0 0) content-box;
  display: grid; place-items: center;
  rotate: 3deg;
}
.stamp img { width: 64px; height: 64px; border-radius: 2px; }
.postmark { position: absolute; left: -66px; top: 34px; width: 128px; height: 80px; color: var(--coffee); opacity: .8; pointer-events: none; }
.postmark text { font: 500 10.5px var(--sans); letter-spacing: .06em; fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .postmark { animation: stamp 520ms cubic-bezier(.2, .7, .2, 1) 450ms both; }
  @keyframes stamp { from { opacity: 0; transform: scale(1.18) rotate(-6deg); } to { opacity: .8; transform: none; } }
}
@media (min-width: 960px) {
  .card { rotate: -.7deg; }
}
@media (max-width: 760px) {
  .card-back { grid-template-columns: 1fr; padding: 24px 20px 26px; }
  .card-back::before { grid-column: 1; grid-row: 2; height: 1px; margin-block: 26px 22px; }
  .card-greet { grid-column: 1; grid-row: 1; }
  .card-addr { grid-column: 1; grid-row: 3; }
  .card-photo .phone:nth-child(3) { display: none; }
  .card-photo .phone { width: min(44vw, 210px); }
  .stamp-wrap { top: -2px; }
  .postmark { left: auto; right: 22px; top: 70px; width: 104px; height: 65px; }
  .addr li { padding-right: 112px; }
  .addr li:nth-child(n+3) { padding-right: 0; }
  .addr .wm { width: 160px; }
}

/* ---------- libut, defined ---------- */
.define { padding-block: 8px 88px; }
.define .wrap { display: grid; grid-template-columns: auto 1fr; gap: 8px clamp(24px, 5vw, 72px); align-items: baseline; border-top: 1px solid var(--line); padding-top: 32px; }
.define .word { font: italic 450 clamp(56px, 9vw, 120px)/.9 var(--serif); letter-spacing: -.035em; color: var(--ink); }
.define .meaning { font: 400 clamp(22px, 2.4vw, 30px)/1.3 var(--serif); max-width: 30ch; }
.define .note { margin-top: 12px; color: var(--ink-2); max-width: 52ch; font-size: 15.5px; }
@media (max-width: 640px) { .define .wrap { grid-template-columns: 1fr; } }

/* ---------- sections ---------- */
.section { padding-block: 40px 96px; }
.sec-head { max-width: 640px; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(34px, 4.4vw, 54px); }
.sec-head p { margin-top: 14px; color: var(--ink-2); font-size: 18px; max-width: 52ch; }

/* the stops: a rack of screens */
.stops { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 64px clamp(28px, 4vw, 56px); }
.stop .phone { width: min(100%, 260px); margin-bottom: 26px; }
.stop:nth-child(3n+2) { margin-top: 72px; }
.stop h3 { font-size: 26px; margin-bottom: 10px; }
.stop p { color: var(--ink); max-width: 38ch; }
.ticks { list-style: none; margin-top: 14px; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.ticks li { padding-left: 20px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 10px; border-radius: 50%; background: var(--crema); rotate: 25deg; }
@media (max-width: 980px) {
  .stops { grid-template-columns: repeat(2, 1fr); }
  .stop:nth-child(3n+2) { margin-top: 0; }
  .stop:nth-child(2n) { margin-top: 72px; }
}
@media (max-width: 600px) {
  .stops { grid-template-columns: 1fr; gap: 56px; }
  .stop:nth-child(2n) { margin-top: 0; }
  .stop { display: grid; grid-template-columns: 132px 1fr; gap: 0 18px; align-items: start; }
  .stop .phone { grid-row: span 3; margin-bottom: 0; }
  .stop h3 { font-size: 22px; }
  .stop p { font-size: 15.5px; }
  .ticks { grid-column: 1 / -1; margin-top: 16px; }
}

.corner { margin-top: 96px; background: var(--paper); border-radius: 4px; display: grid; grid-template-columns: 1fr 280px; gap: 32px clamp(32px, 6vw, 96px); padding: clamp(28px, 5vw, 64px); align-items: center; }
.corner h3 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 14px; }
.corner p { max-width: 48ch; }
.corner .phone { width: 100%; }
@media (max-width: 760px) { .corner { grid-template-columns: 1fr; } .corner .phone { width: min(240px, 70%); } }

.trio { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px clamp(24px, 4vw, 48px); margin-top: 72px; }
.trio li { border-top: 1px solid var(--line); padding-top: 18px; }
.trio h3 { font-size: 22px; margin-bottom: 8px; }
.trio p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } }
.fine { margin-top: 40px; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }

/* trust */
.trust { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px clamp(32px, 6vw, 96px); }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } }
.seals { display: grid; gap: 16px; margin-top: 8px; }
.seal { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: start; padding-top: 16px; border-top: 1px solid var(--line); }
.seal .tag { font: italic 500 21px/1.2 var(--serif); }
.seal .tag small { display: block; font: 400 13px/1.4 var(--sans); color: var(--ink-2); margin-top: 4px; }
.seal p { color: var(--ink-2); font-size: 15.5px; }
.seal.verified .tag { color: var(--accent); }
.wont { list-style: none; display: grid; gap: 22px; }
.wont h3 { font-size: 22px; margin-bottom: 18px; }
.wont li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.wont svg { width: 16px; height: 16px; margin-top: 6px; color: var(--coffee); }
.wont strong { font-weight: 500; display: block; }
.wont span { color: var(--ink-2); font-size: 15.5px; }

/* promise band */
.band { background: var(--band); color: var(--on-band); padding-block: clamp(56px, 8vw, 104px); }
.band .promise { margin: 0; font: italic 450 clamp(32px, 4.6vw, 60px)/1.08 var(--serif); letter-spacing: -.02em; max-width: 20ch; color: var(--on-band); }
.band .promise + p { margin-top: 26px; max-width: 64ch; color: color-mix(in srgb, var(--on-band) 78%, transparent); }
.band a { color: var(--on-band-2); }

/* closing */
.closing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .closing { grid-template-columns: 1fr; } }
.panel { border-radius: 4px; padding: clamp(26px, 4vw, 44px); background: var(--paper); }
.panel h2 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 14px; }
.panel p { color: var(--ink-2); max-width: 46ch; }
.panel p + p { margin-top: 12px; }
.panel-soon { border: 1px dashed var(--line); background: transparent; }
.btn { display: inline-flex; align-items: center; min-height: 48px; margin-top: 24px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--accent); color: var(--paper); }
@media (prefers-color-scheme: dark) { .btn:hover { color: #141614; } }
.soon-line { margin-top: 20px; font: italic 500 22px/1.3 var(--serif); color: var(--coffee); }

/* ---------- inner pages ---------- */
.doc-wrap { padding-block: 24px 96px; }
.doc-title { max-width: 760px; padding-block: 40px 40px; }
.doc-title h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -.03em; }
.doc-title .intro { margin-top: 18px; font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-2); max-width: 54ch; }
.doc-title .meta { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.doc-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 clamp(32px, 6vw, 88px); align-items: start; border-top: 1px solid var(--line); padding-top: 36px; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 24px; font-size: 14.5px; }
@media (max-width: 900px) { .toc { position: static; margin-bottom: 40px; padding: 18px 20px; background: var(--paper); border-radius: 4px; } }
.toc h2 { font: 500 14.5px/1.4 var(--sans); color: var(--ink); margin-bottom: 10px; letter-spacing: 0; }
.toc ol { list-style: none; display: grid; gap: 2px; }
.toc a { color: var(--ink-2); text-decoration: none; display: block; padding: 5px 0; line-height: 1.35; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.doc { max-width: 68ch; }
.doc > * + * { margin-top: 16px; }
.doc h2 { font-size: clamp(28px, 3vw, 34px); margin-top: 56px; scroll-margin-top: 20px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 22px; margin-top: 32px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--ink-2); }
.doc strong { font-weight: 600; }
.doc .summary { background: var(--paper); border-left: 3px solid var(--accent); padding: 20px 22px; border-radius: 0 4px 4px 0; }
.doc .callout { background: var(--paper); padding: 20px 22px; border-radius: 4px; margin-top: 40px; }
.steps { list-style: none; padding-left: 0 !important; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; margin: 0 !important; }
.steps li::before { content: counter(s); font: italic 500 26px/1.1 var(--serif); color: var(--accent); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; font-size: 14px; color: var(--ink-2); }
tbody th { font-weight: 500; width: 34%; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; }

/* for cafés */
.checks { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.checks li { margin: 0 !important; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checks strong { display: block; font-weight: 600; }
.checks span { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 600px) { .checks { grid-template-columns: 1fr; } }
.doc-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-block: 28px 8px !important; }
.doc-shots figure { margin: 0; }
.doc-shots figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 600px) { .doc-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc-shots figure:last-child { display: none; } }

/* press */
.brand-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brand-tiles figure { margin: 0; border-radius: 4px; padding: 24px 18px; display: grid; place-items: center; }
.t-light { background: #ECEAE5; border: 1px solid #CFCBC3; }
.t-dark { background: #141614; border: 1px solid #2E322D; }
.assets { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.assets li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.assets span { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.press-shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.press-shots figure { margin: 0; }
.press-shots a { display: block; text-decoration: none; }
.press-shots figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 640px) { .press-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swatches { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.swatches li { margin: 0 !important; font-size: 14.5px; }
.chip { height: 64px; border-radius: 4px; border: 1px solid var(--line); margin-bottom: 8px; }
.c-stone { background: #ECEAE5; } .c-surface { background: #F6F4F0; } .c-ink { background: #1B1F1C; }
.c-matcha { background: #3F6B2E; } .c-basalt { background: #141614; } .c-lmatcha { background: #A8C98E; }
@media (max-width: 520px) { .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 404 */
.lost { padding-block: 72px 120px; max-width: 640px; }
.lost h1 { font-style: italic; font-size: clamp(48px, 8vw, 96px); color: var(--accent); letter-spacing: -.03em; }
.lost p { margin-top: 20px; font-size: 19px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px 48px; margin-top: 24px; }
.site-foot .wrap { display: grid; grid-template-columns: auto 1fr; gap: 20px 48px; align-items: start; }
.site-foot .mark { width: 140px; display: block; margin-left: -7px; }
.site-foot .tag { font: italic 400 18px/1.35 var(--serif); color: var(--ink-2); max-width: 30ch; margin-top: 8px; }
.site-foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.site-foot nav a { font-size: 15px; color: var(--ink-2); text-decoration: none; padding-block: 6px; display: inline-block; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .by { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--ink-2); padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .site-foot .wrap { grid-template-columns: 1fr; }
  .site-foot ul { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .site-head .mark { width: 96px; }
  .site-head ul { gap: 2px 14px; }
  .site-head nav a { font-size: 14.5px; }
}
