/* 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;
  --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); }
.chip.note { display: inline-flex; align-items: center; gap: 8px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* 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; }


/* Two problems */
.problems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.problem {
  position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.problem::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--accent); }
.problem h3 { font-size: clamp(24px, 2.6vw, 28px); letter-spacing: -0.02em; line-height: 1.2; padding-right: 72px; }
.problem p { margin: 0; color: var(--mid); }
.problem-bean { position: absolute; top: 24px; right: 24px; width: 48px; height: 64px; object-fit: contain; transform: rotate(14deg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Farm */
.farm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }

/* Learn page */
.tip-group { margin-top: 56px; }
.tip-group h2 { font-size: 28px; margin-bottom: 24px; }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tip { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.tip h3 { font-size: 22px; line-height: 1.25; }
.tip p { margin: 0; line-height: 1.6; }
.tip .takeaway { font-weight: 600; color: var(--ink); border-left: 3px solid var(--mustard); padding-left: 12px; }
.tip .source { font-size: 13px; color: var(--mid); margin-top: auto; }
.tip-art { display: flex; align-items: flex-end; }
.tip-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tip-number { font: 700 56px/1 var(--display); letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.tip-beans { display: flex; align-items: flex-end; gap: 16px; }
.tip-beans img { width: 40px; height: auto; }
.tip-beans figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tip-beans figcaption { font-size: 12px; font-weight: 600; color: var(--mid); }
.tip-branch { width: 96px; height: auto; transform: rotate(-6deg); }
.learn-cta { margin-top: 64px; display: flex; align-items: center; gap: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 32px; }
.learn-cta .roaster { width: 72px; margin: 0; flex: none; }
.learn-cta div { flex: 1; }
.learn-cta p { margin: 0; color: var(--mid); }
.learn-cta .learn-cta-title { font: 700 22px/1.25 var(--display); color: var(--ink); margin-bottom: 4px; }
.learn-cta .btn { flex: none; }
@media (max-width: 760px) {
  .tips { grid-template-columns: 1fr; gap: 16px; }
  .tip { padding: 24px; }
  .learn-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* FAQ */
.faq { max-width: 46em; border-top: 1px solid var(--line); }
.faq summary { font: 700 20px/1.3 var(--display); padding-block: 8px; }
.faq details p { font-size: 16px; line-height: 1.6; max-width: 40em; }

/* Waitlist */
.waitlist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 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: minmax(16em, 1fr) auto; gap: 32px; padding-block: 40px; font-size: 14px; color: var(--mid); }
/* Links stay on one row next to the text, so none ends up alone on a second line. */
.site-foot nav { display: flex; flex-wrap: nowrap; 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; text-wrap: balance; }
.site-foot p + p { margin-top: 6px; }
@media (max-width: 1000px) {
  .site-foot .wrap { grid-template-columns: 1fr; }
  .site-foot nav { justify-content: flex-start; flex-wrap: wrap; }
}

@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; }
  .problems { grid-template-columns: 1fr; gap: 16px; }
  .problem { padding: 24px; }
  .problem-bean { top: 16px; right: 16px; width: 40px; height: 56px; }
}
@media (max-width: 420px) {
  .recipe b { font-size: 18px; }
}
@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); }
.farm-art { margin: 0; display: flex; justify-content: center; order: -1; }
/* Our promise: the farmer thank-you, Parchment's main difference. Brown like the app screen. */
.band.promise { background: var(--ink); color: var(--paper); }
.promise h2 { color: var(--paper); }
.promise .overline { color: var(--mustard); }
.promise .lede { color: var(--paper); text-wrap: pretty; }
.only { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; font-weight: 600; font-size: 16px; text-wrap: balance; }
.only .check { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--mustard); color: var(--ink); display: grid; place-items: center; }
.plant { width: min(340px, 80%); height: auto; }
.waitlist-side { display: flex; flex-direction: row; align-items: flex-end; gap: 24px; }
.roaster { width: 150px; height: auto; margin-bottom: -18px; position: relative; z-index: 1; }
.waitlist-side .waitlist-card { flex: 1; }
.waitlist-side .roaster { width: 96px; margin-bottom: 0; flex: none; }
@media (max-width: 860px) {
  .hero-art { justify-self: start; max-width: 420px; margin-top: 12px; }
  .bean.b1 { right: 4px; }
  .bean.b3 { right: -10px; }
  .plant { width: min(260px, 65%); }
  .farm-art { order: 0; }
  .waitlist-side .roaster { width: 72px; }
  .waitlist { gap: 32px; }
}

