/* ============================================================
   The Mellow Co. — Design System & Site Styles
   Premium, soft, nostalgic. Pale lilac paper, aubergine ink,
   lilac (Travel) and olive (Fairytale) accents.

   NOTE ON TOKEN NAMES: --terracotta and --sage kept their names
   through the moodboard repaint but NOT their values. They are
   now the two theme accents: --terracotta = lilac (Travel),
   --sage = olive (Fairytale). ~60 call sites depend on the old
   names, so the names stayed put deliberately.
   ============================================================ */

:root {
  /* ---- moodboard six — surfaces, tints and decoration only ---- */
  --lilac-pale: #F6E9FD;
  --butter:     #E2C582;
  --lilac:      #BB83DD;
  --olive:      #869353;
  --sage-pale:  #E4E7D8;
  --aubergine:  #46394C;

  /* ---- semantic surfaces ---- */
  --cream: #F6E9FD;
  --paper: #FDF9FF;
  --ink: #46394C;
  --ink-soft: #685D6F;
  --line: #E0D3EC;
  --line-strong: #8F71A8;   /* form-input borders — needs 3:1 */

  /* ---- accent A · Travel (lilac, deepened so white text clears AA) ---- */
  --terracotta: #7C4C9E;
  --terracotta-dark: #653E82;
  --terracotta-soft: #EBD9F7;

  /* ---- accent B · Fairytale (olive, deepened so white text clears AA) ---- */
  --sage: #596237;
  --sage-dark: #4B522E;
  --sage-soft: #E4E7D8;

  /* ---- butter: a fill at full strength, a deep shade when it is text ---- */
  --gold: #E2C582;
  --gold-deep: #7E5F17;

  /* ---- channel tokens, so rgba() sites stay token-driven ---- */
  --ink-rgb: 70, 57, 76;
  --cream-rgb: 246, 233, 253;
  --paper-rgb: 253, 249, 255;
  --scrim-rgb: 40, 31, 45;
  --book-paper-rgb: 251, 246, 254;

  /* ---- book neutrals ---- */
  --book-paper: #FBF6FE;
  --endpaper: #F1E7F8;
  --polaroid: #FFFFFF;

  --on-accent: #FFFFFF;

  --shadow-soft: 0 10px 30px rgba(var(--ink-rgb), 0.10);
  --shadow-card: 0 4px 14px rgba(var(--ink-rgb), 0.12);
  --shadow-btn: 0 6px 16px rgba(var(--ink-rgb), 0.28);
  --radius: 14px;
  --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  /* ---- motion: one curve family, mirrored for reversals ----
     --ease-out settles like a critically damped spring (enter, release).
     --ease-in is its mirror (exit), so a thing leaves the way it came. */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.8, 0, 0.8, 0.2);
  --ease-both: cubic-bezier(0.45, 0, 0.15, 1);
  --t-press: 70ms;   /* pointer-down feedback — instant */
  --t-fast: 180ms;   /* release, hover */
  --t-base: 320ms;   /* small surfaces arriving */
  --t-slow: 480ms;   /* large surfaces arriving */

  /* ---- materials: floating chrome is translucent glass ---- */
  --glass-bg: rgba(var(--paper-rgb), 0.72);
  --glass-blur: blur(20px) saturate(180%);
  --glass-edge: rgba(255, 255, 255, 0.55);
  --header-h: 76px; /* measured at runtime by store.js */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Display type changes shape with size: tracking tightens and leading
   closes up as it grows, body stays near neutral. Bodoni Moda carries an
   optical-size axis, so let the browser pick the right master. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-optical-sizing: auto;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.012em; }
h3 { font-size: 1.3rem; letter-spacing: -0.004em; }

p { margin: 0 0 1em; }

a { color: inherit; }

/* No 300ms tap delay on anything pressable */
a, button, summary, label, [role="button"], input[type="range"] { touch-action: manipulation; }

img { max-width: 100%; display: block; }

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.8rem;
}

.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0; }
.section-head { max-width: 620px; margin: 0 auto 2.6rem; text-align: center; }
.section-head p { color: var(--ink-soft); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
/* the press lands instantly and lets go softly */
.btn:active { transform: scale(0.97); transition-duration: var(--t-press); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--terracotta);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--terracotta-dark); }

