/* ==========================================================================
   Embroidered Occasions: site layer (layout and one-off pieces, tokens only)
   Layout concept: a running stitch ties the page together. It draws round
   the hero hoop as you scroll, threads the five steps, and runs along the
   top of the header as a reading-progress line.
   ========================================================================== */

html { scroll-padding-top: 96px; }
/* hidden always wins: .field .error sets display:flex, which would show every form error before anyone types */
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: var(--z-overlay); background: var(--bg);
}
/* Side gutter: at least 16px, and clear of a phone's side bars */
.container {
  width: 100%; max-width: calc(var(--max-width) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sprite { position: absolute; }

/* Every stitched motif: a dashed line, like a running stitch */
svg use, .hero__proof svg, .bento__item svg, .photo-slot svg, .brandmark__icon {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 4 3;
}

/* Headings get the brand's light display weight */
h1, h2 { font-weight: 500; letter-spacing: -0.02em; }
h3 { font-weight: 500; }
.section-head { display: flex; flex-direction: column; gap: var(--space-3); max-width: 40rem; }
.eyebrow { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition-property: border-color, box-shadow;
  transition-duration: var(--dur);
  transition-timing-function: var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-1); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 76px;
  transition-property: min-height; transition-duration: var(--dur); transition-timing-function: var(--ease-out);
}
.site-header.is-scrolled .site-header__inner { min-height: 64px; }
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.brandmark {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: var(--target); color: var(--heading); text-decoration: none;
  font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 500; letter-spacing: 0.01em;
}
.brandmark__icon { width: 34px; height: 34px; color: var(--accent); }
.brandmark__name span { color: var(--accent-text); }
.brandmark--light { color: var(--heading); }
.brandmark--light .brandmark__icon, .brandmark--light .brandmark__name span { color: var(--accent-text); }

.site-nav__list { display: flex; align-items: center; gap: var(--space-1); list-style: none; padding: 0; }
.site-nav__list a:not(.btn) {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); min-width: var(--target);
  padding-inline: var(--space-3);
  color: var(--heading); font-size: var(--text-sm); font-weight: 500;
  text-decoration-line: none; text-underline-offset: 0.35em; text-decoration-thickness: 2px;
}
/* A short run of thread sews in under a menu link on hover, focus and for the section you're in */
.site-nav__list a:not(.btn) { position: relative; }
.site-nav__list a:not(.btn)::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 4px; height: 8px;
  background: url("../img/thread.svg") left center / 30px 8px repeat-x;
  clip-path: inset(0 100% 0 0); transition: clip-path 240ms var(--ease-out);
}
.site-nav__list a:not(.btn):is(:hover, :focus-visible, .is-current)::after { clip-path: inset(0 0 0 0); }
/* The section you're in: one thread glides between menu items (js/site.js), leading edge first, on a soft spring */
@property --nt-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --nt-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.site-nav__list { position: relative; --spring: linear(0, 0.16 5%, 0.48 12%, 0.78 21%, 0.94 30%, 1.01 40%, 1.02 50%, 1.005 65%, 1); }
.nav-thread {
  position: absolute; left: 0; right: 0; top: 0; height: 8px; pointer-events: none;
  background: url("../img/thread.svg") left center / 30px 8px repeat-x;
  clip-path: inset(0 calc(100% - var(--nt-r)) 0 var(--nt-l));
  opacity: 0; transition: --nt-l 460ms var(--spring), --nt-r 300ms var(--spring), opacity var(--dur-fast) var(--ease-out);
}
.nav-thread[data-dir="left"] { transition: --nt-l 300ms var(--spring), --nt-r 460ms var(--spring), opacity var(--dur-fast) var(--ease-out); }
.has-glide > .nav-thread { opacity: 1; }
.has-glide a.is-current:not(:hover, :focus-visible)::after { clip-path: inset(0 100% 0 0); transition: none; }
.site-nav__cta { margin-left: var(--space-3); }
.site-nav__toggle { display: none; }

