/* After June — shared styles. All pages use only these tokens and classes. */

:root {
  /* Two text colours only: ink (dark blue-black) and cream. */
  --ink: #1B2130;
  --cream: #FFFDF7;
  --paper: #FFFFFF;
  --panel: #F2F0EB;     /* photo backgrounds, quiet fills */
  --smoke: #1B2130;     /* secondary text is ink too (kept as a name so older pages still work) */
  --line: #E4E2DD;
  --plum: #1B2130;      /* focus rings and button hover */

  --band: #F2F0EB;
  --foot: #FAF9F6;
  --terracotta: #7A3A26; /* footer: dark terracotta, cream text */

  /* Stand-ins for Untitled Serif and Metric (Klim, paid licences): free, open-licence fonts */
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--sans);
  --type: var(--serif);

  --step--1: 0.8125rem;  /* 13 */
  --step-0: 0.9375rem;   /* 15 */
  --step-1: 1.125rem;    /* 18 */
  --step-2: 1.5rem;      /* 24 */
  --step-3: 2rem;        /* 32 */
  --step-4: clamp(2.25rem, 4.5vw, 3.25rem);

  --gutter: clamp(1rem, 2.25vw, 2rem);
  --max: 1440px;
  --header-h: 48px;
  --label: 0.75rem;     /* small uppercase labels */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
.display { font-size: var(--step-4); line-height: 1.08; letter-spacing: -0.02em; }
.h2 { font-size: var(--step-3); line-height: 1.15; }
.h3 { font-size: var(--step-2); line-height: 1.25; }
.lede { font-family: var(--serif); font-size: var(--step-1); line-height: 1.65; max-width: 38em; color: var(--ink); }
.muted { color: var(--smoke); }
.small { font-size: var(--step--1); }
.tbc { color: var(--smoke); font-style: italic; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.link {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--line);
}
.link:hover { text-decoration-color: currentColor; }

/* Announcement bar */
body[data-page="home"] .announce { display: none; }
.announce {
  background: var(--band); color: var(--ink); text-align: center;
  font: 400 0.75rem/1.4 var(--mono); padding: 7px var(--gutter);
}

/* Header: wordmark left, nav centred, cart right.
   On the home page it floats over the hero in cream, and turns solid on scroll or when a menu opens. */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); color: var(--ink); transition: background .35s ease, color .35s ease; }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; height: 80px; max-width: none; padding: 0 var(--gutter); transition: height .35s ease; }