.btn--sage {
  background: var(--sage);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}
.btn--sage:hover { background: var(--sage-dark); }

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

.btn--small { padding: 0.55rem 1.3rem; font-size: 0.85rem; }
.btn--block { display: block; width: 100%; }

/* ---------- Announcement bar + Header ---------- */

.announce {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 0.5rem 0;
}

/* The track holds two identical message groups laid out in a single
   nowrap row; translating it -50% scrolls exactly one group, so the
   loop is seamless. Each item carries its own right margin so the two
   groups tile perfectly. */
.announce__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  animation: announce-scroll 38s linear infinite;
  will-change: transform;
}
.announce:hover .announce__track { animation-play-state: paused; }

.announce__item {
  flex: none;
  margin-right: 2.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.announce__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-right: 2.5rem;
  border-radius: 5px;
  object-fit: cover;
}

@keyframes announce-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .announce__track { animation: none; }
}

/* The announcement strip scrolls away; the nav row stays as a floating
   glass layer with content passing underneath. store.js measures the
   strip and sets --announce-h so the negative top offset is exact. */
.site-header {
  position: sticky;
  top: calc(-1 * var(--announce-h, 38px));
  z-index: 60;
}
/* the glass lives on a pseudo-element: a backdrop-filter on the header
   itself would become the containing block for the fixed mobile nav */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
/* with the overlay nav open the header must sit above every other bar */
.site-header:has(.site-nav.is-open) { z-index: 95; }
/* scroll edge: a soft shadow that only exists once content is under it */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 14px;
  pointer-events: none;
  background: linear-gradient(rgba(var(--ink-rgb), 0.08), transparent);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
body.is-scrolled .site-header::after { opacity: 1; }
.site-header__inner { border-top: 1px solid var(--glass-edge); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0;
}

/* The wordmark is the real artwork, painted through an alpha mask so a
   single PNG can be aubergine in the header and pale lilac in the footer.
   The accessible name comes from .logo__text — real text, so it survives
   a failed asset load and doubles as the no-mask fallback. */
.logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}
/* The source artwork is the stacked wordmark inside its rounded-square
   frame, so it is nearly as tall as it is wide. Kept small enough that the
   sticky header row stays close to its original height. */
.logo__mark {
  display: block;
  width: 58px;
  aspect-ratio: 568 / 700;
  background-color: var(--ink);
  -webkit-mask: url("../brand/logo-wordmark.png") center / contain no-repeat;
          mask: url("../brand/logo-wordmark.png") center / contain no-repeat;
}
/* the footer is a brand block, not a nav row, so the mark can breathe */
.site-footer .logo__mark {
  background-color: var(--cream);
  width: 92px;
  margin-bottom: 0.9rem;
}

.logo__text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@supports not ((mask-image: url(x)) or (-webkit-mask-image: url(x))) {
  .logo__mark { display: none; }
  .logo__text {
    position: static;
    width: auto; height: auto;
    clip-path: none;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
  }
}

/* Floral monogram. NOTE: unlike the wordmark, this PNG is NOT fully
   transparent — the swash bowls are filled opaque white — so it cannot be
   used as an alpha mask (it would paint as a solid blob). Blend modes drop
   the ground out instead: multiply erases white on light surfaces, and
   invert+screen erases black on dark ones. */