/* Reading progress: a thread along the header's lower edge */
.scroll-thread { position: absolute; inset: auto 0 -5px 0; height: 10px; pointer-events: none; }
.scroll-thread span {
  display: block; height: 100%;
  background: url("../img/thread.svg") left center / 36px 10px repeat-x;
  clip-path: inset(0 calc((1 - var(--page-p, 0)) * 100%) 0 0);
}
/* The needle rides at the end of the thread, leading the way */
.scroll-thread__needle {
  position: absolute; top: -5px; left: calc(var(--page-p, 0) * 100%); width: 38px; height: 15px;
  translate: -3px 0; background: url("../img/needle.svg") left center / contain no-repeat;
  opacity: clamp(0, calc(var(--page-p, 0) * 40), 1);
}

@media (max-width: 920px) {
  .site-nav__toggle { display: inline-grid; }
  .site-nav__list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--space-3) var(--gutter) var(--space-5);
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition-property: opacity, transform, visibility;
    transition-duration: var(--dur);
    transition-timing-function: var(--ease-out);
  }
  .site-nav__list.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav__list:not(.is-open) { transition-duration: var(--dur-fast); }   /* closing is quicker than opening */
  .site-nav__list a:not(.btn) { font-size: var(--text-md); padding-inline: 0; justify-content: flex-start; }
  .site-nav__list a:not(.btn)::after { left: 0; right: auto; width: 6em; }
  .site-nav__cta { margin: var(--space-3) 0 0; }
  .nav-thread { display: none; }
  .has-glide a.is-current:not(:hover, :focus-visible)::after { clip-path: inset(0 0 0 0); }
  .site-nav__cta .btn { width: 100%; }
}