.wordmark { font: 500 1.75rem/1 var(--serif); text-transform: uppercase; letter-spacing: 0.07em; text-decoration: none; color: inherit; justify-self: start; white-space: nowrap; transition: font-size .35s ease; }
.site-header.compact .wrap { height: var(--header-h); }
.site-header.compact .wordmark { font-size: 0.875rem; }
body[data-page="home"] .site-header { position: fixed; left: 0; right: 0; background: transparent; color: var(--cream); }
body[data-page="home"] .site-header.solid { background: var(--paper); color: var(--ink); }
.nav { display: flex; gap: 2rem; justify-self: center; align-items: center; }
.nav-link, .bag-button, .menu-button { font: 500 var(--label)/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; color: inherit; background: none; border: 0; padding: .5rem 0; cursor: pointer; }
.nav-link:hover, .nav-link[aria-current="page"], .mega-toggle[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.header-end { justify-self: end; display: flex; gap: 1.25rem; align-items: center; }
.bag-count { font-variant-numeric: tabular-nums; }
.menu-button { display: none; }

/* Products mega menu (Deadly Ponies-style): categories and products on the left, two pictures on the right */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); color: var(--ink); border-top: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
.site-header.mega-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.mega-inner { display: grid; grid-template-columns: 1fr 1fr 1.25fr 1.25fr; gap: var(--gutter); padding: 2rem var(--gutter) 2.5rem; }
.mega h2 { font: 500 var(--label)/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 1rem; }
.mega h2 a { text-decoration: none; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.mega li a { font: 400 1rem/1.3 var(--serif); text-decoration: none; }
.mega li a:hover, .mega h2 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.mega-tile { display: block; text-decoration: none; }
.mega-tile .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); }
.mega-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.mega-tile:hover img { transform: scale(1.03); }
.mega-tile span { display: block; margin-top: .6rem; font: 500 var(--label)/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 860px) {
  .site-header .wrap { grid-template-columns: 1fr auto; height: 64px; }
  .wordmark { font-size: 1rem; letter-spacing: 0.05em; }
  .header-end { gap: 1rem; }
  .site-header.compact .wordmark { font-size: 0.875rem; }
  .menu-button { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; justify-self: stretch; width: 100%; max-height: calc(100svh - 64px); overflow: auto;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .nav.open { display: flex; }
  .nav-link { display: block; width: 100%; text-align: left; padding: .9rem 0; font-size: 0.875rem; }
  .mega { position: static; border: 0; opacity: 1; visibility: visible; transform: none; display: none; transition: none; }
  .site-header.mega-open .mega { display: block; }
  .mega-inner { grid-template-columns: 1fr 1fr; padding: .25rem 0 1rem; gap: 1.25rem; }
  .mega-tile { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.5rem; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--plum); border-color: var(--plum); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }

/* Leathers */
.leathers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.swatch-block { aspect-ratio: 3 / 2; position: relative; overflow: hidden; }
.swatch-block::after { /* leather grain */
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .45  0 0 0 0 .4  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.leather h3 { margin: 1rem 0 .35rem; }
@media (max-width: 760px) { .leathers { gap: .75rem; } .swatch-block { aspect-ratio: 1; } .leather h3 { font-size: var(--step-1); } .leather p { font-size: var(--step--1); } }

/* Split (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: center; }
.split .frame { aspect-ratio: 1; overflow: hidden; background: var(--panel); }
.split .frame img { width: 100%; height: 100%; object-fit: cover; }
.split .text { max-width: 30rem; }
.split .text h2 { margin-bottom: 1rem; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Page intro */
.page-intro { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-intro .lede { margin-top: 1rem; color: var(--smoke); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem var(--gutter); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card { text-decoration: none; display: block; }
.card .frame { aspect-ratio: 1; background: var(--panel); overflow: hidden; position: relative; }
.card .frame img { width: 100%; height: 100%; object-fit: cover; }
.card .frame img + img { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.card:hover .frame img + img { opacity: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.card-name { font-family: var(--serif); font-size: var(--step-1); line-height: 1.3; }
.card-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-dots { display: flex; gap: 6px; margin-top: .6rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

/* Product page */
.crumbs { padding: 1.25rem 0; font-size: var(--step--1); color: var(--smoke); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.gallery-main { aspect-ratio: 1; background: var(--panel); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-top: .75rem; }
.thumbs button { padding: 0; border: 1px solid transparent; background: var(--panel); aspect-ratio: 1; cursor: pointer; overflow: hidden; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.buy .price { font-size: var(--step-1); margin: .5rem 0 2rem; font-variant-numeric: tabular-nums; }
.field-label { display: flex; justify-content: space-between; margin-bottom: .75rem; }
.swatches { display: flex; gap: .75rem; margin-bottom: 2rem; border: 0; padding: 0; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); outline: 1px solid transparent; outline-offset: 3px; }
.swatch input:checked + span { outline-color: var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--plum); }
.specs { margin: 2rem 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--smoke); }
.specs dd { margin: 0; }
.note { color: var(--smoke); font-size: var(--step--1); margin-top: 1rem; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } .buy { position: static; } }

/* Bag drawer */
.bag-overlay { position: fixed; inset: 0; background: rgba(20,16,14,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.bag { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); z-index: 41;
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
body.bag-open .bag-overlay { opacity: 1; pointer-events: auto; }
body.bag-open .bag { transform: none; }
.bag-head { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem var(--gutter); border-bottom: 1px solid var(--line); }
.bag-items { flex: 1; overflow: auto; padding: 0 var(--gutter); }
.bag-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.bag-item img { width: 72px; height: 72px; object-fit: cover; background: var(--panel); }
.qty { display: inline-flex; align-items: center; gap: .75rem; margin-top: .5rem; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--line); background: none; cursor: pointer; }
.text-button { background: none; border: 0; padding: 0; color: var(--smoke); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bag-foot { padding: 1.25rem var(--gutter) 1.5rem; border-top: 1px solid var(--line); }
.bag-total { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: var(--step-1); }
.bag-empty { padding: 2rem 0; color: var(--smoke); }

/* Forms */
.form { display: grid; gap: 1.25rem; max-width: 36rem; }
.form label { display: block; margin-bottom: .4rem; }
.input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid #CFC9C1; background: #fff; border-radius: 0;
}
.form textarea { min-height: 160px; resize: vertical; }
.form-status { min-height: 1.6em; }
.inline-form { display: flex; gap: .5rem; max-width: 28rem; }
.inline-form .input { flex: 1; }

/* About */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gutter); counter-reset: step; }
.process li { list-style: none; }
.process .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); margin-bottom: .9rem; }
.process .frame img { width: 100%; height: 100%; object-fit: cover; }
.process h3 { font-size: var(--step-1); }
.process h3::before { counter-increment: step; content: counter(step) ". "; color: var(--smoke); }
ol.process { padding: 0; margin: 0; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }

.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.aside h2 { font-size: var(--step-1); margin: 0 0 .35rem; }
.aside section + section { margin-top: 2rem; }

/* Footer */
.site-footer { position: relative; background: var(--terracotta); color: var(--cream); padding: clamp(4rem, 8vw, 6.5rem) 0 1.5rem; margin-top: clamp(4rem, 8vw, 7.5rem); font: 400 0.8125rem/1.6 var(--sans); overflow: hidden; }
.site-footer::before { /* faint grain, like the hero */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"); }
.site-footer.has-photo { background-position: center; background-size: cover; background-repeat: no-repeat; }
.site-footer.has-photo::before { opacity: .1; }
.site-footer .wrap { position: relative; max-width: none; }
.site-footer a { color: var(--cream); }
.site-footer :focus-visible { outline-color: var(--cream); }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); }
.footer-news h2 { font: 400 clamp(1.5rem, 2.4vw, 2.125rem)/1.2 var(--serif); letter-spacing: 0.01em; margin: 0 0 1.25rem; max-width: 18ch; }
.footer-news p { margin: 0 0 1.5rem; font-size: 0.875rem; max-width: 34ch; opacity: .85; }
.footer-news .under-link { display: inline-block; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.footer-news .under-link:hover { text-decoration-thickness: 2px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.footer-cols h2 { font: 600 var(--label)/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 1rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-cols a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.footer-cols a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-sign { text-align: center; margin-top: clamp(4.5rem, 9vw, 7.5rem); }
.footer-mark { font: 400 clamp(1.75rem, 3.5vw, 3rem)/1 var(--type); text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
.footer-line { margin: .9rem 0 0; font: 400 1rem/1.4 var(--serif); letter-spacing: 0.07em; opacity: .85; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.25rem; border-top: 1px solid rgba(255,253,247,.25); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; gap: 3rem; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
}
}


/* ---------- Home ---------- */
.label-link {
  font: 500 var(--label)/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; color: var(--ink);
}
.cta { font: 500 0.9375rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; color: var(--ink); }
.cta:hover { text-decoration-thickness: 2px; }

/* Hero: full bleed under the header. Takes a looping video if one is set in data.js, otherwise a slowly drifting photo. */
.h-hero { position: relative; height: max(520px, 86svh); overflow: hidden; background: var(--panel); }
.h-hero img, .h-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-hero img.drift { animation: drift 40s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.09) translate(-1.2%, .8%); } }
.h-hero::after { /* faint film grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
.h-hero::before { /* a soft shade at the bottom so cream text stays readable on any photo */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(27,33,48,.28), rgba(27,33,48,0) 40%); }
.h-hero-text { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 43px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; color: var(--cream); }
.h-hero-text.ink { color: var(--ink); }
.h-hero .tagline { margin: 0 0 40px; font: 400 1.5rem/1.2 var(--serif); letter-spacing: 0.07em; color: inherit; }
.h-hero .studio { margin: 0; width: clamp(16rem, 23.75vw, 21.375rem); font: 400 1.125rem/1.45 var(--serif); letter-spacing: 0.08em; }
@media (max-width: 760px) {
  .h-hero-text { flex-direction: column; align-items: flex-start; gap: 1rem; bottom: 2rem; }
  .h-hero .tagline { margin: 0; }
  .h-hero .studio { width: auto; max-width: 30rem; font-size: 1rem; letter-spacing: 0.06em; }
}

/* Two product offerings, edge to edge */
.h-offer { display: grid; grid-template-columns: 1fr 1fr; scroll-margin-top: var(--header-h); }
.offer { position: relative; display: grid; place-items: center; aspect-ratio: 720 / 422; overflow: hidden; background: var(--ink); text-decoration: none; }
.offer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.6,.2,1), filter .6s ease; }
.offer span { position: relative; z-index: 1; font: 500 var(--label)/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--cream);
  padding-bottom: 6px; background: linear-gradient(currentColor, currentColor) 50% 100% / 0 1px no-repeat; transition: background-size .5s ease; }
