/* Espresso Air: shared chrome and page components. Loads after scrollcraft.css. */
:root {
  --sc-canvas:     #140d09;
  --sc-surface:    #21170f;
  --sc-ink:        #f7efe4;
  --sc-ink-soft:   #d2c1ad;
  --sc-accent:     #f3e7c4;
  --sc-accent-ink: #1a110c;
  --sc-font-display: "Fraunces", Georgia, serif;
  --sc-font-text:    "Outfit", system-ui, sans-serif;
  --olive: #5f6446;
  --bar-h: 76px;
}
body { overflow-x: clip; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.sc-display { font-weight: 600; text-wrap: balance; }
.sc-display em { font-style: italic; font-weight: 400; }
.kicker { font-size: var(--sc-t-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sc-accent); margin: 0 0 var(--sc-4); }
.lead { font-size: var(--sc-t-lg); line-height: 1.55; color: var(--sc-ink-soft); max-width: 40rem; text-wrap: pretty; }
.prose { max-width: 40rem; color: var(--sc-ink-soft); line-height: 1.7; }
.prose p { margin: 0 0 var(--sc-4); }
.prose strong { color: var(--sc-ink); font-weight: 500; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- bar ------------------------------------------------------------------ */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome); height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-4);
  padding: 0 var(--sc-gutter);
  background: linear-gradient(to bottom, rgb(12 8 5 / 0.78), rgb(12 8 5 / 0));
  transition: background-color var(--sc-d-base);
}
.bar.solid { background: rgb(20 13 9 / 0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--sc-hairline); }
.brand { display: flex; align-items: center; gap: var(--sc-3); color: var(--sc-ink); text-decoration: none; font-weight: 600; letter-spacing: 0.14em; font-size: var(--sc-t-sm); }
.prop { width: 40px; height: 40px; display: block; transform-origin: 50% 51.2%; filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.4)); }
.nav { display: flex; align-items: center; gap: var(--sc-5); }
.nav a.link { white-space: nowrap; color: var(--sc-ink-soft); text-decoration: none; font-size: var(--sc-t-sm); position: relative; padding: var(--sc-2) 0; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--sc-ink); }
.nav a.link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--sc-accent); }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.08); cursor: pointer; }
.burger span { display: block; width: 18px; height: 1.5px; margin: 4px auto; background: var(--sc-ink); transition: transform var(--sc-d-base); }
.drawer {
  position: fixed; inset: 0; z-index: calc(var(--sc-z-chrome) + 1); background: var(--sc-canvas);
  display: flex; flex-direction: column; padding: calc(var(--bar-h) + var(--sc-5)) var(--sc-gutter) var(--sc-7);
  overflow: auto;
}
.drawer[hidden] { display: none; }
.drawer a { color: var(--sc-ink); text-decoration: none; font-family: var(--sc-font-display); font-size: var(--sc-t-2xl); padding: var(--sc-2) 0; border-bottom: 1px solid var(--sc-hairline); }
.drawer a[aria-current="page"] { color: var(--sc-accent); font-style: italic; }
.drawer .x { position: absolute; top: 16px; right: var(--sc-gutter); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sc-2);
  min-height: 44px; padding: 0 var(--sc-5); border: 0; cursor: pointer;
  border-radius: var(--sc-r-pill); background: var(--sc-accent); color: var(--sc-accent-ink);
  font-weight: 500; font-size: var(--sc-t-sm); text-decoration: none; white-space: nowrap; box-shadow: var(--sc-e2);
  transition: transform var(--sc-d-fast) var(--sc-ease-out), background-color var(--sc-d-fast);
}
.pill:hover { background: #fff7e0; }
.pill:active { transform: scale(0.97); }
.pill[disabled] { opacity: 0.45; cursor: not-allowed; }
.pill--ghost { background: color-mix(in oklab, var(--sc-canvas) 55%, transparent); color: var(--sc-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sc-ink) 36%, transparent); }
.pill--ghost:hover { background: color-mix(in oklab, var(--sc-ink) 10%, transparent); }
@keyframes bump { 30% { transform: scale(1.35); } }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: rgb(255 255 255 / 0.08); color: var(--sc-ink); font-size: 20px; }

/* ---- page scaffolding ---------------------------------------------------- */
.wrap { max-width: var(--sc-maxw); margin: 0 auto; padding: 0 var(--sc-gutter); }
.section { padding: var(--sc-section) 0; }
.section--tight { padding: var(--sc-8) 0; }
.h2 { font-size: var(--sc-t-3xl); margin: 0 0 var(--sc-4); line-height: 1; }
.h3 { font-family: var(--sc-font-display); font-weight: 600; font-size: var(--sc-t-xl); margin: 0 0 var(--sc-2); line-height: 1.1; }

