/* ==========================================================================
   Concept Two — Modern Bookbinder
   An editorial platform whose grid is a book spread: recto/verso around a
   gutter, folio rules, photographs captioned like plates in a monograph.
   Ivory field, navy ink, burnt orange only as the signature accent.
   ========================================================================== */

:root {
  --ink: #062239;
  --ivory: #F7F4EE;
  --ivory-deep: #EFEAE0;
  --accent: #B33D19;
  --olive: #49662D;
  --muted: #5A6470;
  --hairline: rgba(6, 34, 57, .22);
  --content: 78rem;
  --measure: 44rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--ivory);
}

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

h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .55em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; letter-spacing: -.005em; }
h4 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .3em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: var(--ivory); padding: .7rem 1.2rem; font-weight: 600; }
.skip-link:focus { left: .5rem; top: .5rem; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.lede { font-size: 1.18rem; line-height: 1.6; }
.fine-print { font-size: .85rem; color: var(--muted); }
.measure { max-width: var(--measure); margin-inline: auto; }
.measure-tight { max-width: 36rem; }
.center { text-align: center; }
.ph-note { color: var(--accent); font-style: italic; font-size: .92rem; }
.req { font-size: .72rem; color: var(--accent); font-weight: 600; margin-left: .3rem; }
.opt { font-size: .72rem; color: var(--muted); font-weight: 500; margin-left: .3rem; }

/* ------------------------------------------------------------ masthead */
.masthead { background: var(--ivory); border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 50; }
.masthead-inner { max-width: var(--content); margin: 0 auto; padding: .7rem 1.4rem; display: flex; align-items: center; gap: 1rem; }
.brand img { width: 104px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: .1rem; margin: 0; padding: 0; align-items: center; }
.site-nav a, .site-nav button {
  font: inherit; font-size: .92rem; font-weight: 500; color: var(--ink);
  background: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-block; vertical-align: middle; line-height: 1.5;
  padding: .45rem .65rem;
}
.site-nav a:hover, .site-nav button:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.has-sub { position: relative; }
.has-sub > button::after { content: " ▾"; font-size: .7em; }
.has-sub > ul {
  position: absolute; top: 100%; right: 0; min-width: 14rem;
  background: var(--ivory); border: 1px solid var(--hairline); border-top: 2px solid var(--accent);
  box-shadow: 0 14px 30px rgba(6, 34, 57, .12);
  list-style: none; margin: 0; padding: .4rem; flex-direction: column; align-items: stretch; display: flex;
}
.has-sub > ul a { display: block; }
.nav-cta {
  margin-left: .6rem; border: 1.5px solid var(--ink) !important; padding: .45rem 1.1rem !important;
  font-weight: 600 !important; border-radius: 999px;
}
.nav-cta:hover { background: var(--ink); color: var(--ivory) !important; }
.nav-toggle { display: none; }
@media (max-width: 1020px) {
  .nav-toggle {
    display: block; margin-left: auto; font: inherit; font-weight: 600;
    background: none; border: 1.5px solid var(--ink); border-radius: 999px;
    padding: .4rem 1rem; cursor: pointer; color: var(--ink);
  }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .masthead-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding-bottom: .8rem; }
  .has-sub > ul { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--accent); margin-left: 1rem; }
  .nav-cta { margin-left: 0; display: inline-block; text-align: center; }
}

/* --------------------------------------------------------------- folio */
.chapter { max-width: var(--content); margin: 0 auto; padding: clamp(2.6rem, 6vw, 4.6rem) 1.4rem; }
.folio-rule {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--hairline);
  padding-top: .5rem; margin-bottom: clamp(1.8rem, 4vw, 3rem);
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  transform-origin: left center;
}
.folio-num { color: var(--accent); font-weight: 700; }
.chapter-title { margin-bottom: 1.6rem; }
.page-opening { padding-top: clamp(3rem, 7vw, 5.5rem); }

@media (prefers-reduced-motion: no-preference) {
  .folio-rule { animation: rule-draw .9s ease both; }
  @keyframes rule-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* -------------------------------------------------------------- spread */
.spread {
  max-width: var(--content); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.6rem, 6vw, 4.6rem) 1.4rem;
  position: relative; align-items: center;
}
.spread::before {
  /* the gutter: a soft fold shadow down the center of the spread */
  content: ""; position: absolute; top: 8%; bottom: 8%; left: 50%; width: 1px;
  background: linear-gradient(rgba(6,34,57,0), var(--hairline) 20% 80%, rgba(6,34,57,0));
}
.hero-spread { padding-top: clamp(3rem, 8vw, 6rem); align-items: center; }
.hero-spread h1 { margin-bottom: .4em; }
@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; }
  .spread::before { display: none; }
}

/* --------------------------------------------------------------- plates */
.plate { margin: 0; }
.plate img { width: 100%; }
.plate figcaption {
  border-top: 1px solid var(--hairline);
  margin-top: .7rem; padding-top: .55rem;
  font-size: .82rem; color: var(--muted); line-height: 1.5;
}
.plate-num { color: var(--accent); font-weight: 700; letter-spacing: .06em; font-size: .74rem; text-transform: uppercase; margin-right: .35rem; }
.hero-plate img { box-shadow: 0 22px 50px rgba(6, 34, 57, .18); }

