/* Petal & Hook. Components read tokens.css only. Logical properties throughout. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-block-start: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--text-0);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, canvas, svg, model-viewer { display: block; max-inline-size: 100%; }
h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100; padding: var(--space-3) var(--space-4);
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-s);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--text-4); line-height: var(--leading-tight); font-weight: 300; }
h2 { font-size: var(--text-3); line-height: 1.05; font-weight: 300; }
h3 { font-size: var(--text-2); line-height: 1.1; font-weight: 400; }
em, .italic { font-style: italic; }
.amp { font-style: italic; font-weight: 400; }
.lede { font-size: var(--text-1); line-height: 1.5; color: var(--color-text-muted); max-inline-size: 38rem; text-wrap: pretty; }
.small { font-size: var(--text--1); color: var(--color-text-muted); }
.price { font-variant-numeric: lining-nums tabular-nums; font-weight: 600; }

/* ---------- layout ---------- */
.wrap { inline-size: 100%; max-inline-size: 1520px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-9); background: var(--color-surface); color: var(--color-text); }
#build.section { padding-block-start: var(--space-8); }
.section--paper { position: relative; isolation: isolate; background: var(--color-surface-2); }
.section--paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../art/paper-texture.webp") center / 560px auto; opacity: 0.4; mix-blend-mode: multiply;
}
.section-head { display: grid; gap: var(--space-4); margin-block-end: var(--space-7); max-inline-size: 46rem; justify-items: start; }
.eyebrow { font-family: var(--font-text); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-eyebrow); }
h1 em, h2 em { font-style: italic; font-weight: 300; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); font-size: 0.8125rem; line-height: 1.3; color: var(--color-text-muted); max-inline-size: 26rem; }
.steps li { display: grid; justify-items: start; gap: var(--space-2); }
.steps b { display: inline-grid; place-items: center; inline-size: 1.7rem; block-size: 1.7rem; border-radius: 50%; border: 1px solid var(--color-border-strong); font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--color-text); }
@media (min-width: 40rem) { .steps { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); max-inline-size: none; font-size: var(--text--1); } .steps li { display: inline-flex; align-items: center; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 3rem; padding: 0 var(--space-5); border-radius: var(--radius-full);
  border: 1.5px solid transparent; background: var(--color-accent); color: var(--color-accent-ink);
  font-weight: 600; font-size: 0.98rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-1), border-color var(--dur-1), transform var(--dur-1), color var(--dur-1);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }
.btn--line { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); }
.btn--line:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); filter: none; }
.btn--quiet { background: transparent; color: var(--color-text); padding-inline: var(--space-3); min-block-size: 2.75rem; border-radius: var(--radius-s); text-decoration: underline; font-weight: 500; }
.btn--small { min-block-size: 2.75rem; padding-inline: var(--space-4); font-size: 0.92rem; }
.btn svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }
.icon-btn {
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: var(--radius-full); display: grid; place-items: center;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent); border: 1px solid var(--color-border);
  color: var(--color-text); transition: background-color var(--dur-1);
}
.icon-btn:hover { background: var(--color-surface); }
.icon-btn[aria-pressed="true"] { background: var(--color-green); color: var(--color-ivory); border-color: var(--color-green); }
.icon-btn svg { inline-size: 1.25rem; block-size: 1.25rem; }