/* hero: full-bleed photo with parallax bed, copy bottom-left */
.phero { position: relative; min-height: 88svh; display: flex; align-items: flex-end; overflow: hidden; }
.phero__bed { position: absolute; inset: -12% 0; background-position: center; background-size: cover; }
.phero__shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--sc-canvas) 0%, rgb(20 13 9 / 0.78) 32%, rgb(20 13 9 / 0.2) 70%), linear-gradient(to right, rgb(20 13 9 / 0.7), transparent 62%); }
.phero__copy { position: relative; padding: 0 var(--sc-gutter) clamp(3rem, 10vh, 7rem); max-width: min(46rem, 100%); }
.phero h1 { font-size: clamp(3rem, 1.6rem + 6vw, 7rem); margin: 0 0 var(--sc-5); line-height: 0.95; }
.row { display: flex; flex-wrap: wrap; gap: var(--sc-3); align-items: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-8); align-items: center; }
.split--wide { grid-template-columns: 1.2fr 1fr; }
.frame { border-radius: var(--sc-r-lg); overflow: hidden; box-shadow: var(--sc-edge), var(--sc-e3); background: var(--sc-surface); }
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sc-5); }
.card { border-radius: var(--sc-r-lg); background: var(--sc-surface); box-shadow: var(--sc-edge), var(--sc-e2); overflow: hidden; display: flex; flex-direction: column; }
.card__img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; display: block; }
.card__body { padding: var(--sc-5); display: grid; gap: var(--sc-2); align-content: start; flex: 1; }
.card__body p { margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); line-height: 1.55; }
.tag { font-size: var(--sc-t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sc-accent); }
.rule { height: 1px; background: var(--sc-hairline); border: 0; margin: 0; }
.price { font-variant-numeric: tabular-nums; color: var(--sc-accent); font-weight: 500; }

/* ---- forms ----------------------------------------------------------------- */
.form { display: grid; gap: var(--sc-5); }
.form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-4); }
.field { display: grid; gap: var(--sc-2); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.field > span b { color: var(--sc-accent); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--sc-t-base); color: var(--sc-ink); background: rgb(0 0 0 / 0.25);
  border: 0; border-radius: var(--sc-r-md); padding: var(--sc-3) var(--sc-4); min-height: 48px;
  box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); transition: box-shadow var(--sc-d-fast);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sc-accent); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #e0806b; }
.field .err { color: #f0a08c; font-size: var(--sc-t-xs); min-height: 1em; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin-bottom: var(--sc-2); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--sc-2); }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sc-4); border-radius: var(--sc-r-pill); box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); font-size: var(--sc-t-sm); color: var(--sc-ink); transition: background-color var(--sc-d-fast), color var(--sc-d-fast); }
.chips input:checked + span { background: var(--sc-ink); color: var(--sc-canvas); box-shadow: none; }
.chips input:focus-visible + span { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border-radius: var(--sc-r-pill); box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 19px; border-radius: 50%; }
.stepper button:hover { background: var(--sc-hairline); }
.stepper input { width: 3.2ch; text-align: center; background: transparent; border: 0; color: var(--sc-ink); font: inherit; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.panel { border-radius: var(--sc-r-lg); background: var(--sc-surface); box-shadow: var(--sc-edge), var(--sc-e3); padding: clamp(1.25rem, 3vw, 2.5rem); }
.fine { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin: 0; line-height: 1.5; }
.steps { display: flex; gap: var(--sc-2); margin-bottom: var(--sc-6); list-style: none; padding: 0; counter-reset: s; }
.steps li { flex: 1; font-size: var(--sc-t-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sc-ink-soft); padding-top: var(--sc-3); border-top: 2px solid var(--sc-hairline-strong); transition: color var(--sc-d-base), border-color var(--sc-d-base); }
.steps li[aria-current="step"], .steps li.done { color: var(--sc-ink); border-color: var(--sc-accent); }
.sent { text-align: center; padding: var(--sc-6) 0; }
.sent img { width: 88px; margin: 0 auto var(--sc-5); display: block; animation: spinout 1.8s var(--sc-ease-out); }
@keyframes spinout { from { transform: rotate(-1080deg); } }
.sent pre { text-align: left; white-space: pre-wrap; font: inherit; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); background: rgb(0 0 0 / 0.25); border-radius: var(--sc-r-md); padding: var(--sc-4); max-height: 16rem; overflow: auto; margin: var(--sc-5) 0; }

/* ---- footer ----------------------------------------------------------------- */
.foot { border-top: 1px solid var(--sc-hairline); margin-top: var(--sc-9); }
.foot__in { max-width: var(--sc-maxw); margin: 0 auto; padding: var(--sc-8) var(--sc-gutter) var(--sc-7); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sc-7); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); line-height: 1.7; }
.foot strong { display: block; color: var(--sc-ink); font-weight: 500; margin-bottom: var(--sc-2); }
.foot a { color: var(--sc-ink-soft); text-decoration: none; }
.foot a:hover { color: var(--sc-ink); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot__mark { display: flex; align-items: center; gap: var(--sc-3); color: var(--sc-ink); font-family: var(--sc-font-display); font-size: var(--sc-t-xl); margin-bottom: var(--sc-3); }
.foot__mark img { width: 44px; }
.foot__base { max-width: var(--sc-maxw); margin: 0 auto; padding: var(--sc-4) var(--sc-gutter) var(--sc-7); color: var(--sc-ink-soft); font-size: var(--sc-t-xs); display: flex; justify-content: space-between; gap: var(--sc-4); flex-wrap: wrap; }

.credit { display: inline-flex; align-items: center; gap: 6px; color: var(--sc-ink) !important; }
.credit b { font-family: var(--sc-font-display); font-weight: 600; letter-spacing: 0.04em; }
.credit img { width: 16px; height: 16px; transition: transform 600ms var(--sc-ease-out); }
.credit:hover img { transform: rotate(240deg); }
@media (prefers-reduced-motion: reduce) { .credit:hover img { transform: none; } }

@media (max-width: 1120px) {
  .nav a.link { display: none; }
  .burger { display: inline-block; }
  .foot__in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --bar-h: 64px; }
  .brand span { display: none; }
  .split, .split--wide { grid-template-columns: 1fr; gap: var(--sc-6); }
  .form .grid2 { grid-template-columns: 1fr; }
  .phero { min-height: 82svh; }
}
@media (max-width: 520px) {
  .foot__in { grid-template-columns: 1fr; gap: var(--sc-5); }
  .nav .pill { padding: 0 var(--sc-4); }
}
@media (prefers-reduced-motion: reduce) {
  .sent img { animation: none; }
}

