/* =====================================================================
   Foredeck Coffee Roasters — B2 (Standard tier)
   Warm-dark editorial hospitality. Vanilla CSS, custom properties only.
   ===================================================================== */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --dark:    #281006;   /* espresso near-black */
  --dark-2:  #1c0b03;   /* deeper, for layering */
  --bg:      #faf6ef;   /* warm cream — never #fff */
  --fg:      #2a1d12;   /* body on light */
  --fg-dark: #faf6ef;   /* body on dark */
  --accent:  #f7ac32;   /* toasted amber */
  --accent-deep: #d98c1c;
  --rule:    #e6dccb;
  --rule-dark: #4a2e18;

  /* Section-driven theme vars (flipped by .section-* classes) */
  --sec-bg: var(--bg);
  --sec-fg: var(--fg);
  --sec-rule: var(--rule);
  --sec-accent: var(--accent);
  --sec-muted: #7a6a59;

  --ease-brand: cubic-bezier(.22, 1, .36, 1);

  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-disp: "Fraunces", Georgia, "Times New Roman", serif;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --header-h: 76px;

  --shadow-sm: 0 2px 8px rgba(40, 16, 6, .06);
  --shadow-md: 0 14px 40px rgba(40, 16, 6, .14);
  --shadow-lg: 0 28px 70px rgba(20, 11, 3, .45);
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- Type ------------------------------------------------------------ */
h1, h2, h3 { font-weight: 500; line-height: 1.06; letter-spacing: -0.018em; }
.display {
  font-family: var(--font-disp);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-size: clamp(11px, 1vw, 12.5px);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sec-accent);
}
.lede { font-size: clamp(18px, 2.1vw, 22px); font-weight: 300; line-height: 1.55; color: var(--sec-fg); }
.muted { color: var(--sec-muted); }

/* ---- Layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section {
  position: relative;
  background: var(--sec-bg);
  color: var(--sec-fg);
  padding-block: clamp(64px, 9vw, 132px);
}
.section--tight { padding-block: clamp(44px, 6vw, 84px); }

/* Re-themeable bands (KB §16a) */
.section-cream { --sec-bg: var(--bg);    --sec-fg: var(--fg);      --sec-rule: var(--rule);      --sec-accent: var(--accent-deep); --sec-muted: #7a6a59; }
.section-dark  { --sec-bg: var(--dark);  --sec-fg: var(--fg-dark); --sec-rule: var(--rule-dark); --sec-accent: var(--accent);      --sec-muted: #b39e88; }
.section-amber { --sec-bg: var(--accent);--sec-fg: var(--dark);    --sec-rule: #d9941f;          --sec-accent: var(--dark);        --sec-muted: #6e4413; }

.section-head { max-width: 56ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .eyebrow { display: block; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 56px); }
.section-head h2 em { font-family: var(--font-disp); font-style: italic; font-weight: 400; }
.section-head p { margin-top: 20px; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; white-space: nowrap;
  font-weight: 600; font-size: 14.5px; letter-spacing: .01em;
  background: var(--accent); color: var(--dark);
  transition: transform .45s var(--ease-brand), box-shadow .45s var(--ease-brand), background .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(247,172,50,.32); background: #ffbb47; }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--sec-fg);
  box-shadow: inset 0 0 0 1.4px var(--sec-rule);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.4px var(--sec-accent); background: transparent; transform: translateY(-2px); }
.btn--lg { padding: 16px 30px; font-size: 15.5px; }
.btn .arrow { transition: transform .45s var(--ease-brand); }
.btn:hover .arrow { transform: translateX(4px); }

.textlink {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14.5px; color: var(--sec-accent);
  border-bottom: 1.4px solid transparent; padding-bottom: 2px;
}
.textlink .arrow { transition: transform .4s var(--ease-brand); }
.textlink:hover .arrow { transform: translateX(4px); }

/* ===================================================================== */
/* HEADER + live badge                                                   */
/* ===================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .5s var(--ease-brand), box-shadow .5s var(--ease-brand), color .5s var(--ease-brand);
  color: var(--fg);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; width: 100%; }
/* Solid state once scrolled past hero / over cream */
.site-header.is-solid { background: rgba(250,246,239,.86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--rule); }
/* Over a dark section: light text */
.site-header.is-dark { color: var(--fg-dark); }
.site-header.is-dark.is-solid { background: rgba(28,11,3,.62); box-shadow: 0 1px 0 var(--rule-dark); }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent), var(--accent-deep) 72%);
  position: relative; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.brand__mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, transparent 48%, rgba(40,16,6,.28) 49%, transparent 50%);
}
.brand__name { font-weight: 600; font-size: 18px; letter-spacing: .02em; line-height: 1; }
.brand__name b { font-weight: 600; }
.brand__name small { display: block; font-weight: 400; font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; opacity: .62; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); }
.nav a {
  font-size: 14.5px; font-weight: 500; position: relative; padding: 6px 0; opacity: .82;
  transition: opacity .3s;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-brand);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 14px; }