.plate-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.plate-open img { transition: opacity .3s ease; }
.plate-open:hover img { opacity: .88; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-block; background: var(--ink); color: var(--ivory);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: .8rem 1.9rem; border: 1.5px solid var(--ink); border-radius: 999px;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-light { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-disabled { background: transparent; color: var(--muted); border: 1.5px dashed var(--hairline); cursor: not-allowed; }
.quiet-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.quiet-link.light { color: var(--ivory); }
.cta-row { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; margin-top: 1.6rem; }
.cta-row.center { justify-content: center; }
.cta-support { font-size: .92rem; margin: 0; color: var(--muted); }
.center-cta { text-align: center; margin-top: 2.2rem; }

/* --------------------------------------------------------- status chips */
.status-chip {
  display: inline-block; vertical-align: middle;
  font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: .16rem .6rem; border-radius: 999px; white-space: nowrap;
}
.status-in-development { color: var(--ink); border: 1px solid var(--hairline); background: transparent; }
.status-coming-soon { color: var(--olive); border: 1px solid var(--olive); background: transparent; }
.status-prototype { color: var(--accent); border: 1px solid var(--accent); background: transparent; }
.status-placeholder { color: var(--accent); border: 1px dashed var(--accent); background: transparent; }
.status-representative { color: var(--muted); border: 1px solid var(--hairline); background: transparent; }
.status-active { color: var(--ivory); background: var(--olive); border: 1px solid var(--olive); }
.status-growing { color: var(--olive); border: 1px solid var(--olive); background: transparent; }

/* ---------------------------------------------------------- home pieces */
.way-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem, 4vw, 3rem); }
.way h3 { margin-top: 1.1rem; }
.way-fig { margin: 0; }
.way-fig img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .way-row { grid-template-columns: 1fr; } }

.res-spread { padding-block: 1rem; }
.dictionary .dict-sample { border-left: 2px solid var(--accent); padding-left: 1.2rem; margin: 1.4rem 0; }
.dict-term { font-weight: 800; font-size: 1.25rem; margin-bottom: .2rem; }
.dict-term.large { font-size: 1.9rem; }
.dict-alt { font-weight: 400; font-style: italic; font-size: .82em; color: var(--muted); }
.dict-def { margin: 0; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.4rem, 3.5vw, 2.6rem); align-items: end; margin-top: 2rem;
}
.gallery-plate.span-7 { grid-column: span 7; }
.gallery-plate.span-5 { grid-column: span 5; }
.gallery-plate.span-6 { grid-column: span 6; }
.photos-grid { align-items: start; }
.photos-grid .plate { grid-column: span 4; }
@media (max-width: 820px) {
  .gallery-plate.span-7, .gallery-plate.span-5, .gallery-plate.span-6 { grid-column: span 12; }
  .photos-grid .plate { grid-column: span 6; }
}
@media (max-width: 560px) { .photos-grid .plate { grid-column: span 12; } }

/* -------------------------------------------------- dark plate sections */
.dark-plate-section { background: #0B0D10; color: var(--ivory); }
.dark-plate-section .chapter-title, .dark-plate-section h3 { color: var(--ivory); }
.dark-plate-section .folio-rule { border-top-color: rgba(247, 244, 238, .3); color: rgba(247, 244, 238, .7); }
.dark-plate-section .plate figcaption { border-top-color: rgba(247, 244, 238, .3); color: rgba(247, 244, 238, .75); }
.dark-plate-section .measure { color: rgba(247, 244, 238, .92); }
.dark-plate-section .fact h4 { color: rgba(247, 244, 238, .65); }
.dark-plate-section .ph-note { color: #E8825F; }
.dark-plate-section a:not(.btn):not(.btn-light) { color: var(--ivory); }

/* ------------------------------------------------- before/after plates */
.ba-plate { margin: 2.2rem auto; max-width: 56rem; }
.ba-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ba-controls { display: none; justify-content: center; gap: 0; margin-top: 1.1rem; }
.ba-controls button {
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  background: transparent; color: inherit; border: 1.5px solid currentColor;
  padding: .5rem 1.6rem;
}
.ba-controls button:first-child { border-radius: 999px 0 0 999px; }
.ba-controls button:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.ba-controls button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Narrow screens: one frame at a time, toggled */
@media (max-width: 760px) {
  .ba-frames { grid-template-columns: 1fr; }
  .ba-plate[data-ba-enhanced] .ba-frames { display: block; }
  .ba-plate[data-ba-enhanced] .ba-frame[data-ba-hidden] { display: none; }
  .ba-controls { display: flex; }
}

.repair-chapter { margin-bottom: clamp(3rem, 7vw, 5rem); }
.repair-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 1rem; }
@media (max-width: 760px) { .repair-thumbs { grid-template-columns: repeat(2, 1fr); } }
.fact { margin: 1.3rem 0; max-width: var(--measure); }
.epigraph {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.01em;
  line-height: 1.3; margin: 0 0 1.4rem; color: var(--ink);
}
.epigraph.inset { border-left: 2px solid var(--accent); padding-left: 1.4rem; margin: 2rem 0; font-size: 1.35rem; }

/* --------------------------------------------------------- founder etc. */
.founder-spread { align-items: center; }
.shape-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.8rem, 4vw, 3rem); }
.shape-item { border-top: 1px solid var(--hairline); padding-top: 1.2rem; }
@media (max-width: 760px) { .shape-grid { grid-template-columns: 1fr; } }
.closing-chapter { padding-bottom: 5rem; }