.monogram {
  display: block;
  aspect-ratio: 851 / 917;
  background: url("../brand/monogram.png") center / contain no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.monogram--on-dark {
  filter: invert(1);
  mix-blend-mode: screen;
}

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:active { color: var(--ink); opacity: 0.6; transition-duration: var(--t-press); }
.site-nav a.is-active { color: var(--ink); border-bottom-color: var(--terracotta); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
}
.cart-link svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: -9px;
  right: -13px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-badge.is-empty { display: none; }
.cart-badge.is-bumping { animation: badge-pop 420ms var(--ease-out); }
@keyframes badge-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.cart-link:active svg { transform: scale(0.9); }
.cart-link svg { transition: transform var(--t-press) var(--ease-out); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* hamburger — hidden on desktop, opens a full-screen overlay nav on mobile */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 96;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2.5px;
  margin: 4.5px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease-both), opacity var(--t-fast) var(--ease-both);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav__cart { display: none; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 4.5rem;
}
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 30rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transform: rotate(1.5deg);
}
.hero__sticker {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 800;
  transform: rotate(-2deg);
}
.hero__sticker em { display: block; font-style: normal; color: var(--terracotta); font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
}
.step img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.1rem;
}
.step__num {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--terracotta-soft);
  color: var(--terracotta-dark);
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Product cards ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.8rem;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}
.product-card:active {
  transform: translateY(-2px) scale(0.985);
  transition-duration: var(--t-press);
}
.product-card__media { position: relative; overflow: hidden; }
.product-card__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--on-accent);
}
.badge--sage { background: var(--sage); }
.badge--gold { background: var(--gold); color: var(--ink); }

.product-card__body { padding: 1.2rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.product-card__body h3 { margin-bottom: 0.25rem; }
.product-card__desc { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.product-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
.price { font-weight: 800; font-size: 1.1rem; }
.price small { color: var(--ink-soft); font-weight: 600; }

/* ---------- Big theme cards (home) ---------- */

.theme-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}
.theme-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.theme-card:active { transform: scale(0.985); transition-duration: var(--t-press); }
.theme-card img {
  width: 100%;
  /* square, like the album itself */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}
.theme-card:hover img { transform: scale(1.05); }
.theme-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1.6rem 1.6rem;
  background: linear-gradient(transparent, rgba(var(--scrim-rgb), 0.78));
  color: var(--on-accent);
}
.theme-card__overlay h3 { color: var(--on-accent); font-size: 1.6rem; margin-bottom: 0.2rem; }
.theme-card__overlay p { margin: 0 0 0.9rem; opacity: 0.85; font-size: 0.95rem; }

/* ---------- Testimonials ---------- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.testimonial {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.testimonial blockquote {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
}
.testimonial__who { display: flex; align-items: center; gap: 0.8rem; }
.testimonial__who img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial__who strong { display: block; font-size: 0.92rem; }
.testimonial__who span { font-size: 0.8rem; color: var(--ink-soft); }
.stars { color: var(--gold-deep); letter-spacing: 2px; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* ---------- Editorial split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split img {
  width: 100%;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.split p { color: var(--ink-soft); }

/* ---------- PDP ---------- */

.pdp {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.2rem;
  padding: 3rem 0 4rem;
}
.pdp__gallery-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.pdp__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 0.9rem;
}
.pdp__thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.pdp__thumbs img.is-active,
.pdp__thumbs img:hover { border-color: var(--terracotta); }
.pdp__thumbs img:active { transform: scale(0.94); transition-duration: var(--t-press); }
.pdp__gallery-main img.is-swapping { opacity: 0; }
.pdp__gallery-main img { transition: opacity var(--t-fast) var(--ease-out); }

.pdp__info .price { font-size: 1.5rem; display: block; margin: 0.6rem 0 1.2rem; }
.pdp__info > p { color: var(--ink-soft); }

.pdp__features {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
  display: grid;
  gap: 0.5rem;
}
.pdp__features li { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.95rem; }
.pdp__features li::before { content: "✦"; color: var(--terracotta); font-size: 0.8rem; }

.accordion { border-top: 1px solid var(--line); margin-top: 1.8rem; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer;
  font-weight: 800;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* the "+" rotates into a "×" — same glyph both ways, so open and close
   are one reversible motion instead of two different characters */
.accordion summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--terracotta);
  transition: transform var(--t-base) var(--ease-both);
}
.accordion summary:active { opacity: 0.6; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details p { color: var(--ink-soft); font-size: 0.95rem; padding-bottom: 1rem; margin: 0; }
/* height animation where the platform supports it; instant elsewhere */
@supports (interpolate-size: allow-keywords) {
  .accordion details { interpolate-size: allow-keywords; }
  .accordion details::details-content {
    height: 0;
    overflow: clip;
    transition: height var(--t-base) var(--ease-out), content-visibility var(--t-base) allow-discrete;
  }
  .accordion details[open]::details-content { height: auto; }
}

/* sticky add-to-cart bar, mobile only */
.pdp-mobile-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-edge);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  gap: 1rem;
  align-items: center;
  box-shadow: 0 -6px 18px rgba(var(--ink-rgb), 0.1);
}
.pdp-mobile-bar .price { font-size: 1.05rem; white-space: nowrap; }
.pdp-mobile-bar .btn { flex: 1; }