/* Live badge --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px 8px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .005em; white-space: nowrap;
  background: rgba(122,106,89,.12); color: inherit;
  box-shadow: inset 0 0 0 1px rgba(122,106,89,.28);
}
.site-header.is-dark .badge { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.badge .dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #9a8a78; position: relative;
}
.badge[data-state="open"] .dot { background: var(--accent); }
.badge[data-state="open"] .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--accent); opacity: .55; z-index: -1;
  animation: ping 2.4s var(--ease-brand) infinite;
}
@keyframes ping { 0% { transform: scale(.7); opacity: .6; } 70%, 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .badge .dot::after { animation: none; } }
.badge.is-loading { opacity: .6; }

/* Hamburger */
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 1.6px; background: currentColor; transition: transform .4s var(--ease-brand), opacity .3s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ===================================================================== */
/* HERO (dark, steam motion, grain)                                      */
/* ===================================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  background: var(--dark); color: var(--fg-dark);
  overflow: hidden; isolation: isolate;
}
/* Video footage layer (cropped to clip the source's film border + watermark) */
.hero__media {
  position: absolute; inset: 0; z-index: -4; overflow: hidden; background: #160a02;
}
/* clean pre-cropped still — instant paint, reduced-motion fallback, shows under the video */
.hero__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 47% 46%; pointer-events: none;
}
/* full-frame footage, CSS-cropped to clip the source's film border + corner watermark */
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 43% 42%;
  transform: scale(1.26); transform-origin: 42% 36%;
  pointer-events: none; opacity: 0; transition: opacity .7s var(--ease-brand);
}
.hero__video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero__video { transition: none; } }

.hero__bg {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(120% 85% at 80% 6%, rgba(247,172,50,.16), transparent 52%),
    linear-gradient(96deg, rgba(20,11,3,.88) 0%, rgba(20,11,3,.58) 28%, rgba(20,11,3,.14) 52%, rgba(20,11,3,.08) 70%, rgba(20,11,3,.42) 100%),
    linear-gradient(0deg, rgba(16,9,2,.82) 0%, rgba(16,9,2,.32) 20%, transparent 42%);
}
.hero__bg::after { /* slow warm drift, subtle over footage */
  content: ""; position: absolute; inset: -20%; opacity: .35;
  background: radial-gradient(40% 40% at 50% 50%, rgba(247,172,50,.12), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate(-6%, 4%) scale(1); } to { transform: translate(8%, -6%) scale(1.18); } }

.hero__steam { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; opacity: .5; }
.hero__steam i {
  position: absolute; bottom: -28%; width: 26vw; height: 90%;
  background: radial-gradient(closest-side, rgba(255,236,200,.10), transparent 70%);
  filter: blur(26px); border-radius: 50%; opacity: 0;
  animation: steam 11s var(--ease-brand) infinite;
}
.hero__steam i:nth-child(1) { left: 8%;  animation-delay: 0s;   animation-duration: 12s; }
.hero__steam i:nth-child(2) { left: 38%; animation-delay: 3.5s; animation-duration: 14s; width: 20vw; }
.hero__steam i:nth-child(3) { left: 66%; animation-delay: 6s;   animation-duration: 13s; }
.hero__steam i:nth-child(4) { left: 88%; animation-delay: 1.8s; animation-duration: 15s; width: 16vw; }
@keyframes steam {
  0%   { transform: translateY(8%) scaleX(1);   opacity: 0; }
  18%  { opacity: .9; }
  60%  { opacity: .55; }
  100% { transform: translateY(-72%) scaleX(1.5); opacity: 0; }
}