/* ---------- Buttons: soft pills with a lit top edge and a darker lip; secondary keeps a 3:1 edge ---------- */
.btn { padding-inline: var(--space-6); }
.btn--primary {
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -2px 0 var(--edge-lo),
              0 1px 2px rgb(var(--shadow-rgb) / 0.4), 0 8px 24px -6px var(--accent-glow);
}
.btn--secondary {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px rgb(var(--shadow-rgb) / 0.12);
}
@media (hover: hover) {
  .btn--primary:hover {
    box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -2px 0 var(--edge-lo),
                0 2px 4px rgb(var(--shadow-rgb) / 0.35), 0 14px 30px -8px var(--accent-glow);
  }
  .btn--secondary:hover { background: var(--surface); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active, .btn--primary:active, .btn--secondary:active { transform: none; translate: 0 1px; box-shadow: inset 0 2px 4px rgb(var(--shadow-rgb) / 0.35); }

/* Browser surfaces in the brand's colours */
html { scrollbar-color: var(--line-strong) var(--bg); }
:is(input, textarea) { caret-color: var(--accent-text); }

/* ---------- Hero ---------- */
/* Real linen behind the header (a free Unsplash photo, warmed toward the cream ground and kept light:
   body text still passes 4.5:1 on its darkest thread). */
.hero {
  padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 104px); overflow: hidden;
  background: var(--bg) url("../img/linen.jpg") center / cover;
}
.hero__grid {
  display: grid; gap: clamp(32px, 5vw, 72px); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.hero__copy { --stack-gap: var(--space-5); min-width: 0; }
.hero h1 { font-family: var(--font-display); font-size: clamp(3rem, 1.9rem + 4.9vw, 5.9rem); line-height: 1.04; font-weight: 400; letter-spacing: -0.01em; }
/* "for every / occasion": one long sewing needle is both the y of "every" (its head, with the thread
   through the eye as the y's short arm) and the i of "occasion", then slips under the linen and comes
   out above the paragraph. Drawn by tools/make-occasion.py, which also sets the indent, gap and size
   here. The real letters stay (screen readers and copy read "for every occasion"); the y and i are
   see-through and the drawing sits on top. Kerning is off so the letters land where it measured. */
.eo-lockup {
  --eo-indent: 0.437em; --eo-gap: 0.080em;
  display: block; width: max-content; position: relative; padding-bottom: 0.42em;
  font-kerning: none; letter-spacing: 0; white-space: nowrap;
}
.eo-line { display: block; }
.eo-line--b { margin-top: var(--eo-gap); margin-left: var(--eo-indent); font-style: italic; color: var(--accent-text); }
.needle-y, .needle-i { color: transparent; }
/* Scroll mode (js/site.js turns it on unless reduced motion is set): "occasion" starts as a washable-blue
   tracing on the linen and is satin-stitched in, left to right, as the page scrolls, while the needle dips
   in and out of the cloth with each stitch. Without it the word is the plain italic above. */
.eo-scroll-only { display: none; }
.eo-scroll .eo-scroll-only { display: inline; }
.fonts-ready .eo-scroll .eo-line--b { color: transparent; }
.eo-scroll .eo-reveal { clip-path: url(#eo-behind); }
/* "sew" version: no tracing; the needle itself travels the word, in and out of the linen, then docks as the y and i */
.eo-sew-only { display: none; }
.eo-sew .eo-sew-only { display: inline; }
.fonts-ready .eo-sew .eo-line--b { color: transparent; }
.eo-sew .eo-reveal { clip-path: url(#eo-behind); }
.eo-sew:not(.eo-docked) .needle-y { color: inherit; }     /* the needle is out working, so "every" keeps its own y */
.needle-y { transition: color 0.4s ease; }
.eo-sew:not(.eo-docked) .eo-home-puckers { opacity: 0; }
.eo-home-puckers { transition: opacity 0.3s ease; }
.eo-dent { fill: rgb(var(--shadow-rgb) / 0.3); }
.eo-transfer path { fill: none; stroke: var(--transfer-blue); stroke-width: 14; stroke-linejoin: round; }
.eo-satin-shadow { fill: rgb(var(--shadow-rgb) / 0.35); }
.eo-satin-base { fill: var(--thread-mid); }
.eo-satin-gap { fill: var(--thread-lo); opacity: 0.5; }
.eo-satin-sheen { fill: var(--thread-hi); opacity: 0.5; }
.eo-satin-light { fill: none; stroke: var(--thread-hi); stroke-width: 40; opacity: 0.55; }   /* light on the upper left of each raised letter */
.eo-satin-dark { fill: none; stroke: var(--thread-lo); stroke-width: 40; opacity: 0.5; }
.eo-satin-edge { fill: none; stroke: var(--thread-lo); stroke-width: 6; opacity: 0.7; }
.eo-glint-stop { stop-color: var(--thread-light-hi); }
.eo-glint { opacity: 0; }
.eo-art {
  position: absolute; left: 0; top: 0; width: 3.592em; height: 2.700em;
  overflow: visible; pointer-events: none;
}
.js .eo-art { visibility: hidden; }            /* wait for the font, so the needle lands on the right letter */
.js.fonts-ready .eo-art { visibility: visible; }
.steel-hi { stop-color: var(--steel-hi); } .steel-mid { stop-color: var(--steel-mid); } .steel-lo { stop-color: var(--steel-lo); }
.eo-hole { fill: rgb(var(--shadow-rgb) / 0.35); }
.eo-pucker { fill: rgb(var(--shadow-rgb) / 0.28); }
.eo-thread { fill: none; stroke: var(--thread-mid); stroke-width: 34; stroke-linecap: round; stroke-linejoin: round; }
.eo-thread--floss { stroke-width: 50; }
.eo-thread--twist { stroke: var(--thread-lo); stroke-width: 9; stroke-dasharray: 9 21; opacity: 0.6; }
.eo-thread--sheen { stroke: var(--thread-hi); stroke-width: 6; opacity: 0.95; translate: -3px -8px; }
.eo-shadow { fill: none; stroke: rgb(var(--shadow-rgb) / 0.35); stroke-width: 30; }
.eo-needle-shadow .eo-shadow { fill: rgb(var(--shadow-rgb) / 0.3); stroke: none; }
.eo-steel { fill: url(#eo-steel); stroke: var(--steel-lo); stroke-width: 3; }
.eo-eye-lip { fill: none; stroke: var(--steel-hi); stroke-width: 4; opacity: 0.8; }
.eo-groove { fill: none; stroke: var(--steel-lo); stroke-width: 4; stroke-linecap: round; opacity: 0.5; }
.eo-rim { fill: none; stroke: var(--hoop-wood); stroke-width: 5; stroke-linecap: round; opacity: 0.45; }
.eo-spec { fill: none; stroke: var(--steel-hi); stroke-width: 6; stroke-linecap: round; }
.eo-glide { fill: none; stroke: var(--steel-hi); stroke-width: 20; stroke-linecap: round; stroke-dasharray: 0.1 2; opacity: 0; }
/* The stitches sew in, the needle slides down its own length under the cloth, the thread draws
   in from its cut end through the eye, then a single glint travels down the steel. All of it waits for the font. */
@media (prefers-reduced-motion: no-preference) {
  .fonts-ready .eo-sewn { animation: sew 0.9s cubic-bezier(.3,.7,.3,1) 0.2s both; }
  .fonts-ready :is(.eo-needle, .eo-needle-shadow) { animation: needle-in 0.75s cubic-bezier(.16,.84,.3,1) 0.8s both; }
  .fonts-ready .eo-pucker { animation: fade-in 0.3s ease-out 1.4s both; }
  .fonts-ready .eo-draw { stroke-dasharray: 1; animation: draw-thread 1.1s cubic-bezier(.45,0,.2,1) 1.4s both; }
  .fonts-ready .eo-ply { animation: fade-in 0.4s ease-out 2.4s both; }
  .fonts-ready .eo-glide { animation: glide 1s cubic-bezier(.4,0,.2,1) 2.6s both; }
  .eo-scroll .eo-sewn { animation: none; }
  .eo-sew.eo-docked .eo-glint { animation: glint 1.2s cubic-bezier(.4,0,.2,1) 0.3s both; }
  .eo-scroll.eo-done .eo-glint { animation: glint 1.2s cubic-bezier(.4,0,.2,1) both; }    /* the last stitch: light runs across the satin */
}
@keyframes sew { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes draw-thread { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes glint { from { opacity: 1; translate: 0 0; } to { opacity: 1; translate: 4200px 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes needle-in { from { opacity: 0; translate: 100px -290px; } to { opacity: 1; translate: 0 0; } }
@keyframes glide { 0% { opacity: 0; stroke-dashoffset: 0.1; } 20% { opacity: 0.9; } 100% { opacity: 0; stroke-dashoffset: -1; } }
.hero__actions { --cluster-gap: var(--space-3); }
.hero__proof {
  display: grid; gap: var(--space-3); list-style: none; padding: 0;
  margin-top: var(--space-2); color: var(--heading); font-size: var(--text-md); font-weight: 500;
}
.hero__proof li { display: flex; align-items: center; gap: var(--space-3); }
.hero__proof svg { width: 28px; height: 28px; flex: none; color: var(--accent); }

.hero__art { position: relative; min-width: 0; }
.hoop { width: 100%; max-width: 560px; margin-inline: auto; overflow: visible; }
.hoop__wood { fill: none; stroke: var(--hoop-wood); stroke-width: 14; }
.hoop__wood--inner { stroke: var(--hoop-wood-dark); stroke-width: 6; }
.hoop__clamp { fill: var(--hoop-wood); }
.hoop__fabric { fill: var(--fabric); }
.hoop__weave path { stroke: var(--weave); stroke-width: 1; fill: none; }
.hoop__motif { color: var(--accent); transform: translateY(var(--parallax, 0px)); }
/* A photo in the hoop replaces the stitched motif and its placeholder tag. */
.hoop:has(.hoop__photo) .hoop__motif, .hoop:has(.hoop__photo) .hoop__weave, .hero__art:has(.hoop__photo) .hoop__tag { display: none; }
.hoop__motif use { stroke-width: 1.4; stroke-dasharray: 3 2.4; }
.hoop__word { font-family: var(--font-heading); font-size: 30px; font-weight: 500; letter-spacing: 0.08em; fill: var(--accent-text); }
.hoop__ring { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 9 7; stroke-linecap: round; }
.hoop__mask {
  fill: none; stroke: #FFFFFF; stroke-width: 12; /* audit-ok: mask channel, not a visible colour */
  stroke-dasharray: calc(var(--ring-p, 0.32) * 1344.6px) 1400px;   /* 1344.6 = the ring's length, 2 x pi x 214, so the stitch ends where the needle is in every browser */
}
/* The embroidered piece drifts and settles in the hoop as the hero scrolls (js/site.js sets --hero-p). */
.hoop__photo { transform: translateY(calc(var(--hero-p, 0) * -16px)) scale(calc(1.05 - var(--hero-p, 0) * 0.05)); transform-origin: 260px 268px; }
/* The needle at the head of the stitch: steel, a slot eye you can see through, a soft shadow on the cloth. */
.hoop__steel { fill: url(#hoop-steel); fill-rule: evenodd; stroke: var(--steel-lo); stroke-width: 0.5; }
.hoop__spec { fill: none; stroke: var(--steel-hi); stroke-width: 0.9; stroke-linecap: round; opacity: 0.9; }
.hoop__needle-shadow path { fill: rgb(var(--shadow-rgb) / 0.32); fill-rule: evenodd; }
.hoop__pucker { fill: rgb(var(--shadow-rgb) / 0.35); }
.hoop__thread { fill: none; stroke: var(--thread-mid); stroke-width: 2.6; stroke-linecap: round; }
.hoop__thread--under { stroke: var(--thread-lo); stroke-width: 3.8; opacity: 0.55; }
.hoop__thread--sheen { stroke: var(--thread-hi); stroke-width: 0.9; translate: -0.4px -0.8px; }
.hoop__tag {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--ring), var(--shadow-1);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; white-space: nowrap;
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; width: 100%; margin-inline: auto; }
}

/* ---------- Rose band ---------- */
.band-rose { background: var(--rose-bg); color: var(--rose-text); --focus: var(--dark-focus); }
.band-rose :is(h2, h3) { color: var(--rose-heading); }
.band-rose .eyebrow { color: var(--rose-muted); }
.band-rose .lead { color: var(--rose-text); }

.proof { padding-block: var(--space-7); }
.proof__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5);
  list-style: none; padding: 0;
}
.proof__list li { display: flex; flex-direction: column; gap: var(--space-1); padding-left: var(--space-4); box-shadow: inset 2px 0 0 var(--rose-muted); }
.proof__num { font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 500; line-height: 1.05; color: var(--rose-heading); font-variant-numeric: tabular-nums; }
.proof__label { font-size: var(--text-md); color: var(--rose-muted); }
@media (max-width: 760px) { .proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-6); } }

/* ---------- What I stitch: bento ---------- */
.what { --stack-gap: var(--space-7); }
.bento {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bento__feature { grid-column: span 2; grid-row: span 2; gap: var(--space-4); }
.bento__feature h3 { font-size: var(--text-2xl); }
.bento__feature .pill { align-self: flex-start; }
.bento__cta { align-self: flex-start; margin-top: auto; }
.bento .card { box-shadow: var(--ring), var(--shadow-1), 0 14px 28px -22px rgb(var(--shadow-rgb) / 0.3); }
.bento__item svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: var(--space-2); }
.bento__item p, .bento__feature p { font-size: var(--text-md); color: var(--text); }
.pill--rose { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bento .card { transition-property: transform, box-shadow; transition-duration: var(--dur); transition-timing-function: var(--ease-out); }
  .bento .card:hover { transform: translateY(-3px); box-shadow: var(--ring), var(--shadow-2), 0 22px 40px -24px rgb(var(--shadow-rgb) / 0.35); }
  .bento__item:hover svg { animation: stitch-run 1.6s linear infinite; }
}
@keyframes stitch-run { to { stroke-dashoffset: -14; } }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .bento__feature { grid-column: auto; grid-row: auto; }
}

.styles { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.styles__title { font-size: var(--text-md); font-family: var(--font-body); font-weight: 600; }
.styles__list { --cluster-gap: var(--space-2); list-style: none; padding: 0; }
.styles .pill { background: var(--surface); box-shadow: var(--ring); font-size: var(--text-sm); min-height: 36px; padding-inline: var(--space-4); }

/* ---------- Photo slots: where Alison's real photos go ---------- */
.photo-slot {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 3; max-width: 100%;
  border-radius: var(--radius-media);
  background:
    repeating-linear-gradient(0deg, var(--weave) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, var(--weave) 0 1px, transparent 1px 14px),
    var(--accent-wash);
  color: var(--accent);
  overflow: hidden;
}
.photo-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.photo-slot:has(> img) > svg, .photo-slot:has(> img) > .photo-slot__tag { display: none; }
.photo-slot--tall { aspect-ratio: 16 / 10; }
.photo-slot--portrait { aspect-ratio: 4 / 5; }
.photo-slot svg { width: 38%; height: auto; aspect-ratio: 1; stroke-width: 1.4; stroke-dasharray: 3 2.4; }
.photo-slot__tag {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-muted);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.3; text-shadow: none;
}

/* ---------- How it works: sticky intro, threaded steps ---------- */
.process__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.process__intro { position: sticky; top: 120px; --stack-gap: var(--space-4); }
.process__meter {
  font-family: var(--font-heading); font-size: var(--text-xl); color: var(--text-muted);
  font-variant-numeric: tabular-nums; margin-top: var(--space-3);
}
.process__meter span { color: var(--accent-text); font-weight: 600; }
.process__steps { position: relative; list-style: none; padding: 0 0 0 56px; display: grid; gap: var(--space-8); }
.process__steps::before, .process__steps::after {
  content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 3px;
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 9px, transparent 9px 15px);
}
.process__steps::after {
  left: 8.5px; width: 16px;
  background: url("../img/thread-v.svg") center top / 16px 60px repeat-y;
  clip-path: inset(0 0 calc((1 - var(--steps-p, 0)) * 100%) 0);
}
.process__step { position: relative; display: flex; flex-direction: column; gap: var(--space-2); }
.process__dot {
  position: absolute; left: -56px; top: 0; z-index: var(--z-raised);
  width: 33px; height: 33px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 3px var(--line-strong);
  transition-property: background-color, box-shadow, transform;
  transition-duration: var(--dur-slow); transition-timing-function: var(--ease-out);
}
.process__step.is-done .process__dot { background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 6px var(--accent-wash); }
.process__num { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-text); }
.process__step h3 { font-size: var(--text-2xl); }
@media (max-width: 860px) {
  .process__grid { grid-template-columns: 1fr; }
  .process__intro { position: static; }
  .process__meter { display: none; }
}

/* ---------- Gallery: cocoa band, sideways scroll ---------- */
.gallery { --stack-gap: var(--space-6); }
.gallery__head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-5); flex-wrap: wrap; }
.gallery__btn { border: 1px solid var(--line-strong); border-radius: 50%; color: var(--heading); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 2px 6px rgb(0 0 0 / 0.3); /* audit-ok: light edge and shadow on the cocoa band */ }
.gallery__btn:not(:disabled):active { translate: 0 1px; box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.35); /* audit-ok: pressed well on cocoa */ }
.gallery__btn:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) { .gallery__btn:not(:disabled):hover { background: var(--dark-line); } }
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 31%);
  gap: var(--space-5); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--dark-line-strong) transparent;
  padding-bottom: var(--space-4); border-radius: var(--radius-media);
}
.gallery__track:focus-visible { outline-offset: 6px; }
.gallery__item { scroll-snap-align: start; display: flex; flex-direction: column; gap: var(--space-3); }
.gallery__item .photo-slot { aspect-ratio: 4 / 5; background-color: var(--surface); }
.gallery .photo-slot {
  background:
    repeating-linear-gradient(0deg, var(--dark-line) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, var(--dark-line) 0 1px, transparent 1px 14px),
    var(--dark-bg-deep);
  color: var(--dark-accent-text);
}
.gallery .photo-slot__tag { background: var(--dark-bg); color: var(--dark-muted); box-shadow: 0 0 0 1px var(--dark-line); }
.gallery__item figcaption { color: var(--heading); font-weight: 500; font-size: var(--text-md); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery__item .photo-slot svg { transition-property: transform; transition-duration: var(--dur-slow); transition-timing-function: var(--ease-out); }
  .gallery__item:hover .photo-slot svg { transform: scale(1.06) rotate(-3deg); }
}
@media (max-width: 640px) { .gallery__track { grid-auto-columns: 78%; } }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__photo svg { width: 30%; }
.about__copy { --stack-gap: var(--space-4); }
@media (max-width: 760px) { .about__grid { grid-template-columns: 1fr; } .about__photo { max-width: 360px; } }