/* ---------- header ---------- */
.top {
  position: fixed; inset-inline: 0; inset-block-start: 0; z-index: var(--z-header);
  block-size: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-inline: var(--gutter); color: var(--color-ivory);
  transition: background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2);
  border-block-end: 1px solid transparent;
}
.top:not(.is-solid) { text-shadow: 0 1px 14px rgba(8, 14, 10, 0.6); }
.top:not(.is-solid) .btn { text-shadow: none; }
.top.is-solid { background: var(--color-surface); color: var(--color-text); border-block-end-color: var(--color-border); }
.brand { white-space: nowrap; font-family: var(--font-display); font-size: 1.65rem; font-weight: 400; text-decoration: none; letter-spacing: -0.01em; line-height: 1; }
.top nav { display: none; gap: var(--space-5); font-size: 0.95rem; }
.top nav a { text-decoration: none; padding-block: var(--space-2); border-block-end: 1px solid transparent; }
.top nav a:hover { border-block-end-color: currentColor; }
.top .actions { display: flex; align-items: center; gap: var(--space-2); }
.top .btn { min-block-size: 2.75rem; padding-inline: var(--space-4); }
.top:not(.is-solid) .btn--line { color: var(--color-ivory); border-color: rgba(246, 242, 232, 0.55); }
.top-cta { font-size: 0.9rem; background: transparent; color: var(--color-text); border-color: var(--color-border-strong); transition: opacity var(--dur-2), visibility var(--dur-2), background-color var(--dur-1); }
.top-cta:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); filter: none; }
.top:not(.is-solid) .top-cta { visibility: hidden; opacity: 0; }
@media (max-width: 23rem) { .hide-xs { display: none; } .brand { font-size: 1.45rem; } .top { gap: var(--space-2); } }
.bag-btn { position: relative; inline-size: 2.75rem; block-size: 2.75rem; display: grid; place-items: center; background: transparent; border: 0; color: inherit; border-radius: var(--radius-full); }
.bag-btn svg { inline-size: 1.5rem; block-size: 1.5rem; }
.bag-btn .count {
  position: absolute; inset-block-start: 2px; inset-inline-end: 0; min-inline-size: 1.25rem; block-size: 1.25rem; padding-inline: 4px;
  border-radius: var(--radius-full); background: var(--color-blush); color: var(--color-on-blush); font-size: 0.75rem; font-weight: 700;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.bag-btn .count[data-zero="true"] { display: none; }
@media (min-width: 62rem) { .top nav { display: flex; } }

/* ---------- hero ---------- */
/* Phones: the photograph on top, fading into the copy. Tablets: wide photograph, copy underneath.
   Desktop: the photograph fills the screen and the copy sits in the quiet wood on the right. */
.hero { position: relative; isolation: isolate; background: var(--color-hero-bg); color: var(--color-ivory); overflow: hidden; }
.hero-media { position: relative; aspect-ratio: 3 / 4; max-block-size: 84svh; inline-size: 100%; overflow: hidden; }
.hero-media picture { display: contents; }
.hero-img, .hero-video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 38% 50%; }
.hero-video { opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero-video.is-playing { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(15, 29, 23, 0.82) 0, rgba(15, 29, 23, 0.4) 14%, rgba(15, 29, 23, 0) 30%),
    linear-gradient(to top, var(--color-hero-bg) 0, rgba(20, 38, 30, 0.92) 18%, rgba(20, 38, 30, 0.55) 34%, rgba(20, 38, 30, 0) 50%);
}
.hero-copy { position: relative; z-index: 2; margin-block-start: -7.5rem; padding: 0 var(--gutter) var(--space-8); display: grid; gap: var(--space-4); align-content: start; }
.hero-copy h1 { max-inline-size: 12ch; text-shadow: 0 2px 24px rgba(10, 20, 15, 0.35); }
.hero-copy .lede { color: var(--color-on-dark); max-inline-size: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-ship { font-size: var(--text--1); color: var(--color-on-dark-faint); }
@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: hero-drift 26s var(--ease-out) both; }
  .hero-copy > * { animation: rise 1.1s var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
}
@keyframes hero-drift { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (min-width: 48rem) {
  .hero { background: var(--color-walnut); --color-hero-bg: var(--color-walnut); }
  .hero-media { aspect-ratio: auto; block-size: min(66svh, 80vw); max-block-size: none; }
  .hero-img, .hero-video { object-position: 42% 50%; }
  .hero-shade {
    background:
      linear-gradient(to bottom, rgba(14, 8, 4, 0.78) 0, rgba(14, 8, 4, 0.35) 14%, rgba(14, 8, 4, 0) 28%),
      linear-gradient(to top, var(--color-walnut) 0, rgba(26, 15, 8, 0.94) 20%, rgba(26, 15, 8, 0.7) 34%, rgba(26, 15, 8, 0) 56%);
  }
  /* tablets: the headline on the left, the sentence and the buttons on the right */
  .hero-copy { margin-block-start: -9rem; padding-block-end: var(--space-8); grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--space-7); row-gap: var(--space-3); align-items: start; }
  .hero-copy .eyebrow { grid-column: 1 / -1; }
  .hero-copy h1 { grid-column: 1; grid-row: 2 / span 3; font-size: clamp(3rem, 0.6rem + 5.2vw, 4.8rem); max-inline-size: none; }
  .hero-copy .lede, .hero-copy .hero-actions, .hero-copy .hero-ship { grid-column: 2; }
  .hero-copy .lede { padding-block-start: var(--space-2); }
}
@media (min-width: 74rem) {
  .hero { min-block-size: 100svh; display: grid; align-items: end; }
  .hero-media { position: absolute; inset: 0; block-size: auto; z-index: -1; }
  .hero-img, .hero-video { object-position: 50% 50%; }
  .hero-shade {
    background:
      linear-gradient(to bottom, rgba(14, 8, 4, 0.6) 0, rgba(14, 8, 4, 0) 22%),
      linear-gradient(90deg, rgba(14, 8, 4, 0) 40%, rgba(14, 8, 4, 0.62) 66%, rgba(14, 8, 4, 0.86) 100%);
  }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; justify-self: end; align-self: end; inline-size: min(29rem, 34vw); padding: calc(var(--header-h) + var(--space-8)) var(--gutter) var(--space-8) 0; box-sizing: content-box; row-gap: var(--space-4); }
  .hero-copy .eyebrow, .hero-copy h1, .hero-copy .lede, .hero-copy .hero-actions, .hero-copy .hero-ship { grid-column: 1; grid-row: auto; }
  .hero-copy h1 { font-size: clamp(3.4rem, 1rem + 4.4vw, 5.8rem); max-inline-size: none; }
  .hero-img, .hero-video { inline-size: 110%; inset-inline: auto 0; }
}