/* -------------------------------------------------------------- journey */
.opening-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { border-left: 1px solid var(--hairline); padding-left: 1.6rem; position: sticky; top: 92px; }
.toc-title { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.toc-list a { text-decoration: none; font-weight: 600; font-size: .95rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.toc-list a:hover { color: var(--accent); }
.toc-num { color: var(--accent); font-weight: 700; font-size: .8rem; }
@media (max-width: 900px) { .opening-grid { grid-template-columns: 1fr; } .toc { position: static; } }

.stage-flow { display: grid; gap: clamp(3rem, 7vw, 5rem); }
.stage-chapter {
  display: grid; grid-template-columns: auto minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(1.4rem, 4vw, 3rem); align-items: start;
  border-top: 1px solid var(--hairline); padding-top: 2rem;
  scroll-margin-top: 90px;
}
.stage-bignum {
  font-size: clamp(3rem, 7vw, 5.4rem); font-weight: 800; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent); line-height: 1;
}
.topic-cols { columns: 2; gap: 2.4rem; padding-left: 1.1rem; margin: 1rem 0 1.6rem; font-size: .95rem; }
.topic-cols li { margin-bottom: .35rem; break-inside: avoid; }
.stage-plate { max-width: 22rem; }
@media (max-width: 860px) {
  .stage-chapter { grid-template-columns: 1fr; }
  .topic-cols { columns: 1; }
}

/* ------------------------------------------------------------ learn hub */
.index-list { display: grid; border-top: 1px solid var(--hairline); }
.index-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.6rem .4rem; border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.index-row h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
.index-row p { margin: 0; color: var(--muted); font-size: .95rem; }
.index-num { color: var(--accent); font-weight: 700; font-size: .95rem; }
.index-arrow { font-size: 1.4rem; color: var(--accent); transition: transform .25s ease; }
.index-row:hover .index-arrow { transform: translateX(6px); }
.index-row:hover h2 { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .index-arrow, .index-row:hover .index-arrow { transition: none; transform: none; } }

/* ------------------------------------------------------------- glossary */
.search-row { margin-top: 1.6rem; }
.search-row label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.search-row input {
  width: 100%; max-width: 26rem; font: inherit; padding: .7rem 1rem;
  border: 1px solid var(--hairline); border-radius: 999px; background: #fff;
}
.dict-columns { columns: 2; column-gap: clamp(2.4rem, 6vw, 5rem); }
.dict-entry { break-inside: avoid; padding: 1.1rem 0; border-bottom: 1px solid var(--hairline); }
.dict-entry .dict-term { font-size: 1.1rem; }
.dict-entry[hidden] { display: none; }
@media (max-width: 760px) { .dict-columns { columns: 1; } }
.entry-spread { padding-block: clamp(1.6rem, 4vw, 3rem); scroll-margin-top: 90px; align-items: start; }
.entry-plate { max-width: 30rem; }

/* ------------------------------------------------- tools & materials */
.q-list { padding-left: 1.2rem; font-size: .95rem; }
.q-list li { margin-bottom: .2rem; }
.cat-list { display: grid; gap: clamp(2.2rem, 5vw, 3.6rem); }
.cat-entry { border-top: 1px solid var(--hairline); padding-top: 1.6rem; scroll-margin-top: 90px; }
.cat-head { display: flex; gap: 1rem; align-items: baseline; margin-bottom: .3rem; }
.cat-head h3 { margin: 0; }
.cat-prio { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin: 0 0 1rem; }
.cat-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.cat-plate { max-width: 26rem; }
@media (max-width: 820px) { .cat-body { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ dialogs */
.catalogue-dialog { border: 0; padding: 0; background: var(--ivory); max-width: min(74rem, 95vw); width: 100%; margin: auto; }
.catalogue-dialog::backdrop { background: rgba(6, 34, 57, .8); }
.catalogue-inner {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem; padding: 2rem; max-height: 88vh; overflow-y: auto; position: relative;
}
.catalogue-figures { display: grid; gap: 1.6rem; }
.catalogue-text { position: sticky; top: 0; align-self: start; }
.dialog-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  font-size: 1.5rem; line-height: 1; width: 2.5rem; height: 2.5rem;
  border-radius: 50%; border: 1.5px solid var(--ink); background: var(--ivory);
  color: var(--ink); cursor: pointer;
}
@media (max-width: 820px) { .catalogue-inner { grid-template-columns: 1fr; } .catalogue-text { position: static; } }

/* ---------------------------------------------------------------- quiz */
.quiz { display: grid; gap: 2.2rem; }
.quiz-q { border: 0; margin: 0; padding: 0; border-top: 1px solid var(--hairline); padding-top: 1.4rem; }
.quiz-q legend { font-weight: 800; font-size: 1.25rem; float: left; width: 100%; margin-bottom: .4rem; }
.q-num { color: var(--accent); font-weight: 700; font-size: .85em; margin-right: .4rem; }
.options { display: grid; gap: .45rem; clear: both; padding-top: .8rem; }
.option { display: flex; gap: .8rem; align-items: center; padding: .55rem .2rem; cursor: pointer; border-bottom: 1px solid transparent; }
.option:hover span { color: var(--accent); }
.option:has(input:checked) { border-bottom-color: var(--accent); }
.option:has(input:checked) span { font-weight: 600; }
.option input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.quiz-hint { color: var(--accent); font-weight: 600; }
.quiz-result { border-top: 2px solid var(--accent); margin-top: 2.4rem; padding-top: 1.6rem; }

/* ---------------------------------------------------------------- forms */
.inquiry-form { display: grid; gap: 2.4rem; }
.inquiry-form fieldset { border: 0; padding: 0; margin: 0; border-top: 1px solid var(--hairline); padding-top: 1.4rem; }
.inquiry-form legend { font-weight: 800; font-size: 1.3rem; float: left; width: 100%; margin-bottom: 1rem; }
.field { clear: both; margin-bottom: 1.1rem; }
.field label, .field-check > span:first-child { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; padding: .65rem .9rem; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 4px; background: #fff;
}
.radio-row { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.radio-row label { display: flex; gap: .45rem; align-items: center; font-weight: 500; }
.radio-row input { accent-color: var(--accent); }
.field-invalid input, .field-invalid textarea { border-color: var(--accent); }
.form-error { color: var(--accent); font-weight: 600; font-size: .86rem; margin-top: .3rem; }
.form-result { border-top: 2px solid var(--olive); margin-top: 2rem; padding-top: 1.4rem; }
.form-result dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.4rem; }
.form-result dt { font-weight: 700; }
.form-result dd { margin: 0; }
.process-steps { padding-left: 1.2rem; display: grid; gap: 1rem; margin-bottom: 2.4rem; }
.process-steps h4 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1.02rem; font-weight: 700; }
.process-steps p { font-size: .95rem; margin: 0; color: var(--muted); }

/* photo upload tiles (repair inquiry) */
.photo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem; margin-top: .8rem; }
.photo-tile {
  position: relative; aspect-ratio: 1 / 1; border: 2px dashed var(--hairline); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  cursor: pointer; background: #fff; text-align: center; padding: .6rem; overflow: hidden;
}
.photo-tile:hover { border-color: var(--accent); }
.photo-tile input[type="file"] { display: none; }
.photo-tile-plus { font-size: 2.2rem; line-height: 1; color: var(--accent); font-weight: 300; }
.photo-tile-label { font-size: .74rem; color: var(--muted); line-height: 1.25; }
.photo-tile-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-tile.has-file { border-style: solid; border-color: var(--olive); }
.photo-tile.has-file .photo-tile-plus, .photo-tile.has-file .photo-tile-label { display: none; }
.photo-tile-remove {
  position: absolute; top: 5px; right: 5px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(6, 34, 57, .82); color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo-tile-remove:hover { background: var(--accent); }
.photo-tile:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo-warn:not([hidden]) { display: block; margin-top: .8rem; }

/* ---------------------------------------------------------------- about */
.story h2 { margin-top: 2em; }
.table-scroll { overflow-x: auto; margin: 1.6rem 0; }
.training-table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: .95rem; }
.training-table th, .training-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.training-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.school-logos { list-style: none; display: flex; gap: 2rem; flex-wrap: wrap; align-items: center; padding: 1rem 0 0; margin: 0; }
.school-logos img { max-height: 46px; width: auto; }