/* ---- shipping bag (bag.js) --------------------------------------------- */
.bagbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--sc-ink); font: inherit; font-size: var(--sc-t-sm); cursor: pointer; }
.bagbtn__n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--sc-accent); color: var(--sc-accent-ink); font-size: 12px; font-weight: 600; }
dialog.bagd { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(28rem, 100%); max-width: 100%; border: 0; padding: 0; background: #f5f4f1; color: #111; box-shadow: -20px 0 60px rgb(0 0 0 / 0.35); }
dialog.bagd[open] { display: flex; flex-direction: column; }
dialog.bagd::backdrop { background: rgb(10 7 5 / 0.55); }
.bagd__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #d9d6cf; }
.bagd__head h2 { margin: 0; font-family: 'Outfit', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; font-size: 18px; }
.bagd__x { border: 0; background: none; font-size: 26px; cursor: pointer; color: #111; width: 40px; height: 40px; }
.bagd__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.bagd__line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e3e0da; }
.bagd__line img, .bagd__ph { width: 72px; height: 90px; object-fit: contain; background: #ebe9e4; mix-blend-mode: multiply; display: block; }
.bagd__info { display: grid; gap: 4px; align-content: start; }
.bagd__name { font-weight: 500; font-size: 14px; }
.bagd__opt { color: #6b6862; font-size: 13px; }
.bagd__qty { display: inline-flex; align-items: center; margin-top: 6px; border: 1px solid #d9d6cf; width: max-content; }
.bagd__qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 16px; color: #111; }
.bagd__qty output { min-width: 24px; text-align: center; font-size: 14px; }
.bagd__right { display: grid; justify-items: end; align-content: space-between; font-size: 14px; font-variant-numeric: tabular-nums; }
.bagd__rm { border: 0; background: none; padding: 0; color: #6b6862; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.bagd__foot { padding: 16px 24px 24px; border-top: 1px solid #d9d6cf; display: grid; gap: 8px; }
.bagd__row { display: flex; justify-content: space-between; font-size: 14px; font-variant-numeric: tabular-nums; }
.bagd__nudge { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.bagd__fine { margin: 4px 0 8px; color: #6b6862; font-size: 12px; line-height: 1.5; }
.bagd__err { margin: 0; color: #a3261b; font-size: 13px; }
.bagd__btn { display: block; width: 100%; min-height: 52px; border: 1px solid #111; background: #111; color: #f5f4f1; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; text-align: center; text-decoration: none; line-height: 50px; }
.bagd__btn--ghost { background: none; color: #111; margin-top: 8px; }
.bagd__btn[disabled] { opacity: 0.6; cursor: progress; }
.bagd__empty { padding: 48px 0; text-align: center; }
.bagd__empty p { margin: 0 0 20px; color: #6b6862; }

/* ---- rewards member points in the header (site.js) -------------------- */
.memberbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--sc-r-pill); color: var(--sc-ink); text-decoration: none; font-size: var(--sc-t-sm); font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }
.memberbtn[hidden] { display: none; }
.memberbtn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc-accent); }
/* Small phones: the points take the place of "Find a café" while logged in. */
@media (max-width: 480px) { .bar:has(.memberbtn:not([hidden])) .pill[href="locations.html"] { display: none; } }