/* the facts under the photograph */
.strip {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-5); text-align: center;
  padding: var(--space-5) var(--gutter); background: var(--color-surface); border-block-end: 1px solid var(--color-border);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted);
}
@media (min-width: 74rem) {
  .strip { display: flex; justify-content: center; gap: var(--space-7); }
  .strip li + li::before { content: ""; display: inline-block; inline-size: 5px; block-size: 5px; margin-inline-end: var(--space-7); vertical-align: middle; border-radius: 50%; background: var(--color-blush-ink); opacity: 0.7; }
}

/* ---------- builder ---------- */
.builder { display: grid; gap: var(--space-5); align-items: start; }
.rail { position: sticky; inset-block-start: var(--header-h); z-index: 6; margin-inline: calc(var(--gutter) * -1); padding: var(--space-2) var(--gutter) 0; background: var(--color-surface); }
.stage {
  position: relative; border-radius: var(--radius-l); overflow: hidden; block-size: 46svh; min-block-size: 17rem;
  background: radial-gradient(90% 80% at 50% 34%, var(--color-stage-1) 0%, var(--color-stage-2) 52%, var(--color-stage-3) 100%);
  touch-action: none;
}
.stage canvas { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; outline-offset: -3px; }
.stage-loader { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-stage-ink); pointer-events: none; transition: opacity var(--dur-2); }
.stage-loader span { font-family: var(--font-display); font-style: italic; font-size: var(--text-1); }
.stage.is-ready .stage-loader { opacity: 0; }
.stage-ui { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); display: grid; gap: var(--space-2); z-index: var(--z-stage-ui); }
.stage-hint { position: absolute; inset-inline: var(--space-4); inset-block-end: var(--space-3); display: flex; justify-content: space-between; align-items: end; gap: var(--space-3); pointer-events: none; }
.stage-hint p { font-size: var(--text--1); color: var(--color-stage-ink); background: color-mix(in srgb, var(--color-ivory) 78%, transparent); padding: 6px 12px; border-radius: var(--radius-full); }
.stage-empty {
  position: absolute; inset-inline: var(--space-4); inset-block-end: var(--space-4); text-align: center; pointer-events: none; color: var(--color-stage-ink);
  font-family: var(--font-display); font-size: var(--text-1); font-style: italic; padding: var(--space-3) var(--space-4); border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--color-ivory) 86%, transparent); max-inline-size: 22rem; margin-inline: auto;
}
.stage-empty small { display: block; font-family: var(--font-text); font-style: normal; font-size: var(--text--1); margin-block-start: 2px; }
.stage:has(.stage-empty:not([hidden])) .stage-hint { display: none; }
.bouquet-text { font-size: var(--text--1); color: var(--color-text-muted); margin-block-start: var(--space-3); min-block-size: 2.6em; }
@media (max-width: 61.99rem) {
  .bouquet-text { position: absolute; inline-size: 1px; block-size: 1px; min-block-size: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.summary { display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-m); background: var(--color-surface-2); margin-block-start: var(--space-4); }
.summary--rail { display: none; }
.summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.summary-row dt { color: var(--color-text-muted); font-size: var(--text--1); }
.summary-row dd { font-weight: 600; text-align: end; }
.total { font-family: var(--font-display); font-size: var(--text-3); line-height: 1; font-weight: 400; font-variant-numeric: lining-nums; }
.summary-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.summary-actions .btn--primary { flex: 1 1 12rem; }
.helper { font-size: var(--text--1); color: var(--color-text-muted); }
.helper[data-tone="warn"] { color: var(--color-blush-ink); }
.buybar {
  position: sticky; inset-block-end: 0; z-index: 7; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--gutter); margin-inline: calc(var(--gutter) * -1); background: var(--color-surface);
  border-block-start: 1px solid var(--color-border);
}
.buybar .total { font-size: var(--text-2); }
.buybar p { font-size: var(--text--1); color: var(--color-text-muted); line-height: 1.25; }
.shelf { display: grid; gap: var(--space-7); }
.shelf-block { display: grid; gap: var(--space-4); }
.shelf-block > h3 { font-size: var(--text-2); }
.stems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.stem { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-m); background: var(--color-surface-2); overflow: hidden; border: 1px solid transparent; transition: border-color var(--dur-2); }
.stem[data-count]:not([data-count="0"]) { border-color: var(--color-border-strong); }
.stem-img { position: relative; block-size: 9.5rem; overflow: hidden; background: radial-gradient(70% 70% at 50% 45%, var(--color-surface) 0%, var(--color-surface-3) 100%); }
.stem-img img { position: absolute; inset: 7%; inline-size: 86%; block-size: 86%; object-fit: contain; transition: transform var(--dur-2) var(--ease-out); }
.stem:hover .stem-img img { transform: scale(1.04) rotate(-1.5deg); }
.stem-body { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-4); align-content: start; }
.stem-body h4 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; line-height: 1.05; }
.stem-meta { font-size: var(--text--1); color: var(--color-text-muted); line-height: 1.35; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-inline-start: -4px; }
.swatch { position: relative; inline-size: 2.75rem; block-size: 2.75rem; display: grid; place-items: center; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { inline-size: 1.65rem; block-size: 1.65rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(21, 36, 29, 0.28); transition: transform var(--dur-1); }
.swatch:hover span { transform: scale(1.1); }
.swatch input:checked + span { box-shadow: inset 0 0 0 1px rgba(21, 36, 29, 0.28), 0 0 0 2px var(--color-surface-2), 0 0 0 4px var(--color-green); }
.swatch input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 5px; }
.stem-colour { font-size: var(--text--1); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-full); inline-size: max-content; background: var(--color-surface); }
.stepper button { inline-size: 2.75rem; block-size: 2.75rem; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; }
.stepper button:hover:not([disabled]) { background: var(--color-surface-3); }
.stepper button[disabled] { opacity: 0.3; cursor: not-allowed; }
.stepper button svg { inline-size: 1.1rem; block-size: 1.1rem; }
.stepper output { min-inline-size: 2.2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stem-total { font-size: var(--text--1); color: var(--color-text-muted); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip label, .chip > span {
  display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: 2.75rem; padding: 0 var(--space-4) 0 var(--space-2);
  border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: var(--color-surface-2); font-size: 0.95rem; cursor: pointer;
  transition: border-color var(--dur-1), background-color var(--dur-1);
}
.chip i { inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(21, 36, 29, 0.3); flex: none; }
.chip input:checked + span { border-color: var(--color-green); background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-green); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.options { display: grid; gap: var(--space-3); }
.option {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-m); background: var(--color-surface-2); cursor: pointer; min-block-size: 3.5rem;
}
.option:has(input:checked) { border-color: var(--color-green); background: var(--color-surface); }
.stem-body .option { padding: var(--space-2) var(--space-3); gap: var(--space-2); }
.option strong { overflow-wrap: anywhere; }
.option input { inline-size: 1.4rem; block-size: 1.4rem; accent-color: var(--color-green); margin: 0; }
.option strong { font-weight: 600; }
.option small { display: block; color: var(--color-text-muted); font-size: var(--text--1); line-height: 1.3; }
.field { display: grid; gap: var(--space-2); }
.field label, .field .label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  inline-size: 100%; min-block-size: 3rem; padding: var(--space-3) var(--space-4); border-radius: var(--radius-s);
  border: 1.5px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text);
}
.field textarea { min-block-size: 6rem; resize: vertical; line-height: 1.45; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.field .hint { font-size: var(--text--1); color: var(--color-text-muted); }
.field .error { font-size: var(--text--1); color: var(--color-error); font-weight: 600; }
.field[data-invalid="true"] input, .field[data-invalid="true"] select { border-color: var(--color-error); }
.dark-note { font-size: var(--text--1); color: var(--color-text-muted); }

@media (min-width: 62rem) {
  .builder { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: var(--space-8); }
  .rail { margin: 0; padding: 0; background: transparent; inset-block-start: calc(var(--header-h) + var(--space-3)); }
  .stage { block-size: min(74svh, 46rem); }
  .summary--rail { display: grid; }
  .summary--end, .buybar { display: none; }
  .stems { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .stem-img { block-size: 11rem; }
}
@media (min-width: 82rem) { .stems { gap: var(--space-4); } }

/* ---------- ready-made ---------- */
.presets { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
@media (min-width: 34rem) { .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .preset--feature, .preset--cta { grid-column: 1 / -1; } }
.preset {
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-l); overflow: hidden; background: var(--color-surface);
  box-shadow: 0 1px 0 var(--color-border), 0 24px 44px -34px rgba(21, 36, 29, 0.55);
}
.preset-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: radial-gradient(85% 70% at 50% 38%, #fbf8f1 0%, #efe6d6 62%, #e3d6bf 100%);
}
.preset-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.preset:not(.preset--photo) .preset-media img { object-fit: contain; padding: 4% 3% 2%; }
.preset--photo .preset-media img { transition: transform 1.4s var(--ease-out); }
.preset--photo:hover .preset-media img { transform: scale(1.035); }
.tag {
  position: absolute; inset-block-start: var(--space-3); inset-inline-start: var(--space-3); padding: 0.4em 0.85em; border-radius: var(--radius-full);
  background: rgba(246, 242, 232, 0.92); color: var(--color-text-muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.preset-body { display: grid; gap: var(--space-2); padding: var(--space-5); align-content: start; }
.preset-body h3 { font-size: 1.75rem; }
.preset-body p { color: var(--color-text-muted); font-size: var(--text--1); line-height: 1.45; }
.preset-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-block-start: var(--space-3); flex-wrap: wrap; }
.preset-foot .price { font-family: var(--font-display); font-size: 2rem; font-weight: 400; }
.preset-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.preset--cta {
  position: relative; isolation: isolate; background: var(--color-green); color: var(--color-ivory); align-content: center; padding: var(--space-7) var(--space-6);
  grid-template-rows: none; gap: var(--space-4); justify-items: start;
}
.preset--cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../art/yarn-texture-800.webp") center / cover; opacity: 0.1; mix-blend-mode: luminosity; }
.preset--cta p { color: var(--color-on-dark); font-size: var(--text-0); max-inline-size: 26rem; }
.preset--cta h3 { font-size: var(--text-3); line-height: 1; font-weight: 300; }
.preset--cta .btn { background: var(--color-blush); color: var(--color-on-blush); inline-size: max-content; }
.preset--cta .line-art { block-size: 9rem; opacity: 0.55; position: absolute; inset-block-end: 0; inset-inline-end: var(--space-6); display: none; }
@media (min-width: 52rem) {
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  .preset--cta { grid-column: auto; }
  .preset--cta .line-art { display: block; }
  .preset--feature { grid-column: span 2; grid-template-columns: 1.15fr 1fr; grid-template-rows: none; }
  .preset--feature .preset-media { aspect-ratio: auto; min-block-size: 100%; background: radial-gradient(70% 70% at 50% 40%, #35644f 0%, #1f3d2f 55%, #14261e 100%); }
  .preset--feature .preset-media img { padding: 3% 8%; }
  .preset--feature .tag { background: rgba(246, 242, 232, 0.16); color: var(--color-ivory); }
  .preset--feature .preset-body { align-content: center; padding: var(--space-7); gap: var(--space-4); }
  .preset--feature h3 { font-size: var(--text-3); line-height: 1; font-weight: 300; }
  .preset--feature .preset-body p { font-size: var(--text-0); }
  .preset--feature .preset-foot .price { font-size: 2.8rem; }
}

/* ---------- gallery ---------- */
.section--gallery { position: relative; isolation: isolate; overflow: hidden; }
.section--gallery::before, .section--atelier::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../art/yarn-texture-800.webp") center / cover no-repeat; opacity: 0.08; mix-blend-mode: screen; filter: grayscale(1);
}
.mosaic { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.tile { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-l); aspect-ratio: 3 / 2; background: var(--color-surface-2); }
.tile--tall { aspect-ratio: 4 / 5; }
.tile img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.tile:hover img { transform: scale(1.035); }
.tile figcaption {
  position: absolute; inset-inline: 0; inset-block-end: 0; padding: var(--space-7) var(--space-5) var(--space-4); color: var(--color-ivory);
  font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1;
  background: linear-gradient(to top, rgba(8, 16, 12, 0.72), rgba(8, 16, 12, 0));
}
@media (min-width: 62rem) {
  .mosaic { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto; gap: var(--space-5); }
  .tile--tall { grid-row: 1 / span 2; aspect-ratio: auto; min-block-size: 100%; }
  .tile--wide { aspect-ratio: 16 / 9; }
}
.reel-head { margin-block: var(--space-8) var(--space-5); }
.reel-head h3 { font-size: var(--text-2); font-weight: 300; font-style: italic; }
.reel { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding-block-end: var(--space-4); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
.reel figure { flex: 0 0 auto; scroll-snap-align: start; }
.reel img { block-size: clamp(15rem, 34vw, 24rem); inline-size: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-m); }
.reel figure:nth-child(3n + 2) { padding-block-start: var(--space-6); }
.reel figure:nth-child(3n) { padding-block-start: var(--space-3); }

/* ---------- desk pots ---------- */
.pots { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
.pot { border-radius: var(--radius-l); background: var(--color-surface-2); overflow: hidden; display: grid; grid-template-rows: auto 1fr; box-shadow: 0 1px 0 var(--color-border); }
.pot-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(80% 70% at 50% 42%, var(--color-ivory) 0%, var(--color-paper) 100%); }
.pot-img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.pot:hover .pot-img { transform: scale(1.03); }
.pot-media model-viewer { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; --poster-color: transparent; background: radial-gradient(80% 70% at 50% 42%, var(--color-ivory) 0%, var(--color-paper) 100%); }
.pot-media .view-toggle { position: absolute; inset-block-end: var(--space-3); inset-inline-start: var(--space-3); z-index: 3; background: rgba(246, 242, 232, 0.92); }
.pot-media .ar-btn { position: absolute; inset-block-end: var(--space-3); inset-inline-end: var(--space-3); z-index: 3; }
.pot-body { display: grid; gap: var(--space-2); padding: var(--space-5); align-content: start; }
.pot-body h3 { font-size: 1.75rem; }
.pot-body p { color: var(--color-text-muted); }
.pot-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-block-start: var(--space-2); }
.pot-foot .price { font-family: var(--font-display); font-size: 2rem; font-weight: 400; }
.office {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: var(--space-4); margin-block-start: var(--space-7); padding: var(--space-6);
  border-radius: var(--radius-l); background: var(--color-green); color: var(--color-ivory);
}
.office::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../art/yarn-texture-800.webp") center / cover; opacity: 0.1; mix-blend-mode: luminosity; }
.office p { font-family: var(--font-display); font-size: var(--text-2); line-height: 1.15; max-inline-size: 32ch; font-weight: 300; }
.office .btn { background: var(--color-blush); color: var(--color-on-blush); inline-size: max-content; }
@media (min-width: 52rem) {
  .pots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
  .office { grid-template-columns: 1fr auto; align-items: center; padding: var(--space-7); }
}

/* ---------- keychains ---------- */
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); }
.key { display: flex; flex-direction: column; gap: var(--space-3); }
.key-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-l); overflow: hidden; background: var(--color-surface-3); }
.key-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.key:hover .key-media img { transform: scale(1.04); }
.key-media--colours {
  display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; justify-items: center; gap: 6% 0; padding: 12% 10%;
  background: linear-gradient(rgba(243, 217, 213, 0.72), rgba(243, 217, 213, 0.72)), url("../art/yarn-texture-800.webp") center / cover;
}
.key-media--colours i {
  inline-size: 86%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%), repeating-linear-gradient(38deg, rgba(0, 0, 0, 0.08) 0 2px, rgba(0, 0, 0, 0) 2px 5px), var(--c);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.16), 0 10px 18px -8px rgba(60, 20, 20, 0.45);
}
.key h3 { font-size: 1.55rem; }
.key-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-block-start: auto; }
.key-foot .price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; }
.key-line { color: var(--color-text-muted); font-size: var(--text--1); line-height: 1.4; }
.key-custom { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-2) var(--space-3); }
.key-custom select { min-block-size: 2.75rem; padding: 0 var(--space-3); border-radius: var(--radius-s); border: 1.5px solid var(--color-border-strong); background: var(--color-surface); inline-size: 100%; }
@media (min-width: 52rem) { .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); } }