/* ---------- FAQ: smooth-opening details ---------- */
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__list { display: grid; gap: var(--space-3); }
.faq__item {
  background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--ring), var(--shadow-1);
  interpolate-size: allow-keywords;
}
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  min-height: 64px; padding: var(--space-4) var(--space-5);
  color: var(--heading); font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 500;
  cursor: pointer; list-style: none; border-radius: var(--radius-card);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: translateY(-3px) rotate(45deg);
  transition-property: transform; transition-duration: var(--dur); transition-timing-function: var(--ease-out);
}
.faq__item[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq__answer { padding: 0 var(--space-5) var(--space-5); }
.faq__answer p { font-size: var(--text-md); }
.faq__item::details-content {
  block-size: 0; overflow: hidden;
  transition-property: block-size, content-visibility;
  transition-duration: var(--dur-slow);
  transition-timing-function: var(--ease-out);
  transition-behavior: allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }
@media (max-width: 860px) { .faq__grid { grid-template-columns: 1fr; } }

/* ---------- Start: rose band with the quote form ---------- */
.start__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.start__copy { --stack-gap: var(--space-4); position: sticky; top: 120px; }
.start__form { --focus: var(--heading); --card-pad: clamp(var(--space-5), 4vw, var(--space-7)); --stack-gap: var(--space-5); text-shadow: none; box-shadow: var(--shadow-3); }
.start__form .field { max-width: none; }
.start__form .field input, .start__form .field textarea {
  border-radius: 12px; background: var(--bg);
  transition-property: border-color, box-shadow, background-color;
  box-shadow: inset 0 1px 2px rgb(var(--shadow-rgb) / 0.12), inset 0 2px 6px -2px rgb(var(--shadow-rgb) / 0.08);
}
.start__form .field :is(input, textarea):focus-visible { background: var(--surface); }
.start__alt { color: var(--rose-text); font-size: var(--text-md); }
.start__alt a { color: var(--rose-heading); font-weight: 600; text-decoration-line: underline; text-decoration-color: var(--rose-muted); overflow-wrap: anywhere; }
.start__note { font-size: var(--text-sm); color: var(--text-muted); margin-top: calc(-1 * var(--space-2)); }
.optional { font-weight: 400; color: var(--text-muted); }
.start__submit { align-self: flex-start; }
.start__status:empty { display: none; }
.start__status[data-state="error"] { background: var(--danger-wash); color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.start__status { padding: var(--space-3) var(--space-4); border-radius: 12px; background: var(--success-wash); color: var(--success); font-weight: 600; font-size: var(--text-md); box-shadow: inset 3px 0 0 var(--success); }
@media (max-width: 860px) { .start__grid { grid-template-columns: 1fr; } .start__copy { position: static; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-8) var(--space-5); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); }
.site-footer__contact { list-style: none; padding: 0; display: grid; gap: 0; color: var(--text); }
.site-footer__contact li { display: flex; align-items: center; min-height: var(--target); }
.site-footer__contact a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--text); text-decoration-line: none; overflow-wrap: anywhere; }
.site-footer__title { color: var(--text-muted); margin-bottom: var(--space-3); }
.site-footer__links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-5); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--text); text-decoration-line: none; }
.site-footer__base {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line);
  color: var(--text-muted); font-size: var(--text-sm);
}
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ----------
   Only things below the first screen are ever hidden, and only when the
   script runs, so the page is complete at rest without it. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    transition-property: opacity, transform;
    transition-duration: var(--dur-slow);
    transition-timing-function: var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .js [data-reveal].is-pending { opacity: 0; transform: translateY(24px); }
}