/* Grain overlay (KB §13b) */
.grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg::after, .hero__steam i { animation: none; }
  .hero__steam i { opacity: .4; }
}

.hero__inner { position: relative; padding-block: clamp(120px, 16vh, 200px) clamp(56px, 9vh, 96px); width: 100%; }
.hero h1 {
  font-size: clamp(44px, 8.2vw, 110px); line-height: .98; max-width: 14ch;
  font-weight: 400; letter-spacing: -0.03em;
}
.hero h1 .display { display: block; color: var(--accent); font-size: .92em; }
.hero__sub { margin-top: 28px; max-width: 46ch; font-size: clamp(16px, 1.9vw, 20px); font-weight: 300; color: #e9ddcb; }
.hero__row { margin-top: 40px; display: flex; align-items: center; gap: 18px 26px; flex-wrap: wrap; }

/* Big standalone badge (hero + visit) */
.badge--xl {
  font-size: clamp(15px, 1.7vw, 18px); padding: 14px 22px 14px 18px; gap: 12px;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.4px rgba(255,255,255,.18);
}
.badge--xl .dot { width: 12px; height: 12px; }

.hero__scroll {
  position: absolute; left: var(--gut); bottom: 26px; display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #b39e88;
}
.hero__scroll .line { width: 46px; height: 1px; background: currentColor; transform-origin: left; animation: scrollline 2.6s var(--ease-brand) infinite; }
@keyframes scrollline { 0%,100% { transform: scaleX(.3); opacity: .5; } 50% { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll .line { animation: none; } }

/* ===================================================================== */
/* IMAGE PLACEHOLDERS (striped, mono label)                              */
/* ===================================================================== */
.ph {
  position: relative; overflow: hidden; border-radius: 4px;
  background-color: #efe6d6;
  background-image: repeating-linear-gradient(135deg, rgba(40,16,6,.05) 0 11px, transparent 11px 22px);
  display: grid; place-items: center; isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--rule);
  aspect-ratio: 4 / 3;
}
.section-dark .ph { background-color: #2f1a0c; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 11px, transparent 11px 22px); box-shadow: inset 0 0 0 1px var(--rule-dark); }
.ph__label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px; letter-spacing: .02em; color: #9a8266; text-align: center;
  padding: 8px 14px; border: 1px dashed rgba(154,130,102,.5); border-radius: 3px; background: rgba(250,246,239,.5);
}
.section-dark .ph__label { color: #a7917a; background: rgba(28,11,3,.4); border-color: rgba(167,145,122,.4); }
.ph--tall { aspect-ratio: 3 / 4; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--sq { aspect-ratio: 1; }

/* Real imagery dropped into a .ph slot */
.ph > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; display: block;
}
.ph.has-img { background: none; box-shadow: inset 0 0 0 1px var(--sec-rule); }
.section-dark .ph.has-img { box-shadow: inset 0 0 0 1px var(--rule-dark); }

/* Map embed (keyless Google Maps iframe) */
.map-embed {
  position: relative; overflow: hidden; border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--sec-rule);
  background-color: #efe6d6;
  background-image: repeating-linear-gradient(135deg, rgba(40,16,6,.05) 0 11px, transparent 11px 22px);
}
.map-embed iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; filter: saturate(.86) contrast(.96); }
.map-embed__fallback {
  position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px;
}
.map-embed__fallback .pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--accent); box-shadow: 0 6px 16px rgba(40,16,6,.3); position: relative;
}
.map-embed__fallback .pin::after { content: ""; position: absolute; inset: 6px; background: var(--dark); border-radius: 50%; }
.map-embed__fallback p { font-size: 14px; color: #6e5a45; font-weight: 500; }
.map-embed__fallback a { font-weight: 600; font-size: 13.5px; color: var(--accent-deep); border-bottom: 1.4px solid currentColor; padding-bottom: 1px; }
.findus .map-embed { min-height: 320px; }
.visit-grid .map-embed { aspect-ratio: 4 / 3; min-height: 340px; }

/* ===================================================================== */
/* HOME — feature blocks                                                 */
/* ===================================================================== */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--rev .split__media { order: -1; }
.split__body h2 { font-size: clamp(28px, 4vw, 48px); }
.split__body h2 em { font-family: var(--font-disp); font-style: italic; }
.split__body p { margin-top: 22px; }
.split__body .btn, .split__body .textlink { margin-top: 30px; }
.split__media { position: relative; }
.split__media .ph { box-shadow: var(--shadow-md), inset 0 0 0 1px var(--rule); }

/* floating fraunces flourish */
.flourish { font-family: var(--font-disp); font-style: italic; font-weight: 400; color: var(--sec-accent); line-height: .9; }

/* Big amber pull-quote band */
.pull { text-align: center; }
.pull p { font-family: var(--font-disp); font-style: italic; font-weight: 400; font-size: clamp(28px, 5vw, 60px); line-height: 1.12; max-width: 20ch; margin-inline: auto; letter-spacing: -0.01em; }
.pull .eyebrow { display: block; margin-bottom: 26px; }
.pull cite { display: block; margin-top: 40px; font-style: normal; font-weight: 600; font-size: 14px; letter-spacing: .02em; }

/* mini menu teaser list */
.teaser-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(40px, 6vw, 80px); }
@media (max-width: 720px) { .teaser-grid { grid-template-columns: 1fr; } }