.offer:hover img, .offer:focus-visible img { transform: scale(1.04); filter: brightness(.9); }
.offer:hover span, .offer:focus-visible span { background-size: 100% 1px; }
@media (max-width: 760px) { .h-offer { grid-template-columns: 1fr; } .offer { aspect-ratio: 4 / 3; } }

/* Product carousel */
.h-rail { position: relative; padding: 4rem 0 0; }
.rail-track { display: flex; gap: 33px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 0 max(var(--gutter), calc((100% - 3 * 419px - 66px) / 2)); scroll-padding: 0 max(var(--gutter), calc((100% - 3 * 419px - 66px) / 2)); }
.rail-track::-webkit-scrollbar { display: none; }
.rail-card { flex: 0 0 clamp(240px, calc((100vw - 2 * var(--gutter) - 66px) / 3), 419px); scroll-snap-align: start; text-decoration: none; }
.rail-card .frame { position: relative; aspect-ratio: 419 / 360; overflow: hidden; background: var(--panel); }
.rail-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.6,.2,1); }
.rail-card:hover img { transform: scale(1.03); }
.rail-card .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(27,33,48,.35), rgba(27,33,48,0) 30%); }
.rail-card .label-link { position: absolute; z-index: 1; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 0.875rem; color: var(--cream); }
.rail-wrap { position: relative; }
.rail-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
  font: 400 1.125rem/1 var(--sans); box-shadow: 0 1px 6px rgba(27,33,48,.12); transition: opacity .2s; }