/* ---------- Builder ---------- */

.builder-topbar {
  position: sticky;
  top: var(--header-h);
  z-index: 59;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-edge);
  padding: 0.8rem 0;
}
.builder-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.builder-progress { flex: 1; min-width: 220px; }
.builder-progress__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.builder-progress__track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.builder-progress__fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-slow) var(--ease-out);
}
.builder--fairytale .builder-progress__fill { background: var(--sage); }

.builder-stage { padding: 2.4rem 0 1rem; }

/* ---------- The book ---------- */

.book-scene {
  perspective: 2800px;
  display: flex;
  justify-content: center;
  padding-bottom: 1.6rem;
}

.book {
  position: relative;
  width: min(1020px, 96vw);
  /* two square pages side by side — the album is 21 × 21 cm */
  aspect-ratio: 2 / 1;
  transform-style: preserve-3d;
  /* horizontal drags turn pages; vertical still scrolls the page */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* soft desk shadow under the book */
.book::after {
  content: "";
  position: absolute;
  left: 6%; right: 6%; bottom: -24px;
  height: 34px;
  background: radial-gradient(ellipse at center, rgba(var(--ink-rgb), 0.3), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}

/* A leaf is one physical sheet: front face = right-hand page,
   back face = the left-hand page you see after turning it. */
.leaf {
  position: absolute;
  top: 0; left: 50%;
  width: 50%; height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  /* builder.js springs the rotation from wherever the leaf currently is,
     so a turn can be grabbed and reversed mid-flight — no CSS transition */
}
.leaf.is-turned { transform: rotateY(-180deg); }
.leaf.is-live { will-change: transform; }

.leaf__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 0 10px 10px 0;
  background: var(--book-paper);
  box-shadow: 0 2px 10px rgba(var(--ink-rgb), 0.14);
}
.leaf__face--back {
  transform: rotateY(180deg);
  border-radius: 10px 0 0 10px;
}

/* ---------- Album pages ---------- */

/* Each page is one half of a two-page spread image. The numbered photo
   squares are a second layer drawn with the same size/position so they
   stay registered on the art; builder.js sets both custom properties. */
.page {
  position: absolute;
  inset: 0;
  background-color: var(--book-paper);
  background-size: 200% 100%;
  background-repeat: no-repeat;
}
.page--half-left  { background-position: left center; }
.page--half-right { background-position: right center; }

/* spine shading for depth */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.page--right::before {
  background: linear-gradient(90deg, rgba(var(--ink-rgb), 0.16), rgba(var(--ink-rgb), 0.04) 9%, transparent 16%);
}
.page--left::before {
  background: linear-gradient(270deg, rgba(var(--ink-rgb), 0.16), rgba(var(--ink-rgb), 0.04) 9%, transparent 16%);
}

.page__num {
  position: absolute;
  bottom: 3%;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  z-index: 2;
  opacity: 0.75;
}
.page--right .page__num { right: 5.5%; }
.page--left .page__num { left: 5.5%; }

/* clickable folded corner that turns the page */
.page__corner {
  position: absolute;
  bottom: 0;
  width: 58px; height: 58px;
  cursor: pointer;
  z-index: 3;
}
.page--right .page__corner { right: 0; }
.page--left .page__corner { left: 0; }
.page__corner::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out);
}
.book.is-dragging { cursor: grabbing; }
.page--right .page__corner::after {
  background: linear-gradient(315deg, rgba(var(--ink-rgb), 0.18) 50%, transparent 50%);
  border-radius: 0 0 10px 0;
}
.page--left .page__corner::after {
  background: linear-gradient(45deg, rgba(var(--ink-rgb), 0.18) 50%, transparent 50%);
  border-radius: 0 0 0 10px;
}
.page__corner:hover::after { opacity: 1; }