/* ---------- atelier ---------- */
.section--atelier { position: relative; isolation: isolate; overflow: hidden; }
.atelier { display: grid; gap: var(--space-7); align-items: center; }
.atelier-photo { border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 1 / 1; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.atelier-photo img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.facts { display: grid; gap: var(--space-6); }
.facts p { font-family: var(--font-display); font-size: var(--text-2); line-height: 1.12; font-weight: 300; padding-block-end: var(--space-5); border-block-end: 1px solid var(--color-border); text-wrap: balance; }
.facts p:last-child { border: 0; padding: 0; }
@media (min-width: 62rem) { .atelier { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-9); } .atelier-photo { aspect-ratio: 4 / 3; } }

/* ---------- faq ---------- */
.faq-wrap { display: grid; gap: var(--space-6); }
.faq-wrap .section-head { position: relative; }
.faq-art { position: absolute; inset-block-start: 0; inset-inline-end: 0; block-size: 7rem; inline-size: auto; opacity: 0.85; }
.faq { display: grid; max-inline-size: 52rem; align-content: start; }
.faq details { border-block-end: 1px solid var(--color-border); }
.faq details:first-child { border-block-start: 1px solid var(--color-border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-5); font-family: var(--font-display); font-size: var(--text-2); line-height: 1.15; min-block-size: 3.5rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; inline-size: 1.1rem; block-size: 1.1rem; flex: none; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; transition: transform var(--dur-2) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding-block-end: var(--space-5); color: var(--color-text-muted); max-inline-size: 42rem; }
@media (min-width: 62rem) {
  .faq-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-9); align-items: start; }
  .faq-art { position: static; block-size: 22rem; margin-block-start: var(--space-6); }
}

