/* ============================================================
   The Pantry — Support & Contact
   House C (Warm Hospitality) · tokens mirrored from css/style.css
   Signature techniques:
     1. Fraunces variable axes (opsz/SOFT/WONK) driven by scroll
     2. CSS mason-jar shelf, fill rises on load, pointer parallax
     3. SVG displacement "steam" drifting over the hero
     4. View Transitions on the contact thank-you state
   Every motion is gated on prefers-reduced-motion.
   ============================================================ */

:root {
  --cream: #FAF6EF;
  --linen: #F3ECDF;
  --linen-deep: #EAE0CC;
  --card: #FFFDF8;
  --pine: #1F3A2E;
  --pine-deep: #16291F;
  --pine-soft: #3D5C4D;
  --terra: #C4673B;
  --terra-deep: #A6532E;
  --gold: #B8935A;
  --ink: #26312B;
  --ink-soft: #5C665F;
  --danger: #A63A2E;
  --ok: #4A7C59;
  --shadow-s: 0 1px 2px rgba(31, 58, 46, .06), 0 2px 8px rgba(31, 58, 46, .05);
  --shadow-m: 0 2px 6px rgba(31, 58, 46, .07), 0 10px 28px rgba(31, 58, 46, .09);
  --shadow-l: 0 6px 16px rgba(31, 58, 46, .10), 0 24px 56px rgba(31, 58, 46, .14);
  --r: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.33, 1, .48, 1);
  --ease-pop: cubic-bezier(.34, 1.45, .5, 1);
  --font-d: "Fraunces", Georgia, serif;
  --font-u: "Inter", -apple-system, sans-serif;

  /* page-local */
  --gutter: clamp(20px, 5vw, 40px);
  --wrap: 68rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* clips a fixed/absolute child the body cannot contain; sticky-safe */
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-u);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(184, 147, 90, .10), transparent 60%),
    radial-gradient(900px 420px at -10% 0%, rgba(196, 103, 59, .07), transparent 55%),
    var(--cream);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--terra-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--terra); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(196, 103, 59, .25); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--font-d);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--pine);
  letter-spacing: -.02em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 90;
  background: var(--pine); color: var(--cream);
  padding: 10px 16px; border-radius: 0 0 var(--r) var(--r);
  font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 0; color: var(--cream); }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
}
.hdr.is-stuck { border-bottom-color: var(--linen-deep); }
.hdr__in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--font-d); font-weight: 700; font-size: 1.12rem;
  color: var(--pine); text-decoration: none; letter-spacing: -.02em;
}
.brand svg { width: 26px; height: 26px; flex: none; }
.hdr__nav { display: flex; align-items: center; gap: 8px; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; white-space: nowrap;
  font-weight: 600; font-size: .94rem; text-decoration: none;
  transition: transform .22s var(--ease-pop), box-shadow .22s var(--ease),
              background-color .22s var(--ease), color .22s var(--ease);
  will-change: transform;
}
.btn--ghost { color: var(--pine); border: 1px solid var(--linen-deep); background: rgba(255, 253, 248, .6); }
.btn--ghost:hover { color: var(--pine); background: var(--card); border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.btn--solid { background: var(--pine); color: var(--cream); box-shadow: var(--shadow-s); }
.btn--solid:hover { background: var(--pine-deep); color: var(--cream); transform: translateY(-2px); box-shadow: var(--shadow-m); }
.btn--solid:active, .btn--ghost:active { transform: translateY(0) scale(.98); }
.btn--terra { background: var(--terra-deep); color: #fff; box-shadow: var(--shadow-s); }
.btn--terra:hover { background: var(--terra); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-m); }

/* narrow phones: the brand and the CTA must never wrap to two lines */
@media (max-width: 470px) {
  .hdr__in { min-height: 58px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand svg { width: 23px; height: 23px; }
  .hdr__nav .btn { padding: 10px 16px; font-size: .88rem; }
  .hdr__nav .btn--ghost { display: none; }   /* the hero already offers "Write to us" */
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__in {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
  display: grid; gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__in { grid-template-columns: 1.05fr .95fr; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terra-deep);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--terra));
}

/* TECHNIQUE 1 — live variable-font headline.
   --wonk / --soft / --opsz are written by JS from scroll position.
   Static fallback values keep it correct with JS off or motion reduced. */
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 7.2vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.035em;
  font-variation-settings:
    "opsz" var(--opsz, 120),
    "SOFT" var(--soft, 0),
    "WONK" var(--wonk, 0),
    "wght" 600;
}
.hero h1 em {
  font-style: normal;
  color: var(--terra-deep);
  font-variation-settings:
    "opsz" var(--opsz, 120),
    "SOFT" var(--soft, 0),
    "WONK" 1,
    "wght" 600;
}
.hero__lede {
  margin-top: 20px;
  font-size: clamp(1.04rem, 2.2vw, 1.19rem);
  color: var(--ink-soft);
  max-width: 46ch;
  text-wrap: pretty;
}
.hero__acts { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

/* TECHNIQUE 2 — the mason-jar shelf */
.shelf { position: relative; justify-self: center; width: min(420px, 100%); }
.shelf__jars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 3vw, 20px); align-items: end;
  padding-inline: 6px;
}
.jar { position: relative; aspect-ratio: 60 / 84; will-change: transform; }
.jar svg { width: 100%; height: 100%; overflow: visible; }
.jar__fill {
  transform-box: fill-box; transform-origin: bottom center;
  transform: scaleY(var(--fill-end, .6));
}
.shelf__board {
  margin-top: -4px; height: 13px; border-radius: 3px;
  background: linear-gradient(180deg, var(--pine-soft), var(--pine));
  box-shadow: 0 10px 24px rgba(31, 58, 46, .22), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.shelf__board::after {
  content: ""; display: block; margin: 9px auto 0;
  width: 78%; height: 18px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(31, 58, 46, .15), transparent 70%);
}