/* corner variants for the single-page (mobile) book */
.page__corner--r { right: 0; }
.page__corner--l { left: 0; }
.page__corner--r::after {
  background: linear-gradient(315deg, rgba(var(--ink-rgb), 0.18) 50%, transparent 50%);
  border-radius: 0 0 10px 0;
}
.page__corner--l::after {
  background: linear-gradient(45deg, rgba(var(--ink-rgb), 0.18) 50%, transparent 50%);
  border-radius: 0 0 0 10px;
}
.page--single .page__num { left: 50%; transform: translateX(-50%); }

/* ---------- Single-page book (mobile builder) ---------- */

.pageflow {
  position: relative;
  width: min(480px, 94vw);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  perspective: 1600px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* the current card plus its two neighbours ride on one translate;
   builder.js sets --x in px so the finger and the page move together */
.pageflow__card {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--book-paper);
  box-shadow: var(--shadow-soft);
  transform: translateX(var(--x, 0px));
  will-change: transform;
}
/* corners stay faintly visible on touch screens — no hover there */
.pageflow .page__corner::after { opacity: 0.45; }

/* ---------- Cover & endpaper ---------- */

.cover {
  position: absolute;
  inset: 0;
  background: var(--ink);
  cursor: pointer;
}
.cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.94;
}
/* the outside-cover scan: one image, front on the right, back on the left */
.cover--art {
  background-size: 200% 100%;
  background-repeat: no-repeat;
}
.cover--art.page--half-left  { background-position: left center; }
.cover--art.page--half-right { background-position: right center; }
.cover__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.6rem 1.4rem 1.5rem;
  text-align: center;
  background: linear-gradient(transparent, rgba(var(--scrim-rgb), 0.85));
  color: var(--on-accent);
}
.cover__label span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}
.cover__label h2 { color: var(--on-accent); margin: 0.25rem 0 0.3rem; font-size: 1.7rem; }
.cover__label em { font-size: 0.82rem; opacity: 0.75; }

.endpaper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: var(--endpaper);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  cursor: pointer;
}
.endpaper__mark { width: 30%; opacity: 0.6; }
.endpaper p { margin: 0; font-size: 0.95rem; }

/* ---------- Photo slots ---------- */

/* A slot sits exactly over its printed square (left/top/width/height are
   set inline by builder.js as percentages of the page), so the empty
   state is just a faint outline on top of the printed white square. */
.photo-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  z-index: 3;
  border-radius: 2.5%;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.photo-slot:hover {
  transform: scale(1.03);
  box-shadow: 0 9px 20px rgba(var(--ink-rgb), 0.22);
  z-index: 4;
}
.photo-slot:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(var(--ink-rgb), 0.16);
  transition-duration: var(--t-press);
}
.photo-slot.is-filled { box-shadow: 0 3px 10px rgba(var(--ink-rgb), 0.18); }
.photo-slot__remove:active, .photo-slot__edit:active { transform: scale(0.88); }
.photo-slot__remove, .photo-slot__edit { transition: transform var(--t-press) var(--ease-out), background var(--t-fast); }
/* a freshly placed photo settles into its frame */
.photo-slot.is-placed .photo-slot__frame img { animation: photo-place var(--t-slow) var(--ease-out); }
@keyframes photo-place {
  from { transform: scale(1.06); opacity: 0.4; }
  to   { transform: scale(1); opacity: 1; }
}

