/* ============================================================
   Backwood Baking - Evergreen Poster
   Locked system: see MASTER.md. Two surfaces (spruce / white),
   Young Serif poster type, hard offset shadows, square corners.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --bwb-spruce-800: #1E3B2A;
  --bwb-spruce-900: #16301F;
  --bwb-white-0:    #FFFFFF;
  --bwb-sage-100:   #EEF3EA;
  --bwb-leaf-300:   #A8C89B;
  --bwb-pine-700:   #2A523B;
  --bwb-mist-200:   #D7DECA;
  --bwb-mist-muted: #9FB393;
  --bwb-line-200:   #D9E0D3;
  --bwb-muted-ink:  #5E6B58;
  --bwb-input-border:#A9B7A0;
  --bwb-line-spruce: rgba(255,255,255,0.18);

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1280px;
  --band-y: clamp(56px, 7vw, 96px);
  --band-x: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.65;
  color: var(--bwb-spruce-800);
  background: var(--bwb-white-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bwb-pine-700); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: pretty; margin: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
:focus-visible {
  outline: 3px solid var(--bwb-pine-700);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--bwb-white-0); color: var(--bwb-pine-700);
  padding: 10px 16px; border: 1px solid var(--bwb-pine-700); border-radius: var(--radius);
  z-index: 200; transition: top .15s var(--ease); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---- Layout primitives ---- */
.band { padding: var(--band-y) var(--band-x); }
.band--spruce { background: var(--bwb-spruce-800); color: var(--bwb-mist-200); }
.band--white  { background: var(--bwb-white-0);   color: var(--bwb-spruce-800); }
.band--footer { background: var(--bwb-spruce-900); color: var(--bwb-mist-200); }
.wrap { max-width: var(--maxw); margin-inline: auto; width: 100%; }
.wrap--narrow { max-width: 760px; }

.band--spruce h1, .band--spruce h2, .band--spruce h3 { color: var(--bwb-white-0); }
.band--white  h1, .band--white  h2, .band--white  h3 { color: var(--bwb-spruce-800); }

/* Eyebrow */
.eyebrow {
  font-family: var(--sans); font-weight: 600;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  margin: 0 0 16px;
}
.band--spruce .eyebrow { color: var(--bwb-leaf-300); }
.band--white  .eyebrow { color: var(--bwb-pine-700); }

.lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; max-width: 56ch; }
.h2 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; }
.measure { max-width: 60ch; }

/* ---- Buttons + links ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease), background-color .15s var(--ease);
}
/* white fill on spruce bands */
.band--spruce .btn, .btn--on-spruce {
  background: var(--bwb-white-0); color: var(--bwb-spruce-800);
  box-shadow: 6px 6px 0 var(--bwb-leaf-300);
}
.band--spruce .btn:hover, .btn--on-spruce:hover {
  box-shadow: 3px 3px 0 var(--bwb-leaf-300); transform: translate(1px, 1px);
}
/* spruce fill on white bands */
.band--white .btn, .btn--on-white {
  background: var(--bwb-spruce-800); color: var(--bwb-white-0);
  box-shadow: 6px 6px 0 var(--bwb-leaf-300);
}
.band--white .btn:hover, .btn--on-white:hover {
  background: var(--bwb-spruce-900);
  box-shadow: 3px 3px 0 var(--bwb-leaf-300); transform: translate(1px, 1px);
}