/* TECHNIQUE 3 — steam */
.steam {
  position: absolute; inset: -10% -10% auto; height: 62%;
  pointer-events: none; z-index: 1; opacity: .5;
  mix-blend-mode: multiply;
}

/* ---------- shared section furniture ---------- */
.sec { padding-block: clamp(52px, 8vw, 92px); }
.sec--linen { background: linear-gradient(180deg, transparent, var(--linen) 18%, var(--linen) 82%, transparent); }
.sec__head { max-width: 54ch; }
.sec h2 { font-size: clamp(1.85rem, 4.2vw, 2.6rem); }
.sec__sub { margin-top: 14px; color: var(--ink-soft); text-wrap: pretty; }

/* anchor targets clear the sticky header (/contact redirects to #contact) */
.sec[id], .faq__group[id] { scroll-margin-top: 84px; }

/* reveal (House C: slide from side, never a blanket fade-up)
   Gated on html.js: if scripting fails or is blocked, every section stays
   visible rather than leaving a reviewer looking at a blank support page. */
.js .rv { opacity: 0; transform: translateX(-22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rv--r { transform: translateX(22px); }
.js .rv--up { transform: translateY(26px); }
.js .rv.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- quick help cards ---------- */
.cards { margin-top: 34px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--linen-deep);
  border-radius: var(--r-lg); padding: 26px 24px;
  text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-l);
  border-color: var(--gold); color: var(--ink);
}
/* light sweep on hover */
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .55) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.card:hover::after { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) { .card:hover::after { transform: translateX(-120%); } }
.card__ico { font-size: 1.9rem; line-height: 1; }
.card h3 { margin-top: 14px; font-size: 1.16rem; }
.card p { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.card__go { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--terra-deep); }
.card__go svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.card:hover .card__go svg { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.faq { margin-top: 34px; display: grid; gap: 34px; }
.faq__group h3 {
  font-family: var(--font-u); font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pine-soft);
  padding-bottom: 10px; border-bottom: 1px solid var(--linen-deep);
}
details.qa { border-bottom: 1px solid var(--linen-deep); }
details.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 19px 0; font-weight: 600; font-size: 1.03rem; color: var(--pine);
  transition: color .2s var(--ease);
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary:hover { color: var(--terra-deep); }
details.qa summary:focus-visible { outline-offset: -3px; }
.qa__mark {
  flex: none; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 50%; border: 1.5px solid var(--gold);
  display: grid; place-items: center; color: var(--terra-deep);
  transition: transform .35s var(--ease-pop), background-color .25s var(--ease), border-color .25s var(--ease);
}
.qa__mark svg { width: 11px; height: 11px; }
details.qa[open] .qa__mark { transform: rotate(135deg); background: var(--gold); border-color: var(--gold); color: #fff; }
.qa__body { padding-bottom: 22px; color: var(--ink-soft); max-width: 62ch; text-wrap: pretty; }
.qa__body p + p { margin-top: 12px; }
.qa__body ul { margin-top: 10px; padding-left: 20px; }
.qa__body li { margin-top: 6px; }
.qa__body strong { color: var(--ink); font-weight: 600; }

/* native height animation where supported, no JS */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details.qa::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .42s var(--ease), content-visibility .42s allow-discrete;
  }
  details.qa[open]::details-content { block-size: auto; }
  @media (prefers-reduced-motion: reduce) {
    details.qa::details-content { transition: none; }
  }
}