.photo-slot__frame {
  flex: 1;
  min-height: 0;
  border-radius: 2.5%;
  background: transparent;
  border: 2px dashed rgba(var(--ink-rgb), 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem;
  overflow: hidden;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.photo-slot:hover .photo-slot__frame { background: rgba(255, 255, 255, 0.35); border-color: var(--ink); }
.photo-slot__frame svg { width: 20px; height: 20px; opacity: 0.55; }
.photo-slot.is-filled .photo-slot__frame { border: none; padding: 0; }
.photo-slot.is-filled .photo-slot__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.photo-slot__remove {
  position: absolute;
  top: -9px; right: -9px;
  width: 23px; height: 23px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  z-index: 5;
}
.photo-slot.is-filled .photo-slot__remove { display: flex; }
.photo-slot__remove:hover { background: var(--terracotta-dark); }

.photo-slot__edit {
  position: absolute;
  top: -9px; left: -9px;
  width: 23px; height: 23px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  z-index: 5;
}
.photo-slot.is-filled .photo-slot__edit { display: flex; }
.photo-slot__edit:hover { background: var(--cream); }

/* ---------- Crop modal ---------- */

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(var(--scrim-rgb), 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.crop-modal[hidden] { display: none; }
.crop-modal.is-open { opacity: 1; }

/* the panel arrives as a material: scale and blur resolve together,
   from the photo slot's direction (below, since the book sits above it) */
.crop-modal__panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  width: min(440px, 96vw);
  box-shadow: 0 24px 60px rgba(var(--ink-rgb), 0.28);
  text-align: center;
  transform: translateY(12px) scale(0.96);
  filter: blur(6px);
  transition: transform var(--t-slow) var(--ease-out), filter var(--t-base) var(--ease-out);
}
.crop-modal.is-open .crop-modal__panel { transform: none; filter: none; }
.crop-modal.is-closing { transition-timing-function: var(--ease-in); transition-duration: var(--t-fast); }
.crop-modal.is-closing .crop-modal__panel {
  transform: translateY(12px) scale(0.96);
  filter: blur(6px);
  transition-timing-function: var(--ease-in);
  transition-duration: var(--t-fast);
}
.crop-modal__panel h3 { margin-bottom: 1rem; }

.crop-viewport {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream);
  touch-action: none;
  cursor: grab;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img { will-change: transform; }
.crop-viewport img {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.crop-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  pointer-events: none;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.1rem auto 1.2rem;
  max-width: 300px;
}
.crop-zoom span { font-weight: 800; color: var(--ink-soft); font-size: 1.1rem; }
.crop-zoom input { flex: 1; accent-color: var(--terracotta); }

.crop-actions { display: flex; gap: 0.8rem; justify-content: center; }

.crop-hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
}

/* ---------- Bulk fast flow ---------- */

.crop-modal__panel--wide { width: min(600px, 96vw); }

.bulk-modal .builder-progress__track { margin: 0.4rem 0 0.8rem; }
.bulk-progress__label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin: 0.2rem 0 0.5rem;
}

.bulk-review__intro {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.2rem 0 0.7rem;
}
.bulk-review {
  max-height: min(46vh, 420px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  padding-right: 4px;
  text-align: left;
}
.bulk-review__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.bulk-review__art {
  position: relative;
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 8px;
  background-size: 200% 100%;
  box-shadow: var(--shadow-card);
}
.bulk-review__art--left { background-position: left center; }
.bulk-review__art--right { background-position: right center; }
.bulk-review__art span {
  position: absolute;
  right: -6px; bottom: -6px;
  min-width: 19px; height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bulk-review__photos,
.bulk-review__tray {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.bulk-review__tray { margin-bottom: 0.9rem; opacity: 0.85; }
.bulk-review__photos img,
.bulk-review__tray img {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
}

.bulk-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  font-size: 0.85rem;
  font-weight: 700;
}
.bulk-banner__close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
}
.bulk-banner__close:hover { color: var(--ink); }

.builder-stage.is-dropping {
  outline: 2px dashed var(--terracotta);
  outline-offset: -10px;
  border-radius: var(--radius);
}
.builder--fairytale .builder-stage.is-dropping { outline-color: var(--sage); }

/* ---------- Swap mode ---------- */

.photo-slot__swap {
  position: absolute;
  bottom: -9px; left: -9px;
  width: 23px; height: 23px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.7rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  z-index: 5;
  transition: transform var(--t-press) var(--ease-out), background var(--t-fast);
}
.photo-slot.is-filled .photo-slot__swap { display: flex; }
.photo-slot__swap:hover { background: var(--cream); }
.photo-slot__swap:active { transform: scale(0.88); }

.photo-slot.is-swapping {
  z-index: 6;
  animation: swap-pulse 1.2s var(--ease-out) infinite;
}
@keyframes swap-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--ink-rgb), 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(var(--ink-rgb), 0.25); }
}