/* -------------------------------------------------------------- reveals */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .folio-rule { animation: none; }
}

/* ------------------------------------------------------------- colophon */
.colophon { border-top: 1px solid var(--hairline); margin-top: 4rem; }
.colophon-inner { max-width: var(--content); margin: 0 auto; padding: 3.4rem 1.4rem 4rem; text-align: center; }
.colophon-mark { margin: 0 auto 1rem; width: 46px; }
.colophon-name { font-weight: 800; font-size: 1.1rem; letter-spacing: .02em; margin: 0; }
.colophon-tag { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: .3rem 0 1.6rem; }
.colophon-links { display: flex; justify-content: center; gap: 1.8rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.colophon-links a { font-size: .92rem; font-weight: 500; text-decoration: none; }
.colophon-links a:hover { color: var(--accent); }
.colophon-note { font-size: .8rem; color: var(--muted); max-width: 44rem; margin: .3rem auto; }

/* the hidden attribute always wins */
[hidden] { display: none !important; }

/* ==========================================================================
   HYBRID ADDITIONS
   Modern Bookbinder base + Crafty assembling roadmap + Book Press
   press-screw comparator + a deliberate motion layer.
   Motion is gated behind html.motion-ok (set by JS only when the visitor
   does not prefer reduced motion) — without it, everything is static.
   ========================================================================== */

:root {
  --brass: #C9A96A;
  --brass-deep: #A8874A;
}

/* ------------------------------------------------ press-screw comparator */
.screw-comp { max-width: 54rem; margin: 2.2rem auto 0; }
.comp-stage { position: relative; overflow: hidden; background: #000; }
.comp-img { margin: 0; }
.comp-img img { width: 100%; display: block; }
.comp-after { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split, 0%)) 0 0); }
.comp-after img { height: 100%; object-fit: cover; }
.comp-seam {
  position: absolute; top: 0; bottom: 0; left: var(--split, 0%); width: 3px;
  background: var(--brass); box-shadow: 0 0 8px rgba(0, 0, 0, .8);
  transform: translateX(-1.5px);
}
.comp-after-alt { font-size: .82rem; color: rgba(247, 244, 238, .7); margin: .6rem 0 0; }
.comp-controls { display: flex; align-items: center; gap: 1.1rem; margin-top: 1rem; }
.comp-btn {
  font: inherit; font-weight: 600; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  background: transparent; color: var(--ivory); border: 1.5px solid var(--ivory);
  border-radius: 999px; padding: .45rem 1.3rem; cursor: pointer;
}
.comp-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 560px) {
  .comp-controls { gap: .55rem; }
  .comp-btn { padding: .45rem .85rem; font-size: .72rem; letter-spacing: .06em; }
  .rack-assembly { min-width: 0; }
}
.screw-label { flex: 1; display: block; }
.screw-label input[type="range"] {
  width: 100%; appearance: none; height: 10px; border-radius: 5px; cursor: pointer;
  background:
    repeating-linear-gradient(90deg, rgba(4, 24, 38, .55) 0 2px, transparent 2px 10px),
    linear-gradient(#D9BC80, var(--brass-deep));
  border: 1px solid rgba(0, 0, 0, .6);
}
.screw-label input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8D3A2, var(--brass-deep) 70%);
  border: 2.5px solid #0B0D10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .55);
}
.screw-label input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8D3A2, var(--brass-deep) 70%);
  border: 2.5px solid #0B0D10;
}
.comp-invite { text-align: center; font-size: .85rem; font-style: italic; color: rgba(247, 244, 238, .65); margin-top: .8rem; }
[data-comparator]:not([data-comp-ready]) .comp-after { position: static; clip-path: none; }
[data-comparator]:not([data-comp-ready]) .comp-seam,
[data-comparator]:not([data-comp-ready]) .comp-controls { display: none; }

