/* Parchment website — tokens follow the app's design system (single light look, like the app) */
:root {
  /* Layout: one 1080px column; hero splits text | brew card, stacks on phones */
  --bg: #f5efe3;        /* oat */
  --paper: #fffcf6;
  --soft: #efe6d6;
  --line: #dad3c8;
  --ink: #342722;       /* espresso */
  --mid: #6a5f58;
  --leaf: #526d4c;
  --mustard: #e9a23b;
  --cherry: #9a3035;
  --rank-curious: #8fa876;
  --rank-explorer: #e6c35c;
  --rank-taster: #e08a3c;
  --rank-enthusiast: #b5413b;
  --rank-connoisseur: #5a3626;
  --display: "Judson", Georgia, "Times New Roman", serif;
  --body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1080px;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
}
img, svg { max-width: 100%; }
a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 30px; height: auto; color: var(--ink); }
.brand span { font: 700 26px/1 var(--display); letter-spacing: -0.07em; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; padding-block: 10px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--leaf); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.04em; }
h2 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -0.03em; }
h3 { font-size: 22px; letter-spacing: -0.02em; }
.lede { font-size: 18px; color: var(--mid); max-width: 34em; margin: 0; }
.overline { font: 600 12px/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); margin: 0; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; padding-block: 72px 64px; }
.hero-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 52px; padding: 8px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
}
.store small { font-size: 11px; letter-spacing: 0.04em; opacity: 0.8; }
.store b { font-size: 15px; font-weight: 600; }
.store.is-soon { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }

/* Brew card (a real entry, as it appears in the app) */
.brew-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 18px 40px -24px rgba(52, 39, 34, 0.35);
  transform: rotate(1.5deg);
}
.brew-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.brew-top b { font: 700 22px/1.1 var(--display); }
.brew-top span { font-size: 13px; color: var(--mid); white-space: nowrap; }
.recipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.recipe div { background: var(--bg); border-radius: 12px; padding: 10px 6px; text-align: center; }
.recipe b { display: block; font: 700 20px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.recipe small { font-size: 11px; color: var(--mid); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.chip.on { background: var(--leaf); border-color: var(--leaf); color: var(--paper); }
.brew-note { font-size: 14px; color: var(--mid); border-top: 1px solid var(--line); padding-top: 12px; margin: 0; }

/* Sections */
.band { padding-block: 72px; }
.band.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 40em; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.feature svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--soft); color: var(--ink); }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--mid); }

/* Rank ladder */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ladder li { border-radius: var(--radius); padding: 16px 14px 18px; background: var(--bg); border-top: 6px solid var(--c); display: flex; flex-direction: column; gap: 4px; }
.ladder b { font: 700 20px/1.1 var(--display); }
.ladder span { font-size: 13px; color: var(--mid); font-variant-numeric: tabular-nums; }

/* Farm note */
.farm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.note {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 0; font: 400 21px/1.5 var(--display);
}
.note figcaption { font: 600 13px/1.4 var(--body); color: var(--mid); margin-top: 14px; }

/* Waitlist */
.waitlist { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.waitlist-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.waitlist-card p { margin: 0; font-size: 14px; color: var(--mid); }
.store:not(.is-soon) b { font-size: 15px; }

/* Legal / support pages */
.doc .wrap { padding-block: 56px 80px; }
.doc-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; max-width: 46em; }
.prose { max-width: 46em; }
.prose h2 { font-size: 28px; margin: 44px 0 12px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--soft); }
.callout { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 20px 0; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; margin: 0 !important; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.email code { font: 600 15px/1.4 var(--body); background: var(--soft); padding: 8px 12px; border-radius: 10px; user-select: all; word-break: break-all; }
.btn { font: 600 14px/1 var(--body); padding: 12px 18px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn.primary { background: var(--ink); color: var(--paper); }
details { border-bottom: 1px solid var(--line); padding-block: 14px; }
summary { font-weight: 600; cursor: pointer; min-height: 32px; }
details p { margin: 10px 0 0; color: var(--mid); }
.todo { background: #fbe9c6; border-radius: 4px; padding: 0 4px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--soft); }
.site-foot .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; padding-block: 40px; font-size: 14px; color: var(--mid); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; align-content: start; }
.site-foot nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding-block: 8px; }
.site-foot p { margin: 0; }
.site-foot p + p { margin-top: 6px; }

@media (max-width: 860px) {
  .hero .wrap, .farm, .waitlist { grid-template-columns: 1fr; }
  .hero .wrap { gap: 40px; padding-block: 48px; }
  .brew-card { transform: none; max-width: 420px; }
  .features { grid-template-columns: 1fr; gap: 28px; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .site-foot nav { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .recipe b { font-size: 18px; }
  .ladder { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Hand-drawn illustrations */
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.hero-art .brew-card { position: relative; z-index: 1; }
.hero { overflow-x: clip; }
.bean { position: absolute; z-index: 0; height: auto; pointer-events: none; }
.bean.b1 { width: 70px; top: -44px; right: -18px; transform: rotate(18deg); }
.bean.b2 { width: 56px; bottom: -30px; left: -26px; transform: rotate(-24deg); z-index: 2; }
.bean.b3 { width: 46px; bottom: 34px; right: -34px; transform: rotate(52deg); }
.rank-bean { width: 40px; height: 46px; object-fit: contain; object-position: left bottom; margin-bottom: 8px; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.ladder li:hover .rank-bean { transform: rotate(-12deg) translateY(-2px); }
.farm-art { margin: 0; display: flex; justify-content: center; }
.branch { width: min(360px, 80%); height: auto; transform: rotate(-4deg); }
.waitlist-side { display: flex; flex-direction: column; align-items: center; gap: 0; }
.roaster { width: 150px; height: auto; margin-bottom: -18px; position: relative; z-index: 1; }
.waitlist-side .waitlist-card { width: 100%; }
@media (max-width: 860px) {
  .hero-art { justify-self: start; max-width: 420px; margin-top: 12px; }
  .bean.b1 { right: 4px; }
  .bean.b3 { right: -10px; }
  .branch { width: min(280px, 70%); }
  .roaster { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { .rank-bean { transition: none; } .ladder li:hover .rank-bean { transform: none; } }