/* Cross-page fades when the other pages exist */
@view-transition { navigation: auto; }

/* ---------- Seams: a run of thread sews in along the top of each colour band ---------- */
.seam { position: relative; }
.seam::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 14px; z-index: 1; pointer-events: none;
  background: url("../img/thread.svg") left center / 52px 14px repeat-x;
}
.seam:is(.band-rose, .on-dark)::before { background-image: url("../img/thread-light.svg"); }
.js .seam::before { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s cubic-bezier(.3,.7,.3,1); }
.js .seam.is-sewn::before { clip-path: inset(0 0 0 0); }

/* ---------- A sewn check mark when a request goes through ---------- */
.sewn-check { width: 30px; height: 30px; flex: none; overflow: visible; }
.sewn-check__run { fill: none; stroke: var(--accent); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5 3.4; }
.sewn-check__sheen { fill: none; stroke: var(--thread-hi); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 2.6 5.8; stroke-dashoffset: -1; opacity: .9; }
.sewn-check__mask { fill: none; stroke: white; /* audit-ok: mask luminance, not a colour */ stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }
.start__status[data-state="ok"] { display: flex; align-items: center; gap: var(--space-3); }
@media (prefers-reduced-motion: no-preference) {
  .sewn-check__mask { animation: sew-check 0.9s cubic-bezier(.3,.7,.3,1) both; }
}
@keyframes sew-check { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