/* -------------------------------------------- assembling-book roadmap */
.toc .assembly { border-top: 1px solid var(--hairline); margin-top: 1.6rem; padding-top: 1.2rem; }
.assembly-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .6rem 0 .8rem; }
.assembly-state {
  display: grid; justify-items: center; gap: .05rem; padding: .35rem .2rem;
  border: 1px solid transparent; border-radius: 3px;
  font-size: .72rem; font-weight: 600; color: var(--muted);
  transition: border-color .3s ease, background .3s ease;
}
.assembly-state svg { width: 40px; height: 40px; }
.assembly-state.is-active { border-color: var(--accent); background: rgba(179, 61, 25, .05); color: var(--accent); }
html.motion-ok .assembly-state.is-active svg { animation: state-pop .45s ease; }
@keyframes state-pop { 40% { transform: scale(1.12); } }
.bk-paper { fill: #fff; stroke: var(--ink); stroke-width: 1.3; }
.bk-paper2 { fill: var(--ivory-deep); stroke: var(--ink); stroke-width: 1.3; }
.bk-thread { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-dasharray: 3 2.4; }
.bk-knot { fill: var(--accent); }
.bk-board { fill: #C9AE86; stroke: var(--ink); stroke-width: 1.3; }
.bk-cloth { fill: var(--olive); stroke: var(--ink); stroke-width: 1.3; }
.bk-spine { fill: var(--ink); }
.bk-page { fill: #fff; }
.bk-open { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
@media (max-width: 900px) { .assembly-states { grid-template-columns: repeat(7, 1fr); max-width: 26rem; } }

/* --------------------------------------------- animated glossary diagrams */
.diagram {
  margin: 0 0 1.6rem; padding: 1.4rem 1.4rem 1rem;
  background: #fff; border: 1px solid var(--hairline);
}
.diagram svg { width: 100%; height: auto; display: block; }
.diagram svg path { stroke: var(--ink); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.diagram svg text { font-family: 'Figtree', sans-serif; font-size: 13px; font-weight: 600; fill: var(--muted); stroke: none; }
.diagram .diag-caption path { stroke: var(--accent); stroke-width: 1.6; }
.diagram .diag-caption text { fill: var(--accent); }
.diagram .thread { stroke: var(--accent); stroke-dasharray: 130; stroke-dashoffset: 0; }
.diagram .grain-lines path { stroke: var(--olive); stroke-width: 1.8; }
.diagram figcaption {
  border-top: 1px solid var(--hairline); margin-top: 1rem; padding-top: .6rem;
  font-size: .82rem; color: var(--muted); display: flex; gap: 1rem; align-items: baseline; justify-content: space-between;
}
.replay {
  flex: none; font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: none; border: 1px solid var(--accent);
  border-radius: 999px; padding: .25rem .9rem; cursor: pointer;
}
.replay:hover { background: var(--accent); color: #fff; }
html:not(.motion-ok) .replay { display: none; }

/* pre-animation states exist only when motion is allowed */
html.motion-ok [data-diagram]:not(.play) .folio,
html.motion-ok [data-diagram]:not(.play) .sig,
html.motion-ok [data-diagram]:not(.play) .grain-sheet,
html.motion-ok [data-diagram]:not(.play) .diag-caption { opacity: 0; }
html.motion-ok [data-diagram]:not(.play) .thread { stroke-dashoffset: 130; }

[data-diagram].play .folio {
  animation: folio-nest .85s cubic-bezier(.2, .7, .25, 1) both;
  animation-delay: calc(var(--i) * .42s);
}
@keyframes folio-nest {
  from { opacity: 0; transform: translateX(56px) scaleY(1.55); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
[data-diagram].play .diag-caption { animation: diag-fade .6s ease both; animation-delay: 2.1s; }
@keyframes diag-fade { from { opacity: 0; } to { opacity: 1; } }

[data-diagram].play .sig {
  animation: sig-gather .7s cubic-bezier(.2, .7, .25, 1) both;
  animation-delay: calc(var(--i) * .38s);
}
@keyframes sig-gather {
  from { opacity: 0; transform: translateY(-22px); }
  to { opacity: 1; transform: none; }
}
[data-diagram].play .thread { animation: thread-sew .9s ease both 1.3s; }
@keyframes thread-sew { from { stroke-dashoffset: 130; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
#diag-textblock.play .diag-caption { animation-delay: 2s; }

[data-diagram].play .grain-sheet { animation: diag-fade .5s ease both; animation-delay: calc(var(--i) * .3s); }

/* ------------------------------------------------------ hero entrance */
html.motion-ok body[data-page="home"] .hero-spread .verso > * {
  animation: leaf-rise .65s cubic-bezier(.2, .7, .25, 1) both;
}
html.motion-ok body[data-page="home"] .hero-spread .verso > *:nth-child(1) { animation-delay: .05s; }
html.motion-ok body[data-page="home"] .hero-spread .verso > *:nth-child(2) { animation-delay: .15s; }
html.motion-ok body[data-page="home"] .hero-spread .verso > *:nth-child(3) { animation-delay: .28s; }
html.motion-ok body[data-page="home"] .hero-spread .verso > *:nth-child(4) { animation-delay: .4s; }
html.motion-ok body[data-page="home"] .hero-spread .recto .plate {
  animation: plate-settle .9s cubic-bezier(.2, .7, .25, 1) both .25s;
}
@keyframes leaf-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes plate-settle { from { opacity: 0; transform: translateY(20px) rotate(.4deg); } to { opacity: 1; transform: none; } }
html.motion-ok body[data-page="home"] .hero-spread[data-reveal],
html.motion-ok body[data-page="home"] .hero-spread .verso[data-reveal],
html.motion-ok body[data-page="home"] .hero-spread .recto[data-reveal] { opacity: 1; transform: none; transition: none; }

/* -------------------------------------------------------- hover polish */
html.motion-ok .plate-open img { transition: transform .55s cubic-bezier(.2, .7, .25, 1), opacity .3s ease; }
html.motion-ok .plate-open:hover img { transform: scale(1.022); opacity: .94; }
html.motion-ok .btn { transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
html.motion-ok .btn:hover { transform: translateY(-1.5px); }
html.motion-ok .toc-list a { transition: padding-left .22s ease; }
html.motion-ok .toc-list a:hover { padding-left: .35rem; }
html.motion-ok .dict-entry { transition: background-color .25s ease; }
html.motion-ok .dict-entry:hover { background-color: rgba(179, 61, 25, .035); }
html.motion-ok .way-fig img { transition: transform .6s cubic-bezier(.2, .7, .25, 1); }
html.motion-ok .way:hover .way-fig img { transform: scale(1.03); }
html.motion-ok .way-fig { overflow: hidden; }
html.motion-ok .school-logos img { transition: transform .25s ease; }
html.motion-ok .school-logos li:hover img { transform: scale(1.05); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  [data-diagram] .folio, [data-diagram] .sig, [data-diagram] .grain-sheet,
  [data-diagram] .diag-caption, [data-diagram] .thread { animation: none !important; opacity: 1 !important; }
}

/* ------------------------------------------- journey: full-height rail */
.journey-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.journey-rail { align-self: stretch; }
.journey-rail .toc { position: sticky; top: 92px; }
.journey-main .stage-flow { margin-top: clamp(2.5rem, 6vw, 4rem); display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
.journey-main .stage-chapter { grid-template-columns: auto minmax(0, 1fr); }
.journey-main .stage-plate { grid-column: 2; max-width: 21rem; }
.journey-main .closing-invite { margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--hairline); padding-top: 2.4rem; }
@media (max-width: 900px) {
  .journey-layout { grid-template-columns: 1fr; }
  .journey-rail { order: -1; }
  .journey-rail .toc { position: static; }
}
@media (max-width: 860px) {
  .journey-main .stage-chapter { grid-template-columns: 1fr; }
  .journey-main .stage-plate { grid-column: auto; }
}

/* --------------------------------------- endband & case diagrams (round 2) */
.diagram .eb-block { fill: #FDFCF9; stroke: var(--ink); stroke-width: 2; }
.diagram .eb-leaf { stroke: rgba(6, 34, 57, .28); stroke-width: 1.4; }
.diagram .eb-core { stroke: #C9AE86; stroke-width: 6; stroke-dasharray: 190; stroke-dashoffset: 0; }
.diagram .wrap { stroke: var(--ink); stroke-width: 2.6; fill: none; transform-box: fill-box; transform-origin: center; }
.diagram .wrap.alt { stroke: var(--accent); }

html.motion-ok [data-diagram]:not(.play) .wrap,
html.motion-ok [data-diagram]:not(.play) .case-part,
html.motion-ok [data-diagram]:not(.play) .turnin,
html.motion-ok [data-diagram]:not(.play) .case-cloth { opacity: 0; }
html.motion-ok [data-diagram]:not(.play) .eb-core { stroke-dashoffset: 190; }

#diag-endband.play .eb-core { animation: thread-sew .7s ease both .15s; }
#diag-endband.play .wrap {
  animation: wrap-on .38s cubic-bezier(.2, .7, .3, 1.25) both;
  animation-delay: calc(.7s + var(--i) * .12s);
}
@keyframes wrap-on { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
#diag-endband.play .diag-caption { animation-delay: 2.2s; }

.diagram .case-cloth { fill: rgba(73, 102, 45, .12); stroke: var(--olive); stroke-width: 2; }
.diagram .case-part { stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.diagram .case-board-l, .diagram .case-board-r { fill: rgba(201, 174, 134, .55); }
.diagram .case-spine { fill: rgba(6, 34, 57, .18); }
.diagram .turnin path { fill: rgba(73, 102, 45, .3); stroke: var(--olive); stroke-width: 1.4; }
#diag-case.play .case-cloth { animation: diag-fade .5s ease both; }
#diag-case.play .case-board-l { animation: board-l .6s cubic-bezier(.2, .7, .25, 1) both .35s; }
#diag-case.play .case-board-r { animation: board-r .6s cubic-bezier(.2, .7, .25, 1) both .55s; }
#diag-case.play .case-spine { animation: spine-drop .55s cubic-bezier(.2, .7, .25, 1) both .8s; }
#diag-case.play .turnin { animation: diag-fade .4s ease both; animation-delay: calc(1.35s + var(--i) * .12s); }
#diag-case.play .diag-caption { animation-delay: 1.9s; }
@keyframes board-l { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes board-r { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes spine-drop { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------- catalogue page-turn pager */
.catalogue-figures[data-pager] { perspective: 1400px; }
.catalogue-figures[data-pager] .plate[data-page-hidden] { display: none; }
html.motion-ok .catalogue-figures[data-pager] .plate.turning {
  animation: page-turn .5s cubic-bezier(.2, .7, .3, 1) both;
  transform-origin: left center;
}
html.motion-ok .catalogue-figures[data-pager] .plate.turning-back {
  animation: page-turn-back .5s cubic-bezier(.2, .7, .3, 1) both;
  transform-origin: right center;
}
@keyframes page-turn { from { opacity: 0; transform: rotateY(-16deg) translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes page-turn-back { from { opacity: 0; transform: rotateY(16deg) translateX(-14px); } to { opacity: 1; transform: none; } }
.cat-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--hairline); margin-top: 1rem; padding-top: .7rem;
}
.cat-pager button {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  background: none; color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 999px; padding: .4rem 1.2rem;
}
.cat-pager button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-pager button:disabled { opacity: .35; cursor: default; }
.cat-pager .pager-count { font-size: .8rem; color: var(--muted); letter-spacing: .08em; }

/* --------------------------------------------------- ambient hero video */
.hero-ambient {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
}
.hero-ambient video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .14; filter: saturate(.6);
}
.hero-spread { position: relative; }
html:not(.motion-ok) .hero-ambient { display: none; }
.closing-ambient { position: relative; overflow: hidden; }
.closing-ambient > .ambient-media {
  position: absolute; inset: 0; z-index: -1;
}
.closing-ambient > .ambient-media video { width: 100%; height: 100%; object-fit: cover; opacity: .12; filter: saturate(.6); }
html:not(.motion-ok) .closing-ambient > .ambient-media { display: none; }


/* ================================================================== round 3 */

/* ------------------------------------------------- rack & pinion wheel */
.rack-assembly {
  flex: 1; position: relative; height: 66px; min-width: 10rem;
}
.rack {
  position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: linear-gradient(#D9BC80, var(--brass-deep));
  border-radius: 2px;
  border-bottom: 1px solid rgba(0, 0, 0, .55);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .6);
}
.rack::before {
  content: ""; position: absolute; top: -4px; left: 2px; right: 2px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--brass-deep) 0 3px, transparent 3px 8px);
}
.hand-wheel {
  position: absolute; bottom: 15px; left: 0;
  width: 48px; height: 48px; padding: 0;
  background: none; border: 0; cursor: grab;
  touch-action: none;
}
.hand-wheel:active { cursor: grabbing; }
.hand-wheel svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.hw-rim { fill: none; stroke: var(--brass); stroke-width: 7; }
.hw-spokes path { stroke: var(--brass-deep); stroke-width: 4; stroke-linecap: round; fill: none; }
.hw-hub { fill: #D9BC80; stroke: #7d6335; stroke-width: 2; }
.hand-wheel:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; border-radius: 50%; }
[data-comparator]:not([data-comp-ready]) .rack-assembly { display: none; }

/* ------------------------------------------------------- filmstrip */
.strip-layout { display: block; }
.strip-layout .catalogue-text { position: static; max-width: 46rem; margin-bottom: 1.6rem; padding-right: 3rem; }
.filmstrip {
  display: flex; gap: 1.4rem; align-items: center;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  cursor: grab; padding: .2rem .2rem .8rem;
  touch-action: pan-x;
  scrollbar-width: thin; scrollbar-color: var(--accent) rgba(6, 34, 57, .08);
}
.filmstrip.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.filmstrip::-webkit-scrollbar { height: 6px; }
.filmstrip::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
.filmstrip::-webkit-scrollbar-track { background: rgba(6, 34, 57, .08); }
.filmstrip .plate { flex: 0 0 auto; margin: 0; scroll-snap-align: center; }
.filmstrip .plate img {
  height: min(52vh, 26rem); width: auto; max-width: 78vw; display: block;
}
.filmstrip .plate img { pointer-events: none; } /* drags grab the strip, not the image */
.strip-count { margin-top: .4rem; letter-spacing: .08em; }
.filmstrip:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------- drifting pages ambience */
.pages-ambient { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.pages-ambient .float-page {
  position: absolute; top: var(--t, 20%); left: -14%;
  display: block; opacity: 0;
  will-change: transform;
}
html.motion-ok .pages-ambient .float-page {
  opacity: var(--o, .85);
  animation: page-drift var(--dur, 85s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.pages-ambient i {
  display: block;
  width: var(--w, 120px); height: calc(var(--w, 120px) * 1.38);
  background: linear-gradient(103deg, #F3EEE3, #ECE5D6 52%, #F6F1E8);
  border-radius: 3px 12px 8px 3px;
  box-shadow: 1px 8px 22px rgba(6, 34, 57, .045);
}
html.motion-ok .pages-ambient i {
  animation: page-flutter var(--fdur, 9s) ease-in-out infinite alternate;
  animation-delay: var(--fdelay, 0s);
}
@keyframes page-drift {
  from { transform: translate(0, 0) rotate(var(--r0, -5deg)); }
  to   { transform: translate(125vw, var(--dy, -7vh)) rotate(var(--r1, 6deg)); }
}
@keyframes page-flutter {
  from { transform: perspective(700px) rotateY(4deg) skewY(0deg); }
  to   { transform: perspective(700px) rotateY(30deg) skewY(1.6deg); }
}
.fp-1 { --t: 14%; --w: 90px;  --dur: 95s;  --delay: -12s; --dy: -5vh; --r0: -7deg; --r1: 4deg;  --fdur: 8s;  --o: .8; }
.fp-2 { --t: 58%; --w: 150px; --dur: 130s; --delay: -55s; --dy: -9vh; --r0: 3deg;  --r1: -5deg; --fdur: 11s; --fdelay: -3s; --o: .7; }
.fp-3 { --t: 34%; --w: 65px;  --dur: 80s;  --delay: -70s; --dy: 6vh;  --r0: -3deg; --r1: 8deg;  --fdur: 7s;  --fdelay: -5s; --o: .9; }
.fp-4 { --t: 76%; --w: 105px; --dur: 110s; --delay: -30s; --dy: -4vh; --r0: 6deg;  --r1: -3deg; --fdur: 10s; --fdelay: -7s; --o: .65; }
.fp-5 { --t: 6%;  --w: 125px; --dur: 145s; --delay: -95s; --dy: 8vh;  --r0: -4deg; --r1: 2deg;  --fdur: 12s; --fdelay: -2s; --o: .6; }
html:not(.motion-ok) .pages-ambient { display: none; }

/* ============================================================ IA v2 =====
   New commercial IA: burnt-orange Repair Inquiry CTA, navy feature bands,
   Services hub, FAQ accordion, Contact topic-picker, gallery filters. */

/* --- burnt-orange Repair Inquiry CTA + active hub buttons --- */
.nav-cta-repair {
  background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important;
}
.nav-cta-repair:hover { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.site-nav button.is-active { box-shadow: inset 0 -2px 0 var(--accent); color: var(--accent); }
html.motion-ok .nav-cta-repair { transition: background-color .18s ease, border-color .18s ease; }

/* --- navy feature bands --- */
.navy-band { background: var(--ink); color: var(--ivory); }
.navy-band-inner {
  max-width: var(--content); margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4.4rem) 1.4rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.navy-band h2 { color: var(--ivory); }
.navy-band p { color: rgba(247, 244, 238, .9); }
.eyebrow.light { color: rgba(247, 244, 238, .72); }
.navy-band .mtb-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 20px 44px rgba(0,0,0,.35); }
.navy-band.meet-band .navy-band-inner { grid-template-columns: .9fr 1.1fr; }
.navy-band.meet-band .mtb-figure { order: -1; }
@media (max-width: 780px) {
  .navy-band-inner, .navy-band.meet-band .navy-band-inner { grid-template-columns: 1fr; }
  .navy-band .mtb-figure, .navy-band.meet-band .mtb-figure { order: 0; }
}

/* --- Services hub --- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.6rem, 4vw, 2.6rem); margin-top: 1.4rem; }
.svc-card {
  display: flex; flex-direction: column; border: 1px solid var(--hairline);
  border-radius: 6px; overflow: hidden; background: #fff;
}
.svc-fig { margin: 0; }
.svc-fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.svc-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.svc-body h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.svc-points { list-style: none; margin: .2rem 0 1.3rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.svc-points li {
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px; padding: .22rem .7rem;
}
.svc-actions { margin-top: auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.svc-nocta { color: var(--muted); font-style: italic; font-size: .9rem; }
.svc-supplies { opacity: .92; }
@media (max-width: 720px) { .svc-grid { grid-template-columns: 1fr; } }

/* --- FAQ accordion --- */
.faq-wrap { display: grid; gap: 2.6rem; }
.faq-group .chapter-title { font-size: 1.35rem; margin-bottom: .8rem; }
.faq-list { display: grid; gap: .7rem; }
.faq-item { border: 1px solid var(--hairline); border-radius: 6px; background: #fff; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1rem 1.2rem; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-q { flex: 1; }
.faq-mark { position: relative; width: 14px; height: 14px; flex: none; }
.faq-mark::before, .faq-mark::after {
  content: ""; position: absolute; background: var(--accent); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-mark::before { width: 14px; height: 2px; }
.faq-mark::after { width: 2px; height: 14px; }
.faq-item[open] .faq-mark::after { opacity: 0; }
.faq-a { padding: 0 1.2rem 1.2rem; }
.faq-a p { margin: 0; color: var(--muted); max-width: 52ch; }
html.motion-ok .faq-mark::after { transition: opacity .2s ease; }

/* --- Contact --- */
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info { display: grid; gap: 1.6rem; }
.contact-detail { border-top: 1px solid var(--hairline); padding-top: .8rem; }
.contact-val { font-weight: 700; font-size: 1.05rem; margin: 0 0 .2rem; }
.contact-form { border: 1px solid var(--hairline); border-radius: 6px; background: #fff; padding: clamp(1.4rem, 3vw, 2rem); }
.contact-form h2 { font-size: 1.4rem; }
.topic-picker { border: 0; padding: 0; margin: 1.2rem 0 1.4rem; }
.topic-picker legend { font-weight: 600; font-size: .92rem; margin-bottom: .55rem; padding: 0; }
.topic-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.topic-option { position: relative; }
.topic-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.topic-option span {
  display: block; padding: .5rem 1rem; border: 1px solid var(--hairline); border-radius: 999px;
  font-weight: 600; font-size: .9rem; cursor: pointer;
}
.topic-option input:checked + span { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.topic-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.topic-route { font-size: .9rem; margin: .8rem 0 0; color: var(--muted); flex-basis: 100%; }
.contact-fallback { margin-top: 1rem; }
@media (max-width: 780px) { .contact-layout { grid-template-columns: 1fr; } }

/* --- Gallery filters + tighter grid + category tags --- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 .4rem; }
.gallery-filter {
  font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
  padding: .45rem 1rem; border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent; color: var(--ink);
}
.gallery-filter:hover { border-color: var(--accent); color: var(--accent); }
.gallery-filter.is-active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.gallery-tight {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem); align-items: start; margin-top: 1.2rem;
}
.gallery-tight .gallery-plate { grid-column: auto; }
.gallery-tight .plate-open { position: relative; overflow: hidden; border-radius: 4px; }
.gallery-tight .plate-open img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.gallery-tag {
  position: absolute; left: .55rem; bottom: .55rem; z-index: 2;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; color: #fff; background: rgba(6, 34, 57, .82);
}
.gallery-tag-leather { background: rgba(179, 61, 25, .9); }
.gallery-tag-decorated { background: rgba(73, 102, 45, .9); }
.gallery-tag-paper { background: rgba(73, 102, 45, .9); }
.gallery-tag-repair { background: rgba(122, 74, 42, .92); }
.gallery-tight .plate figcaption { font-size: .82rem; }
.gallery-tight .plate figcaption em { display: block; color: var(--muted); font-style: normal; font-size: .78rem; }
[data-gallery-item].is-hidden { display: none; }
html.motion-ok .gallery-filter { transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
html.motion-ok .gallery-tight .plate-open img { transition: transform .5s cubic-bezier(.2,.7,.25,1), opacity .3s ease; }
html.motion-ok .gallery-tight .plate-open:hover img { transform: scale(1.05); }