.rail-btn.prev { left: var(--gutter); }
.rail-btn.next { right: var(--gutter); }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .rail-card { flex-basis: 72vw; } .rail-btn { display: none; } }

/* Materials and philosophy: four photographs */
.h-mat { padding: 7.5rem var(--gutter) 0; }
.h-mat > .cta { display: table; margin: 0 auto 3rem; }
.mat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.mat-card .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); }
.mat-card img { width: 100%; height: 100%; object-fit: cover; }
.mat-card h3 { font: 500 var(--label)/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; margin: 1rem 0 .5rem; }
.mat-card p { font: 400 0.9375rem/1.55 var(--serif); margin: 0; max-width: 32ch; }
@media (max-width: 900px) { .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; } }

/* ---------- Notebook System builder (three columns: notes, sketch, options) ---------- */
.nb { display: grid; grid-template-columns: minmax(7rem, 195px) minmax(0, 596px) minmax(0, 523px); column-gap: 45px; justify-content: space-between;
  padding: 2rem var(--gutter) clamp(4rem, 8vw, 7rem); }
.nb-meta { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; height: min(745px, calc(100svh - var(--header-h) - 4rem));
  display: flex; flex-direction: column; justify-content: space-between; padding: .25rem 0 1rem; }
.nb-meta p { margin: 0; font: 500 var(--label)/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.nb-stage { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.nb-sketch { aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 6rem); width: 100%; background: #F7F2E8; }
.nb-sketch svg { display: block; width: 100%; height: 100%; }
.nb-sketch .fresh { animation: ink-in .7s ease-out both; }
@keyframes ink-in { from { opacity: 0; } to { opacity: 1; } }
.nb-caption { margin: .75rem 0 0; font: 400 0.8125rem/1.5 var(--serif); font-style: italic; }

.nb-panel { padding-top: .25rem; }
.nb-title { font: 400 2rem/1.1 var(--serif); letter-spacing: 0.01em; }
.nb-price { margin: .6rem 0 0; text-align: right; font: 500 1.125rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.nb-intro { margin: 1.75rem 0 0; font: 400 0.9375rem/1.6 var(--serif); max-width: 40ch; }
.nb-field { margin-top: 2.5rem; }
.nb-label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.nb-label > :first-child { font: 600 var(--label)/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.nb-hint { font: 400 0.75rem/1.4 var(--sans); text-align: right; }

/* Options are plain words: the chosen one is full ink and underlined, the rest are faint */
.opts { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin-top: .9rem; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem 0; font: 500 0.8125rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.05em;
  opacity: .42; transition: opacity .2s; }
.opt b { font-weight: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.opt:hover span { opacity: .75; }
.opt input:checked + span { opacity: 1; }
.opt input:checked + span b { text-decoration-color: currentColor; }
.opt input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 4px; }
.opt em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; }
.opt .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(27,33,48,.25); }

/* Numbered sections that open and close */
.nb-accs { margin-top: 3rem; }
.nb-acc summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .85rem 0; cursor: pointer;
  font: 600 0.8125rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.nb-acc summary::-webkit-details-marker { display: none; }
.nb-acc summary .count { font-weight: 400; }
.nb-acc summary .plus { margin-left: auto; position: relative; width: 11px; height: 11px; }
.nb-acc summary .plus::before, .nb-acc summary .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; border-top: 1px solid currentColor; transition: transform .25s; }
.nb-acc summary .plus::after { transform: rotate(90deg); }
.nb-acc[open] summary .plus::after { transform: rotate(0); }
.nb-acc summary:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.nb-acc-body { padding: .5rem 0 1.5rem; }
.nb-acc-body > p { margin: 0 0 .75rem; font: 400 0.875rem/1.6 var(--serif); max-width: 46ch; }

.addon-row { padding: .9rem 0 1.1rem; }
.addon-row + .addon-row { margin-top: .25rem; }
.ar-top { display: flex; align-items: baseline; gap: .75rem; }
.ar-name { font: 400 1.0625rem/1.3 var(--serif); }
.ar-price { font: 400 0.8125rem/1 var(--sans); }
.ar-add { margin-left: auto; background: none; border: 0; padding: .25rem 0; cursor: pointer; font: 500 var(--label)/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ar-line { margin: .4rem 0 0; font: 400 0.875rem/1.55 var(--serif); max-width: 44ch; }
.addon-row .opts { margin-top: .6rem; }
.addon-row.on .ar-name::before { content: "\2014\00a0"; }
.initial-field { margin-top: .75rem; display: flex; align-items: baseline; gap: .75rem; }
.initial-field label { font: 500 var(--label)/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }

.line-input { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: .55rem 0; border-radius: 0; font: 400 0.9375rem/1.4 var(--serif); }
.line-input:focus { outline: none; border-bottom-width: 2px; padding-bottom: calc(.55rem - 1px); }
.line-input.short { width: 3rem; text-align: center; text-transform: uppercase; }

.nb-buy { margin-top: 2.75rem; }
.nb-button { display: flex; align-items: center; justify-content: center; gap: .75rem; width: 100%; min-height: 60px; border: 0; background: var(--ink); color: var(--cream); cursor: pointer;
  font: 500 0.875rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; transition: opacity .2s; }
.nb-button:hover { opacity: .9; }
.nb-button[disabled] { opacity: .35; cursor: not-allowed; }
.nb-status { min-height: 1.4em; margin: .75rem 0 0; font: 400 0.8125rem/1.5 var(--serif); font-style: italic; text-align: center; }
.nb-soon { margin: 0 0 1rem; font: 600 var(--label)/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
.nb-soon + p { margin: 0 0 1.25rem; font: 400 0.875rem/1.6 var(--serif); }
.nb-notify { display: grid; gap: 1rem; }

.nb-breakdown { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font: 400 0.875rem/1.45 var(--serif); }
.nb-breakdown li { display: flex; justify-content: space-between; gap: 1rem; }
.nb-breakdown li span:last-child { font-family: var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-breakdown .tot { margin-top: .4rem; font-weight: 500; }

.nb-examples { padding: 0 var(--gutter); }

@media (max-width: 1100px) {
  .nb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); }
  .nb-meta { display: none; }
}
@media (max-width: 760px) {
  .nb { grid-template-columns: 1fr; padding-top: 1rem; }
  .nb-stage { position: static; }
  .nb-sketch { max-height: none; }
  .nb-panel { margin-top: 2rem; }
}
.build-bar { display: none; }
@media (max-width: 760px) {
  .build-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line);
    font: 500 0.8125rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.05em; }
  .build-bar a { padding: .8rem 1.1rem; background: var(--ink); color: var(--cream); text-decoration: none; }
  body[data-page="notebook"] .site-footer { padding-bottom: 5rem; }
}