/* find-us */
.findus { display: grid; grid-template-columns: 1.2fr .9fr; gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.findus .ph { aspect-ratio: auto; min-height: 320px; }
.hours-card { align-self: center; }
.hours-mini { margin-top: 18px; border-top: 1px solid var(--sec-rule); }
.hours-mini li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--sec-rule); font-size: 15px; }
.hours-mini li.is-today { font-weight: 600; }
.hours-mini li.is-today .day::before { content: "•"; color: var(--sec-accent); margin-right: 7px; }
.hours-mini .time { color: var(--sec-muted); white-space: nowrap; }
.hours-mini li.is-today .time { color: inherit; }

/* ===================================================================== */
/* MENU                                                                  */
/* ===================================================================== */
.menu-group { margin-bottom: clamp(48px, 6vw, 80px); }
.menu-group:last-child { margin-bottom: 0; }
.menu-group__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 26px; }
.menu-group__head h3 { font-family: var(--font-disp); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.6vw, 40px); white-space: nowrap; }
.menu-group__head .rule { flex: 1; height: 1px; background: var(--sec-rule); }
.menu-group__head .note { font-size: 13px; color: var(--sec-muted); white-space: nowrap; }

.mrow { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 6px; padding: 13px 0; }
.mrow + .mrow { border-top: 1px solid color-mix(in srgb, var(--sec-rule) 60%, transparent); }
.mrow__name { font-weight: 500; font-size: 17px; }
.mrow__name small { display: block; font-weight: 400; font-size: 13.5px; color: var(--sec-muted); margin-top: 3px; letter-spacing: 0; }
.mrow__leader { border-bottom: 1.5px dotted color-mix(in srgb, var(--sec-muted) 55%, transparent); transform: translateY(-4px); }
.mrow__price { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow__price .x { color: var(--sec-muted); font-weight: 400; font-size: 13px; margin-left: 8px; }

/* retail bean cards */
.bean-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(20px, 2.6vw, 30px); }
.bean {
  background: var(--sec-bg); border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--sec-rule);
  transition: transform .5s var(--ease-brand), box-shadow .5s var(--ease-brand);
  display: flex; flex-direction: column;
}
.section-cream .bean { background: #fffdf8; }
.bean:hover { transform: translateY(-7px); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--sec-rule); }
.bean .ph { aspect-ratio: 1; border-radius: 0; box-shadow: none; }
.bean__body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.bean__origin { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--sec-accent); font-weight: 600; }
.bean__name { font-size: 19px; font-weight: 500; margin-top: 8px; }
.bean__name em { font-family: var(--font-disp); font-style: italic; }
.bean__notes { font-size: 14px; color: var(--sec-muted); margin-top: 10px; line-height: 1.5; flex: 1; }
.bean__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--sec-rule); }
.bean__price { font-weight: 600; font-size: 16px; }
.bean__price small { font-weight: 400; color: var(--sec-muted); font-size: 13px; }