/* ---------- footer ---------- */
.foot { padding-block: var(--space-8); background: var(--color-surface); color: var(--color-text); position: relative; overflow: hidden; }
.foot .wrap { display: grid; gap: var(--space-5); position: relative; }
.foot-main { display: grid; gap: var(--space-5); }
.foot .brand { font-size: 2.2rem; }
.foot p { max-inline-size: 38rem; color: var(--color-text-muted); }
.foot a:not(.brand) { text-decoration-color: var(--color-border-strong); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.foot nav a { padding-block: var(--space-2); }
.foot-art { position: absolute; inset-block-end: calc(var(--space-8) * -1); inset-inline-end: var(--gutter); block-size: 16rem; inline-size: auto; opacity: 0.5; display: none; }
@media (min-width: 62rem) { .foot-art { display: block; } }
.line-art { pointer-events: none; user-select: none; }
.line-art--ivory { filter: brightness(0) invert(1); }
.stage-art { block-size: 4.5rem; inline-size: auto; margin: 0 auto var(--space-2); opacity: 0.85; }

/* ---------- dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--color-text); background: var(--color-surface); max-inline-size: none; max-block-size: none; }
dialog::backdrop { background: rgba(15, 29, 23, 0.6); }
.drawer {
  position: fixed; inset: auto 0 0 0; margin: 0; inline-size: 100%; block-size: auto; max-block-size: 92dvh; border-radius: var(--radius-l) var(--radius-l) 0 0;
  overflow: hidden; display: none;
}
.drawer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: sheet-in var(--dur-2) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 40rem) {
  .drawer { inset: 0 0 0 auto; inline-size: min(30rem, 100vw); block-size: 100dvh; max-block-size: 100dvh; border-radius: var(--radius-l) 0 0 var(--radius-l); }
  @keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-block-end: 1px solid var(--color-border); }
.drawer-head h2 { font-size: var(--text-2); }
.drawer-body { overflow-y: auto; padding: var(--space-5); display: grid; gap: var(--space-5); align-content: start; overscroll-behavior: contain; }
.drawer-foot { padding: var(--space-4) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom)); border-block-start: 1px solid var(--color-border); display: grid; gap: var(--space-3); background: var(--color-surface-2); }
.bag-item { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); padding-block-end: var(--space-5); border-block-end: 1px solid var(--color-border); }
.bag-item h3 { font-size: 1.4rem; }
.bag-item p { grid-column: 1 / -1; font-size: var(--text--1); color: var(--color-text-muted); line-height: 1.4; }
.bag-item .item-actions { display: flex; align-items: center; gap: var(--space-3); grid-column: 1 / -1; justify-content: space-between; }
.bag-empty { text-align: center; padding-block: var(--space-7); display: grid; gap: var(--space-4); justify-items: center; color: var(--color-text-muted); }
.bag-empty strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-2); color: var(--color-text); }
.totals { display: grid; gap: var(--space-2); }
.totals div { display: flex; justify-content: space-between; gap: var(--space-4); }
.totals .grand { font-weight: 700; font-size: 1.15rem; padding-block-start: var(--space-2); border-block-start: 1px solid var(--color-border); }
.order-form { display: grid; gap: var(--space-4); }
.hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.success { display: grid; gap: var(--space-4); text-align: start; padding-block: var(--space-6); }
.success h3 { font-size: var(--text-3); line-height: 1; font-weight: 300; }
.form-error { color: var(--color-error); font-weight: 600; font-size: var(--text--1); }

.ar-dialog { inset: 0; margin: auto; inline-size: min(34rem, 94vw); max-block-size: calc(100dvh - 2 * var(--space-4)); border-radius: var(--radius-l); overflow: auto; overscroll-behavior: contain; }
.ar-dialog[open] { display: grid; animation: pop-in var(--dur-2) var(--ease-out); }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.ar-view { position: relative; block-size: min(32rem, 56dvh); background: radial-gradient(90% 80% at 50% 34%, var(--color-stage-1) 0%, var(--color-stage-2) 52%, var(--color-stage-3) 100%); }
.ar-view model-viewer { inline-size: 100%; block-size: 100%; --poster-color: transparent; background: transparent; }
.ar-panel { padding: var(--space-5); display: grid; gap: var(--space-4); }
.ar-panel h2 { font-size: var(--text-2); }
.qr { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: center; }
.qr svg { inline-size: 8.5rem; block-size: 8.5rem; background: #fff; padding: 8px; border-radius: var(--radius-s); }
.ar-close { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); z-index: 4; }
.ar-place { position: absolute; inset-inline: 0; inset-block-end: var(--space-4); margin-inline: auto; inline-size: max-content; z-index: 3; }

.toast {
  position: fixed; inset-inline: 0; inset-block-end: var(--space-5); margin-inline: auto; inline-size: max-content; max-inline-size: calc(100vw - 2rem); z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  background: var(--color-green-deep); color: var(--color-ivory); border-radius: var(--radius-full); animation: toast-in var(--dur-2) var(--ease-out);
}
.toast .btn { background: var(--color-blush); color: var(--color-on-blush); min-block-size: 2.75rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* sections that mark a quiet reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

#ar-host { position: absolute; inset: 0; }
.bag-empty .line-art { block-size: 9rem; inline-size: auto; opacity: 0.9; }
.success .line-art { block-size: 10rem; inline-size: auto; justify-self: start; }
.atelier .eyebrow { margin-block-end: var(--space-3); }
.top:not(.is-solid) :focus-visible { outline-color: var(--color-blush-soft); }