/* underlined text link (the only secondary) */
.textlink {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: text-decoration-thickness .15s var(--ease);
}
.textlink:hover { text-decoration-thickness: 2px; }
.band--spruce .textlink { color: var(--bwb-white-0); }
.band--white  .textlink { color: var(--bwb-pine-700); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.cta-note { font-size: 14px; margin-top: 16px; }
.band--spruce .cta-note { color: var(--bwb-mist-muted); }
.band--white  .cta-note { color: var(--bwb-muted-ink); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bwb-spruce-800);
  border-bottom: 1px solid var(--bwb-line-spruce);
}
.nav {
  max-width: var(--maxw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px var(--band-x); min-height: 64px;
}
/* compact wordmark in nav */
.nav-mark { text-decoration: none; line-height: 1; display: inline-flex; align-items: baseline; gap: 8px; }
.nav-mark b { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--bwb-white-0); }
.nav-mark span { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--bwb-leaf-300); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  color: var(--bwb-mist-200); text-decoration: none;
  padding: 8px 2px; display: inline-flex; align-items: center; min-height: 44px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bwb-white-0); text-decoration: underline; text-underline-offset: 6px; }
.nav-links .nav-text {
  border: 1px solid var(--bwb-line-spruce); border-radius: var(--radius);
  padding: 8px 16px; color: var(--bwb-white-0);
}
.nav-links .nav-text:hover { background: var(--bwb-spruce-900); text-decoration: none; }

/* hamburger - hidden on desktop */
.nav-toggle {
  display: none;
  width: 48px; height: 48px; padding: 0;
  background: transparent; border: 1px solid var(--bwb-line-spruce); border-radius: var(--radius);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--bwb-white-0);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top:  7px; }

/* Mobile drawer (sibling of header, direct child of body) */
.nav-drawer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bwb-spruce-900);
  display: flex; flex-direction: column;
  padding: 24px var(--band-x) 48px;
  visibility: hidden; opacity: 0;
  transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.nav-drawer.is-open { visibility: visible; opacity: 1; }
.nav-drawer__top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.nav-drawer__close {
  width: 48px; height: 48px; background: transparent;
  border: 1px solid var(--bwb-line-spruce); border-radius: var(--radius);
  color: var(--bwb-white-0); font-size: 26px; line-height: 1; cursor: pointer;
}
.nav-drawer__links { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; }
.nav-drawer__links li { border-bottom: 1px solid var(--bwb-line-spruce); }
.nav-drawer__links a {
  display: flex; align-items: center; min-height: 60px;
  font-family: var(--serif); font-weight: 400; font-size: 28px;
  color: var(--bwb-white-0); text-decoration: none;
}
.nav-drawer__links a:hover { color: var(--bwb-leaf-300); }
.nav-drawer__cta { margin-top: 32px; }
.nav-drawer__cta .btn { width: 100%; }

/* ============================================================
   Hero (typographic poster)
   ============================================================ */
.hero { text-align: center; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero .eyebrow { color: var(--bwb-leaf-300); }
.poster {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 15vw, 150px); line-height: 0.96;
  letter-spacing: -0.01em; margin: 8px 0 24px;
}
.poster .l1 { display: block; color: var(--bwb-white-0); }
.poster .l2 { display: block; color: var(--bwb-leaf-300); }
.hero .lead { margin-inline: auto; color: var(--bwb-mist-200); }
.hero .cta-row { justify-content: center; margin-top: 32px; }

/* ============================================================
   T1 Filmstrip
   ============================================================ */
.filmstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; background: var(--bwb-spruce-800); overflow: hidden; }
.filmstrip figure { margin: 0; overflow: hidden; }
.filmstrip img { width: 100%; height: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; }
.filmstrip--drift img { will-change: transform; }

/* ============================================================
   T2 Offset stack (gallery teaser)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.stack { position: relative; padding: 0 24px 24px 0; }
.stack__lead { position: relative; z-index: 2; border: 6px solid var(--bwb-white-0); }
.stack__block { position: absolute; left: -14px; bottom: 10px; width: 60%; aspect-ratio: 1/1; background: var(--bwb-leaf-300); z-index: 1; }
.stack__second {
  position: absolute; right: 0; bottom: -18px; width: 46%; z-index: 3;
  border: 8px solid var(--bwb-white-0);
}
.stack__caption { font-family: var(--serif); font-size: 20px; color: var(--bwb-pine-700); margin-top: 32px; }
.occasion-links { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 20px 0 28px; }
.occasion-links a {
  font-size: 15px; color: var(--bwb-pine-700); text-decoration: underline; text-underline-offset: 3px;
  min-height: 44px; display: inline-flex; align-items: center;
}

/* ============================================================
   Price rows (By the dozen)
   ============================================================ */