/* ===================================================================== */
/* COFFEE (long-form editorial)                                          */
/* ===================================================================== */
.prose { max-width: 60ch; }
.prose p { margin-top: 22px; font-size: clamp(16px, 1.4vw, 18px); }
.prose p:first-child { margin-top: 0; }
.prose p.drop:first-letter { font-family: var(--font-disp); font-style: italic; font-size: 3.4em; line-height: .8; float: left; margin: 6px 12px 0 0; color: var(--sec-accent); }

.origins { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.origin h4 { font-size: 19px; font-weight: 500; margin-top: 18px; }
.origin h4 em { font-family: var(--font-disp); font-style: italic; }
.origin p { margin-top: 8px; font-size: 14.5px; color: var(--sec-muted); }
.origin .meta { margin-top: 14px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sec-accent); font-weight: 600; }

.brew-steps { display: grid; gap: 4px; }
.brew-step { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 24px 0; border-top: 1px solid var(--sec-rule); align-items: start; }
.brew-step:last-child { border-bottom: 1px solid var(--sec-rule); }
.brew-step__n { font-family: var(--font-disp); font-style: italic; font-size: 34px; color: var(--sec-accent); line-height: 1; min-width: 1.6ch; }
.brew-step h4 { font-size: 19px; font-weight: 500; }
.brew-step p { margin-top: 7px; color: var(--sec-muted); font-size: 15px; }
.brew-step .t { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--sec-accent); font-weight: 600; margin-top: 9px; }

/* ===================================================================== */
/* VISIT — hours table + map                                             */
/* ===================================================================== */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: start; }
.map-ph { aspect-ratio: 4 / 3; min-height: 340px; border-radius: 6px; }
.map-ph .pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--accent); box-shadow: 0 6px 16px rgba(40,16,6,.3); position: relative;
}
.map-ph .pin::after { content: ""; position: absolute; inset: 6px; background: var(--dark); border-radius: 50%; }

.info-row { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--sec-rule); }
.info-row:first-of-type { border-top: 1px solid var(--sec-rule); }
.info-row .ic { color: var(--sec-accent); flex: none; margin-top: 2px; }
.info-row h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--sec-muted); font-weight: 600; }
.info-row p { margin-top: 5px; font-size: 16px; }
.info-row p a { border-bottom: 1px solid var(--sec-rule); }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table caption { text-align: left; font-family: var(--font-disp); font-style: italic; font-size: clamp(24px, 3vw, 34px); margin-bottom: 16px; }
.hours-table th, .hours-table td { text-align: left; padding: 15px 0; border-bottom: 1px solid var(--sec-rule); font-size: 16px; }
.hours-table th { font-weight: 500; }
.hours-table td { text-align: right; color: var(--sec-muted); font-variant-numeric: tabular-nums; }
.hours-table tr.is-today th { font-weight: 700; }
.hours-table tr.is-today th::before { content: "•"; color: var(--sec-accent); margin-right: 8px; }
.hours-table tr.is-today td { color: var(--sec-fg); font-weight: 600; }