/* Email confirmed page */
.confirm-page .wrap { min-height: 60vh; display: grid; place-items: center; }
.confirm-card { max-width: 34em; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.confirm-card[hidden] { display: none; }
.confirm-bean { width: 64px; height: auto; margin-bottom: 8px; }

/* Set a new password page */
.pw-form { width: 100%; max-width: 22em; display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 12px; }
.pw-form label { font: 600 13px/1.3 var(--body); color: var(--ink); }
.pw-form input[type="password"], .pw-form input[type="text"] { font: 400 16px/1.2 var(--body); color: var(--ink); min-height: 48px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); width: 100%; }
.pw-form input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 12px; }
.pw-hint { font-size: 12px; color: var(--mid); margin: 0; }
.pw-form #code-step:not([hidden]) { display: flex; flex-direction: column; gap: 8px; }
.pw-show { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--mid) !important; min-height: 44px; cursor: pointer; }
.pw-show input { width: 18px; height: 18px; accent-color: var(--leaf); }
.pw-error { font-size: 13px; color: var(--cherry); margin: 0; }
.pw-form .btn { justify-content: center; min-height: 52px; font-size: 15px; margin-top: 4px; }
.pw-form .btn[disabled] { opacity: 0.6; cursor: default; }

/* Winter: hand-drawn snowflakes hanging from the top of the homepage (index.html only) */
.hangers { position: absolute; top: 0; left: 0; right: 0; height: 0; z-index: 5; pointer-events: none; }
.hanger {
  --size: 58px; --drop: 60px; --delay: 0s;
  position: absolute; top: 0; width: var(--size); margin-left: calc(var(--size) / -2);
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: hanger-drop 0.9s var(--delay) both, hanger-swing 3.4s calc(var(--delay) + 0.35s) ease-in-out both;
}
.hanger i { width: 1.5px; height: var(--drop); background: #221d1d; border-radius: 1px; }
.hanger img { display: block; width: 100%; height: auto; margin-top: -1px; }
.hanger.h1 { left: max(34px, calc(50% - 610px)); --drop: 150px; --size: 54px; --delay: 0.15s; }
.hanger.h2 { left: 44%; --drop: 26px; --size: 46px; --delay: 0.45s; }
.hanger.h3 { left: calc(50% + 78px); --drop: 96px; --size: 62px; --delay: 0s; }
.hanger.h4 { left: min(calc(100% - 34px), calc(50% + 600px)); --drop: 210px; --size: 50px; --delay: 0.3s; }
@keyframes hanger-drop {
  0% { translate: 0 -105%; animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  48% { translate: 0 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  64% { translate: 0 -16px; animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.5); }
  80% { translate: 0 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  90% { translate: 0 -5px; animation-timing-function: ease-in; }
  100% { translate: 0 0; }
}
@keyframes hanger-swing {
  0% { rotate: 0deg; } 14% { rotate: 7deg; } 32% { rotate: -5deg; } 50% { rotate: 3.2deg; }
  68% { rotate: -1.8deg; } 84% { rotate: 0.8deg; } 100% { rotate: 0deg; }
}
@media (max-width: 1320px) { .hanger.h1, .hanger.h4 { display: none; } }
@media (max-width: 860px) {
  .hanger.h3 { display: none; }
  .hanger.h4 { display: flex; }
  .hanger.h2 { left: 58%; --drop: 14px; --size: 38px; }
  .hanger.h4 { left: calc(100% - 30px); --drop: 120px; --size: 40px; }
}
@media (prefers-reduced-motion: reduce) { .hanger { animation: none; } }