.swap-hint {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.55rem 0.7rem 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-in), transform var(--t-fast) var(--ease-in);
  z-index: 100;
}
.swap-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.swap-hint .btn--ghost { color: var(--cream); border-color: rgba(255, 255, 255, 0.5); }
.swap-hint .btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .photo-slot.is-swapping {
    animation: none;
    box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.45);
  }
  .swap-hint { transform: translateX(-50%) !important; }
}

.builder-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.6rem 0 3rem;
}
.builder-nav__arrow {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.builder-nav__arrow:hover:not(:disabled) { background: var(--ink); color: var(--cream); }
.builder-nav__arrow:active:not(:disabled) { transform: scale(0.92); transition-duration: var(--t-press); }
.builder-nav__arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.builder-dots { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.builder-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.builder-dot:hover { transform: scale(1.3); }
.builder-dot:active { transform: scale(1.1); transition-duration: var(--t-press); }
.builder-dot.is-active { background: var(--terracotta); transform: scale(1.3); }
.builder-dot.is-complete { background: var(--sage); }
.builder--fairytale .builder-dot.is-active { background: var(--sage-dark); }

/* mobile replaces the dots with a position label */
.builder-pos {
  display: none;
  font-weight: 800;
  font-size: 0.92rem;
  min-width: 120px;
  text-align: center;
}

/* ---------- Sticker packs page ---------- */

.stickers-hero {
  text-align: center;
  padding: 3.5rem 0 1rem;
}
.stickers-hero p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; }

/* ---------- Cart ---------- */

.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0 4rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.cart-item img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 10px;
}
.cart-item h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.cart-item__meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.cart-item__meta.is-complete { color: var(--sage-dark); font-weight: 700; }
.cart-item__actions { text-align: right; }
.cart-item__actions .price { display: block; margin-bottom: 0.4rem; }

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}
.qty-control button {
  border: none; background: none;
  font-size: 1rem; font-weight: 800;
  cursor: pointer; color: var(--ink);
  width: 22px;
  border-radius: 50%;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.qty-control button:active { transform: scale(0.85); background: var(--line); transition-duration: var(--t-press); }
.qty-control span { font-weight: 800; min-width: 18px; text-align: center; }

.link-btn {
  background: none; border: none;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--terracotta-dark); }

.summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: sticky;
  top: 90px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 0.4rem 0;
}
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.6rem;
  padding-top: 0.9rem;
  font-weight: 800;
  font-size: 1.15rem;
}
.summary-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.9rem; text-align: center; }

/* the monogram sits above the copy as an ornament, not behind it —
   line art under a headline reads as a rendering fault */
.empty-state {
  position: relative;
  text-align: center;
  padding: 1.5rem 0 4.5rem;
}
.empty-state::before {
  content: "";
  display: block;
  width: 132px;
  aspect-ratio: 851 / 917;
  margin: 0 auto 1.4rem;
  background: url("../brand/monogram.png") center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.42;
  pointer-events: none;
}
.empty-state p { color: var(--ink-soft); }

/* ---------- Checkout ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0 4rem;
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.4rem;
}
.form-card h3 { margin-bottom: 1.1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.field input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.field input:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
  border-color: transparent;
}

.mock-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--terracotta-soft);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-top: 0.9rem;
}

/* ---------- Order confirmation ---------- */

.confirmation {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 4.5rem 0;
}
.confirmation__check {
  width: 72px; height: 72px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirmation .order-number {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--terracotta-dark);
  font-weight: 700;
}
.confirmation p { color: var(--ink-soft); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 4rem 0;
  border-radius: var(--radius);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -3% -22% auto;
  width: 300px;
  aspect-ratio: 851 / 917;
  background: url("../brand/monogram.png") center / contain no-repeat;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.22;
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--cream); }
.cta-band p { color: rgba(var(--cream-rgb), 0.75); max-width: 480px; margin: 0 auto 1.6rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(var(--cream-rgb), 0.8);
  margin-top: 4rem;
  padding: 3.5rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.15);
}
.site-footer h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--cream); }