/* ===================================================================== */
/* FORMS                                                                 */
/* ===================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.field label .opt { color: var(--sec-muted); font-weight: 400; letter-spacing: 0; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15.5px; color: var(--sec-fg);
  padding: 13px 15px; border-radius: 5px; background: rgba(255,255,255,.6);
  border: 1.4px solid var(--sec-rule); transition: border-color .3s, box-shadow .3s, background .3s;
}
.section-dark .field input, .section-dark .field select, .section-dark .field textarea { background: rgba(255,255,255,.05); color: var(--fg-dark); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sec-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec-accent) 22%, transparent); background: rgba(255,255,255,.85); }
.section-dark .field input:focus, .section-dark .field textarea:focus, .section-dark .field select:focus { background: rgba(255,255,255,.1); }
.field input::placeholder, .field textarea::placeholder { color: var(--sec-muted); opacity: .7; }
.field .err { font-size: 12.5px; color: #c0392b; font-weight: 600; min-height: 1em; opacity: 0; transition: opacity .25s; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #c0392b; }
.field.invalid .err { opacity: 1; }
.form-foot { grid-column: 1/-1; display: flex; align-items: center; gap: 20px; margin-top: 6px; flex-wrap: wrap; }
.form-foot .note { font-size: 13px; color: var(--sec-muted); }

.form-success {
  display: none; text-align: center; padding: clamp(40px, 6vw, 72px) 24px;
  border-radius: 8px; box-shadow: inset 0 0 0 1px var(--sec-rule); background: color-mix(in srgb, var(--sec-accent) 8%, transparent);
}
.form-success.show { display: block; animation: pop .6s var(--ease-brand) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.form-success .check { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; background: var(--sec-accent); display: grid; place-items: center; color: var(--sec-bg); }
.form-success h3 { font-family: var(--font-disp); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); }
.form-success p { margin-top: 12px; color: var(--sec-muted); max-width: 42ch; margin-inline: auto; }
.is-hidden { display: none !important; }

/* ===================================================================== */
/* FOOTER                                                                */
/* ===================================================================== */
.site-footer { background: var(--dark-2); color: var(--fg-dark); padding-block: clamp(56px, 7vw, 90px) 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p { color: #b39e88; font-size: 14.5px; font-weight: 300; max-width: 30ch; }
.footer-col h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 14.5px; color: #e3d6c4; opacity: .85; transition: opacity .3s, color .3s; }
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-badge { margin-top: 6px; }
.footer-bottom { margin-top: clamp(40px, 5vw, 64px); padding-top: 26px; border-top: 1px solid var(--rule-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: #9a8265; }
.footer-bottom a:hover { color: var(--accent); }

/* ===================================================================== */
/* REVEAL (cosmos develop) — KB §11a / §15b                              */
/* ===================================================================== */
[data-reveal] { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity .9s var(--ease-brand), transform .9s var(--ease-brand), filter .9s var(--ease-brand); }
[data-reveal].in { opacity: 1; transform: none; filter: blur(0); }
[data-reveal][data-reveal="2"] { transition-delay: .08s; }
[data-reveal][data-reveal="3"] { transition-delay: .16s; }
[data-reveal][data-reveal="4"] { transition-delay: .24s; }
[data-stagger] > * { opacity: 0; transform: translateY(22px); filter: blur(5px); transition: opacity .8s var(--ease-brand), transform .8s var(--ease-brand), filter .8s var(--ease-brand); }
[data-stagger].in > * { opacity: 1; transform: none; filter: blur(0); }
[data-stagger].in > *:nth-child(2) { transition-delay: .06s; }
[data-stagger].in > *:nth-child(3) { transition-delay: .12s; }
[data-stagger].in > *:nth-child(4) { transition-delay: .18s; }
[data-stagger].in > *:nth-child(5) { transition-delay: .24s; }
[data-stagger].in > *:nth-child(6) { transition-delay: .30s; }
[data-stagger].in > *:nth-child(7) { transition-delay: .36s; }
[data-stagger].in > *:nth-child(8) { transition-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}
/* Environments where the animation clock is frozen: show final state, no motion. */
html.reveal-static [data-reveal],
html.reveal-static [data-stagger] > * { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

/* ===================================================================== */
/* IMAGE LOADING — skeleton shimmer → photographic develop → fade        */
/* ===================================================================== */
/* Skeleton shown until the photo has decoded (JS adds .is-loaded). */
.ph.has-img { background: #e7dccb; }
.section-dark .ph.has-img { background: #2c1810; }
.ph.has-img::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent 28%, rgba(255,255,255,.38) 50%, transparent 72%);
  transform: translateX(-130%); animation: shimmer 1.5s var(--ease-brand) infinite;
  transition: opacity .5s ease;
}
.section-dark .ph.has-img::after { background: linear-gradient(100deg, transparent 28%, rgba(255,236,200,.14) 50%, transparent 72%); }
.ph.has-img.is-loaded::after { opacity: 0; animation: none; }
@keyframes shimmer { to { transform: translateX(130%); } }

/* The photo itself: starts soft + slightly zoomed, then develops + fades in.
   Opacity is driven by load (.is-loaded); blur/scale settle is driven by reveal (.in). */
.ph.has-img img { opacity: 0; transform: scale(1.06); filter: blur(10px);
  transition: opacity .8s var(--ease-brand), transform 1.2s var(--ease-brand), filter 1.2s var(--ease-brand); }
.ph.has-img.is-loaded img { opacity: 1; }
[data-reveal].in .ph.has-img img,
[data-stagger].in .ph.has-img img,
.in.ph.has-img img { transform: none; filter: blur(0); }
/* If a .ph is revealed but somehow not in a reveal container, still settle once loaded */
.ph.has-img.is-loaded img { transform: none; filter: blur(0); }

/* Hero poster: gentle fade + scale-settle when it loads (video fades in over it). */
.hero__poster { opacity: 0; transition: opacity 1s var(--ease-brand); }
.hero__poster.is-loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ph.has-img::after { display: none; }
  .ph.has-img img { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .hero__poster { opacity: 1 !important; transition: none !important; }
}
html.reveal-static .ph.has-img::after { display: none; }
html.reveal-static .ph.has-img img { transition: none !important; }
html.reveal-static .hero__poster { transition: none !important; }

/* Hero headline: two-beat line rise for a touch more life */
.hero h1 .display { transform: translateY(16px); transition: transform 1s var(--ease-brand) .14s; }
.hero h1.in .display { transform: none; }
@media (prefers-reduced-motion: reduce) { .hero h1 .display { transform: none !important; transition: none !important; } }
html.reveal-static .hero h1 .display { transform: none !important; }

/* Page intro band (interior pages) */
.page-intro { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 110px)); }
.page-intro h1 { font-size: clamp(40px, 6.4vw, 84px); font-weight: 400; letter-spacing: -0.03em; max-width: 16ch; }
.page-intro h1 em { font-family: var(--font-disp); font-style: italic; color: var(--sec-accent); }
.page-intro p { margin-top: 22px; max-width: 50ch; }
.page-intro .eyebrow { display: block; margin-bottom: 18px; }

/* ===================================================================== */
/* RESPONSIVE                                                            */
/* ===================================================================== */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .origins { grid-template-columns: 1fr; gap: 26px; }
  .origin { display: grid; grid-template-columns: 130px 1fr; gap: 20px; align-items: center; }
  .origin .ph { aspect-ratio: 1; }
}
@media (max-width: 980px) {
  :root { --header-h: 66px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--dark); color: var(--fg-dark); padding: 8px var(--gut) 24px;
    box-shadow: var(--shadow-lg); transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .45s var(--ease-brand), opacity .35s; border-top: 1px solid var(--rule-dark);
  }
  body.nav-open .nav { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav a { padding: 15px 0; font-size: 17px; border-bottom: 1px solid var(--rule-dark); opacity: .9; }
  .nav a::after { display: none; }
  .header-cta { display: none; }
  .split, .findus, .visit-grid, .teaser-grid { grid-template-columns: 1fr; gap: 32px; }
  .split--rev .split__media { order: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .origin { grid-template-columns: 1fr; }
  .origin .ph { aspect-ratio: 16/9; }
}
@media (max-width: 560px) {
  .bean-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(40px, 13vw, 60px); }
  .brand__name small { display: none; }
}