/* ---------- contact ---------- */
.contact { display: grid; gap: clamp(28px, 5vw, 48px); margin-top: 34px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.15fr; align-items: start; } }

.contact__aside { display: grid; gap: 18px; align-content: start; }
.info {
  background: var(--card); border: 1px solid var(--linen-deep);
  border-radius: var(--r-lg); padding: 24px;
}
.info h3 { font-size: 1.08rem; }
.info p { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.info a.mail {
  margin-top: 12px; display: inline-block; font-weight: 600;
  font-size: 1.02rem; word-break: break-word;
}
.steps { counter-reset: s; display: grid; gap: 12px; margin-top: 4px; }
.steps li { position: relative; padding-left: 40px; color: var(--ink-soft); font-size: .95rem; list-style: none; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--linen); color: var(--pine);
  display: grid; place-items: center;
  font-family: var(--font-d); font-weight: 700; font-size: .86rem;
}

.form {
  background: var(--card); border: 1px solid var(--linen-deep);
  border-radius: var(--r-lg); padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow-m);
}
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--pine); }
.field .hint { font-size: .84rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  background: var(--cream); border: 1px solid var(--linen-deep);
  border-radius: var(--r); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--gold); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff;
  border-color: var(--terra);
  box-shadow: 0 0 0 4px rgba(196, 103, 59, .14);
}
.field select { appearance: none; background-image: none; }
.selwrap { position: relative; }
.selwrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; pointer-events: none;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--pine-soft); border-bottom: 2px solid var(--pine-soft);
  transform: rotate(45deg);
}
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__submit { width: 100%; padding: 15px 24px; font-size: 1rem; }
.form__note { margin-top: 14px; font-size: .85rem; color: var(--ink-soft); text-align: center; text-wrap: pretty; }

.alert { border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; font-size: .94rem; border: 1px solid; }
.alert--bad { background: rgba(166, 58, 46, .07); border-color: rgba(166, 58, 46, .3); color: var(--danger); }

/* thank-you state, target of the view transition */
.sent { text-align: center; padding: clamp(28px, 6vw, 52px) 8px; }
.sent__ico { font-size: 3rem; line-height: 1; }
.sent h3 { margin-top: 16px; font-size: clamp(1.5rem, 4vw, 2rem); }
.sent p { margin-top: 12px; color: var(--ink-soft); max-width: 42ch; margin-inline: auto; text-wrap: pretty; }
.sent .btn { margin-top: 26px; }
@supports (view-transition-name: none) {
  .form, .sent { view-transition-name: pn-contact; }
}

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--linen-deep); padding-block: 40px; margin-top: 20px; }
.ftr__in { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.ftr__links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-inline: -10px; }
/* comfortable thumb targets: 44px tall, well clear of the 24px WCAG 2.5.8 floor */
.ftr a {
  color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px;
}
.ftr a:hover { color: var(--terra-deep); text-decoration: underline; }
.ftr__mark { color: var(--ink-soft); font-size: .88rem; }

/* store apps: never show a price or a store badge inside the wrapper */
.is-twa .no-app { display: none !important; }