.newsletter { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.newsletter input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--cream-rgb), 0.55);
  background: transparent;
  color: var(--cream);
  font-family: var(--font-body);
}
.newsletter input::placeholder { color: rgba(var(--cream-rgb), 0.72); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(var(--cream-rgb), 0.5);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--cream);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  /* exit: mirrored curve, shorter — it leaves the way it came */
  transition: opacity var(--t-fast) var(--ease-in), transform var(--t-fast) var(--ease-in);
  z-index: 100;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

/* ---------- Page banner ---------- */

.page-banner {
  text-align: center;
  padding: 3.2rem 0 0.5rem;
}
.page-banner p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero,
  .split,
  .pdp,
  .cart-layout,
  .checkout-layout { grid-template-columns: 1fr; }
  .theme-cards { grid-template-columns: 1fr; }
  .steps, .testimonials { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .summary-card { position: static; }
  .hero { padding-top: 2.5rem; gap: 2.2rem; }
}

/* builder switches to the single-page book; PDP gets the sticky buy bar */
@media (max-width: 700px) {
  .builder-dots { display: none; }
  .builder-pos { display: block; }
  .pdp-mobile-bar { display: flex; }
  body.single-product main { padding-bottom: 92px; }
  .section { padding: 3.2rem 0; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }

  /* full-screen overlay navigation */
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.9rem;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    background: rgba(var(--cream-rgb), 0.9);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    transform: scale(0.98);
    transform-origin: top right; /* it grows out of the button that opened it */
    transition: opacity var(--t-fast) var(--ease-in), transform var(--t-fast) var(--ease-in);
  }
  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-slow) var(--ease-out);
  }
  .site-nav a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--ink);
    border-bottom: none;
  }
  .site-nav__cart { display: block; }
  .logo { font-size: 1.25rem; }

  /* chunky full-width CTAs */
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; }

  /* 16px inputs stop iOS zoom-on-focus; bigger touch targets */
  .field input { font-size: 1rem; }
  .qty-control button { width: 32px; height: 32px; }
  .photo-slot__remove { width: 27px; height: 27px; }
  .photo-slot__edit { width: 27px; height: 27px; }
  .photo-slot__swap { width: 27px; height: 27px; }

  /* keep the swap hint clear of the thumb zone */
  .swap-hint { bottom: 96px; }

  .builder-topbar .btn { padding: 0.6rem 1.1rem; font-size: 0.82rem; }
  .cover__label h2 { font-size: 1.3rem; }
  .page__corner { width: 48px; height: 48px; }

  .form-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item__actions { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; justify-content: space-between; }

  /* keep the toast clear of the sticky buy bar */
  .toast { bottom: 96px; }
}

/* ---------- Reduced motion, transparency, contrast ----------
   Reduced motion is not no feedback: everything keeps its opacity and
   colour change, loses its travel, blur and overshoot. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  /* opacity-only cross-fades keep their (short) duration */
  .toast, .site-nav, .crop-modal, .pdp__gallery-main img, .site-header::after {
    transition: opacity 160ms ease !important;
    transform: none !important;
  }
  .toast { transform: translateX(-50%) !important; }
  .crop-modal__panel { transform: none !important; filter: none !important; }
  .btn:hover, .product-card:hover, .theme-card:active, .product-card:active { transform: none; }
  .photo-slot.is-placed .photo-slot__frame img { animation: none; }
  .cart-badge.is-bumping { animation: none; }
  .pageflow__card { will-change: auto; }
}

@media (prefers-reduced-transparency: reduce) {
  :root { --glass-bg: var(--paper); --glass-blur: none; }
  .site-header::before, .builder-topbar, .pdp-mobile-bar { border-bottom: 1px solid var(--line); }
  .site-nav { background: var(--cream) !important; backdrop-filter: none !important; }
  .crop-modal { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --glass-bg: var(--paper); --glass-blur: none; --line: #B9A5CB; }
  .site-header::before { border-bottom: 1px solid var(--ink); }
  .builder-topbar, .pdp-mobile-bar { border-color: var(--ink); }
  .btn--ghost { border-width: 2px; }
}