.prices-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 24px; }
.prices-head .note { font-size: 15px; color: var(--bwb-muted-ink); max-width: 34ch; }
.price-list { border-top: 1px solid var(--bwb-line-200); }
.price-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--bwb-line-200);
}
.price-row__name { font-family: var(--sans); font-weight: 600; font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.price-row__desc { font-size: 15px; color: var(--bwb-muted-ink); margin: 4px 0 0; }
.price-row__price { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 36px); color: var(--bwb-spruce-800); white-space: nowrap; }
.gf-pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px;
  background: var(--bwb-spruce-800); color: var(--bwb-white-0);
  font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.04em;
  border-radius: 999px; text-transform: none;
}

/* ============================================================
   T3 Arch window (the baker)
   ============================================================ */
.baker { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.arch { position: relative; padding: 0 40px 40px 0; }
.arch__portrait {
  border-radius: 999px 999px 0 0; overflow: hidden;
  background: var(--bwb-spruce-900); border: 1px solid var(--bwb-line-spruce);
}
.arch__portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.arch__detail {
  position: absolute; right: 0; bottom: 0; width: 42%;
  border: 8px solid var(--bwb-spruce-800);
}
.arch__detail img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.baker .lead { color: var(--bwb-mist-200); }

/* ============================================================
   Kind words (HIDDEN until real quotes arrive)
   ============================================================ */
.kind-words[hidden] { display: none !important; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.quote-card { background: var(--bwb-sage-100); border: 1px solid var(--bwb-line-200); padding: 28px; }
.quote-card blockquote { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--bwb-spruce-800); }
.quote-card cite { display: block; margin-top: 16px; font-family: var(--sans); font-style: normal; font-size: 14px; color: var(--bwb-muted-ink); }

/* ============================================================
   Steps (How ordering works)
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin: 40px 0; }
.step__num { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--bwb-leaf-300); margin-bottom: 12px; }
.step h3 { font-family: var(--sans); font-weight: 600; font-size: 18px; color: var(--bwb-white-0); margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--bwb-mist-200); margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { padding: var(--band-y) var(--band-x); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px 32px; }
.footer-mark b { display: block; font-family: var(--serif); font-size: 26px; color: var(--bwb-white-0); line-height: 1.05; }
.footer-mark span { display: block; font-family: var(--serif); font-size: 26px; color: var(--bwb-leaf-300); line-height: 1.05; }
.footer-mark small { display: block; margin-top: 8px; font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--bwb-mist-muted); }
.footer-mark p { margin-top: 16px; font-size: 15px; color: var(--bwb-mist-200); max-width: 28ch; }
.footer-col h4 { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bwb-leaf-300); margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--bwb-mist-200); text-decoration: none; font-size: 15px; display: inline-flex; min-height: 32px; align-items: center; }
.footer-col a:hover { color: var(--bwb-white-0); text-decoration: underline; text-underline-offset: 3px; }
.footer-cta .btn { margin-bottom: 16px; }
.footer-cta p { font-size: 14px; color: var(--bwb-mist-muted); }
.footer-legal { max-width: var(--maxw); margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--bwb-line-spruce); font-size: 13px; color: var(--bwb-mist-muted); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ============================================================
   Gallery page
   ============================================================ */
.gallery-hero { text-align: center; }
.gallery-hero .h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin-bottom: 20px; }
.gallery-hero .lead { margin-inline: auto; color: var(--bwb-mist-200); }
.gallery-hero .cta-row { justify-content: center; margin-top: 28px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.chip {
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  min-height: 44px; padding: 8px 20px; border-radius: 999px; cursor: pointer;
  background: var(--bwb-white-0); color: var(--bwb-spruce-800);
  border: 1px solid var(--bwb-input-border);
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.chip:hover { border-color: var(--bwb-pine-700); }
.chip[aria-pressed="true"] { background: var(--bwb-spruce-800); color: var(--bwb-white-0); border-color: var(--bwb-spruce-800); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tile { margin: 0; }
.tile__crop { overflow: hidden; background: var(--bwb-sage-100); border: 1px solid var(--bwb-line-200); }
.tile__crop img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .3s var(--ease); }
.tile:hover .tile__crop img { transform: scale(1.03); }
.tile figcaption { margin-top: 14px; }
.tile__eyebrow { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bwb-pine-700); }
.tile__title { font-family: var(--serif); font-size: 20px; color: var(--bwb-spruce-800); margin-top: 4px; }
.tile[hidden] { display: none; }
.gallery-empty { color: var(--bwb-muted-ink); font-size: 16px; }

/* ============================================================
   Forms (contact / on sage panel)
   ============================================================ */
.form-panel { background: var(--bwb-sage-100); border: 1px solid var(--bwb-line-200); padding: clamp(24px, 4vw, 40px); }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bwb-spruce-800); margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--bwb-spruce-800);
  background: var(--bwb-white-0); border: 1px solid var(--bwb-input-border); border-radius: var(--radius);
  padding: 12px 14px; min-height: 48px;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--bwb-pine-700);
  box-shadow: 0 0 0 3px rgba(42,82,59,0.28);
}
.form-field .error-msg { display: none; margin-top: 6px; font-size: 14px; color: var(--bwb-pine-700); font-weight: 600; }
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--bwb-pine-700); }
.form-field.has-error .error-msg { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alt-note { font-size: 14px; color: var(--bwb-muted-ink); margin-top: 16px; }

/* Thank-you / 404 simple pages */
.notice { text-align: center; min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.notice .h2 { margin-bottom: 16px; }
.notice .lead { margin-inline: auto; margin-bottom: 28px; color: var(--bwb-mist-200); }
.notice .cta-row { justify-content: center; }

/* ============================================================
   Motion
   ============================================================ */
/* Reveals only apply when JS is present - content is visible by default (no-JS safe). */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes poster-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .poster .l1, .js .poster .l2 { opacity: 0; animation: poster-rise .6s var(--ease) forwards; }
.js .poster .l1 { animation-delay: .08s; }
.js .poster .l2 { animation-delay: .20s; }

/* Drift keeps a slight scale so the ±translate never exposes a gap between butted photos. */
@keyframes film-drift { from { transform: scale(1.06) translateX(10px); } to { transform: scale(1.06) translateX(-10px); } }
.js .filmstrip--drift img { transform-origin: center; animation: film-drift 40s linear infinite alternate; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .split, .baker { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stack { max-width: 520px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .quote-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .filmstrip { grid-auto-columns: 46%; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; }
  .filmstrip figure { scroll-snap-align: start; }
  .price-row { grid-template-columns: 1fr auto; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .cta-row { gap: 16px; }
  .cta-row .btn { width: 100%; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .js .reveal { opacity: 1; transform: none; }
  .js .poster .l1, .js .poster .l2 { opacity: 1; animation: none; }
  .js .filmstrip--drift img { animation: none; }
  .btn:hover, .btn--on-spruce:hover, .btn--on-white:hover { transform: none; }
}

/* ---- Utilities (keep CSP free of inline styles) ---- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.eyebrow--leaf { color: var(--bwb-leaf-300); }
.cta-row--center { justify-content: center; margin-top: 28px; }
.poster--404 { font-size: clamp(64px, 14vw, 120px); }
.footer-legal--bare { margin-top: 0; border-top: 0; }

/* ---- end of stylesheet (sentinel: if you can read this rule, the file is complete) ---- */
.css-loaded-sentinel { --bwb-loaded: 1; }
