/* Along These Lines: drafting-table look. Paper, navy ink, bottom-paint red.
   Colours are tokens on :root; dark mode ("night chart") redefines them. */

:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d4;
  --card: #fbf8f1;
  --ink: #15202d;
  --ink-2: #3a4552;
  --muted: #6c685f;
  --rule: rgba(21, 32, 45, 0.16);
  --rule-strong: rgba(21, 32, 45, 0.55);
  --navy: #1d3047;
  --red: #a8321f;
  --red-hover: #8b2513;
  --on-red: #fff8ef;
  --blue: #2f5d8a;
  --brass: #9c7431;
  --band: #14202e;
  --band-ink: #ece6d8;
  --band-muted: #a9b3bf;
  --sheet: #ffffff;
  --shadow: 0 1px 2px rgba(21, 32, 45, 0.08), 0 8px 24px -12px rgba(21, 32, 45, 0.25);
  --drawing-blend: multiply;
  --drawing-filter: none;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1720;
    --paper-2: #141e29;
    --card: #182431;
    --ink: #ece6d8;
    --ink-2: #c7c3b8;
    --muted: #9b988f;
    --rule: rgba(236, 230, 216, 0.14);
    --rule-strong: rgba(236, 230, 216, 0.5);
    --navy: #a9c2dc;
    --red: #e06a4e;
    --red-hover: #ec8467;
    --on-red: #1a0d08;
    --blue: #86acd2;
    --brass: #d2ab62;
    --band: #0a1118;
    --sheet: #f4f1ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -12px rgba(0, 0, 0, 0.6);
    --drawing-blend: screen;
    --drawing-filter: invert(1) hue-rotate(180deg);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1720;
  --paper-2: #141e29;
  --card: #182431;
  --ink: #ece6d8;
  --ink-2: #c7c3b8;
  --muted: #9b988f;
  --rule: rgba(236, 230, 216, 0.14);
  --rule-strong: rgba(236, 230, 216, 0.5);
  --navy: #a9c2dc;
  --red: #e06a4e;
  --red-hover: #ec8467;
  --on-red: #1a0d08;
  --blue: #86acd2;
  --brass: #d2ab62;
  --band: #0a1118;
  --sheet: #f4f1ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -12px rgba(0, 0, 0, 0.6);
  --drawing-blend: screen;
  --drawing-filter: invert(1) hue-rotate(180deg);
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.55rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.24rem); color: var(--ink-2); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.mono, .eyebrow, .label {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow { color: var(--red); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.7em; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.label { color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 112px) 0; position: relative; }
.section--alt { background: var(--paper-2); }
.section--band { background: var(--band); color: var(--band-ink); }
.section--band .lede, .section--band p { color: var(--band-muted); }
.section--band h2, .section--band h3 { color: var(--band-ink); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--ink-2); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ station rule
   A divider drawn like the station marks along a lines plan. */
.stations {
  height: 26px;
  border-top: 1px solid var(--rule-strong);
  background-image: repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px calc(100% / 13));
  background-size: 100% 8px;
  background-repeat: no-repeat;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--muted);
  padding-top: 9px;
}
.stations span { padding-left: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: var(--f-body); font-weight: 600; font-size: 0.98rem; line-height: 1;
  padding: 0.95em 1.4em; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: var(--on-red); }
.btn--primary:hover { background: var(--red-hover); color: var(--on-red); }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--card); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 1.1em; height: 1.1em; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 0.4em; align-items: center; }
.link-arrow::after { content: "\2192"; transition: transform 0.15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 32px; color: var(--navy); flex: none; }
.brand-name { font-family: var(--f-display); font-size: 1.28rem; font-weight: 560; letter-spacing: -0.01em; line-height: 1; display: block; }
.brand-place { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav .cart-link {
  text-decoration: none; font: 500 0.95rem var(--f-body);
  padding: 8px 12px; border-radius: var(--radius); color: var(--ink-2);
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav .cart-link:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.cart-link svg { width: 20px; height: 20px; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: var(--on-red);
  font: 600 0.72rem/20px var(--f-body); text-align: center;
}
.cart-count[data-count="0"] { background: var(--rule); color: var(--muted); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius);
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav .cart-link { padding: 14px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; text-align: left; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
  .nav .cart-link { border-bottom: 0; }
  .brand-place { display: none; }
}

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero-drawing {
  position: absolute; inset: -4% -8% auto auto; width: min(1100px, 92vw);
  opacity: 0.16; mix-blend-mode: var(--drawing-blend); filter: var(--drawing-filter);
  pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 52%);
  mask-image: linear-gradient(100deg, transparent 18%, #000 52%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-copy h1 em { font-style: italic; font-weight: 400; color: var(--navy); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-figure { margin: 0; position: relative; }
.hero-figure img { width: 112%; max-width: none; margin-left: -6%; }
.hero-meta {
  display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; justify-content: start;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule);
}
.hero-meta dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hero-meta dd { margin: 2px 0 0; font-family: var(--f-display); font-size: 1.2rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-figure img { width: 100%; margin: 0; }
  .hero-drawing { width: 160vw; right: -40vw; top: 0; }
}
@media (max-width: 480px) { .hero-meta { grid-template-columns: repeat(2, auto); } }

/* Dimension line, as drawn under a profile: |<---- 472 mm ---->| */
.dim {
  display: flex; align-items: center; gap: 10px; margin: 6px 4% 0;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted);
}
.dim::before, .dim::after {
  content: ""; flex: 1; height: 9px;
  border-left: 1px solid var(--rule-strong);
  background: linear-gradient(var(--rule-strong), var(--rule-strong)) center / 100% 1px no-repeat;
}
.dim::after { border-left: 0; border-right: 1px solid var(--rule-strong); }

/* ------------------------------------------------------------ cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.kit-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.kit-card:hover { transform: translateY(-3px); }
.kit-card .media { aspect-ratio: 16 / 11; display: grid; place-items: center; padding: 8px 8px 0; background: linear-gradient(180deg, var(--paper-2), var(--card)); }
.kit-card .media img { width: 100%; height: 100%; object-fit: contain; }
.kit-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.kit-card h3 { margin-bottom: 0.25em; }
.kit-card h3 a { text-decoration: none; }
.kit-card .spec { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.kit-card ul { margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.95rem; color: var(--ink-2); }
.kit-card li { padding: 6px 0 6px 20px; border-top: 1px dashed var(--rule); position: relative; }
.kit-card li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 9px; height: 1px; background: var(--red); }
.kit-card .foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 6px; }
.kit-card .foot .price { margin-right: auto; }
.kit-card .lede { font-size: 1rem; margin-bottom: 14px; }
.price { font-family: var(--f-display); font-size: 1.6rem; font-weight: 500; line-height: 1; }
.price small { font-family: var(--f-body); font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-left: 4px; }
.tag {
  display: inline-block; font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid currentColor; border-radius: 3px; color: var(--blue);
}
.tag--red { color: var(--red); }
.kit-card .tag { align-self: flex-start; }

/* ------------------------------------------------------------ process (lines to kit) */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule-strong); }
.process li { list-style: none; padding: 22px 22px 8px 0; position: relative; }
.process li + li { padding-left: 22px; border-left: 1px solid var(--rule); }
.process .num { font-family: var(--f-mono); font-size: 0.72rem; color: var(--red); letter-spacing: 0.12em; }
.process h3 { margin: 6px 0 10px; }
.process p { font-size: 0.95rem; color: var(--ink-2); }
.process figure { margin: 0 0 16px; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.process figure img { width: 100%; height: 100%; object-fit: contain; }
.process figure.sheet img { object-fit: cover; object-position: center; mix-blend-mode: var(--drawing-blend); filter: var(--drawing-filter); }
@media (max-width: 980px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .process li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
}

/* ------------------------------------------------------------ feature list */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 28px 0 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--rule); }
.facts dt { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.05; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 0.93rem; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ drawing sheet */
.sheet-frame {
  background: var(--sheet); border-radius: 4px; box-shadow: var(--shadow);
  padding: clamp(6px, 1.2vw, 14px); position: relative;
}
.sheet-frame img { width: 100%; }
figcaption, .caption { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
figure { margin: 0; }

/* ------------------------------------------------------------ Port Townsend band */
.place { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.place .coords { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em; color: #e9a28e; margin-bottom: 18px; }
.place ul { list-style: none; margin: 0; padding: 0; }
.place li { padding: 16px 0; border-top: 1px solid rgba(236, 230, 216, 0.16); }
.place li strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; color: var(--band-ink); }
.place li span { color: var(--band-muted); font-size: 0.95rem; }
.plate-dark { background: radial-gradient(120% 90% at 50% 30%, #22344a, #14202e); border-radius: 12px; padding: clamp(8px, 2vw, 20px); }
.glow { background: radial-gradient(60% 70% at 50% 55%, rgba(236, 230, 216, 0.16), transparent 72%); }
@media (max-width: 900px) { .place { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ title-block footer */
.site-footer { border-top: 1px solid var(--rule-strong); padding: 40px 0 32px; font-size: 0.92rem; }
.titleblock {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  border: 1.5px solid var(--rule-strong); border-radius: 2px;
}
.titleblock > div { padding: 14px 16px; border-left: 1px solid var(--rule); }
.titleblock > div:first-child { border-left: 0; }
.titleblock .label { display: block; margin-bottom: 8px; font-size: 0.62rem; }
.titleblock a { text-decoration: none; display: block; padding: 2px 0; color: var(--ink-2); }
.titleblock a:hover { color: var(--red); }
.titleblock .brand-name { font-size: 1.4rem; }
.titleblock-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 14px; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
@media (max-width: 820px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:nth-child(3) { border-left: 0; }
  .titleblock > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .titleblock > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--rule); }
  .titleblock > div:nth-child(2) { border-left: 0; }
  .titleblock > div:nth-child(4) { border-left: 1px solid var(--rule); }
  .titleblock > div:nth-child(3), .titleblock > div:nth-child(4) { border-top: 1px solid var(--rule); }
  .titleblock > div:nth-child(2) { border-top: 0; }
}
@media (max-width: 420px) {
  .titleblock { grid-template-columns: 1fr; }
  .titleblock > div { border-left: 0 !important; border-top: 1px solid var(--rule); }
  .titleblock > div:first-child { border-top: 0; border-bottom: 0; }
}

/* ------------------------------------------------------------ page header (inner pages) */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); }
.crumbs { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs span[aria-hidden] { margin: 0 8px; }

/* ------------------------------------------------------------ product page */
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 88px); }
.gallery-main {
  margin: 0; aspect-ratio: 16 / 10.5; border-radius: 10px; overflow: hidden;
  background: radial-gradient(110% 80% at 50% 35%, var(--card), var(--paper-2));
  border: 1px solid var(--rule); display: grid; place-items: center; position: relative;
}
.gallery-main.is-sheet { background: var(--sheet); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.is-sheet img { object-fit: contain; padding: 14px; }
.gallery-main figcaption {
  position: absolute; left: 14px; bottom: 12px; margin: 0;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink-2); padding: 4px 8px; border-radius: 3px;
}
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.thumbs button {
  width: 100%; aspect-ratio: 4 / 3; padding: 2px; cursor: pointer;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
}
.thumbs button.is-sheet { background: #fff; }
.thumbs button[aria-pressed="true"] { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.thumbs button[data-viewer] { position: relative; }
.thumbs button[data-viewer]::after {
  content: "3D"; position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 2px;
  font: 500 0.58rem/1.3 var(--f-mono); letter-spacing: 0.06em; background: var(--ink); color: var(--paper);
}

.thumbs button[data-video] { position: relative; }
.thumbs button[data-video]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: color-mix(in srgb, var(--ink) 78%, transparent);
}
.thumbs button[data-video]::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; margin: -6px 0 0 -3px;
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--paper);
}

/* the build film in the gallery (site.js), in place of the photo */
.gallery-main video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery-main.is-video { background: #000; }
.gallery-main.is-video > img, .gallery-main.is-video figcaption { visibility: hidden; }

/* the 3D model over the gallery's photo (assets/js/viewer3d.js) */
.gallery-main > img { transition: opacity 0.35s; }
.gallery-main.is-3d.is-ready > img { opacity: 0; }
.gallery-main.is-3d figcaption { pointer-events: none; }
.viewer3d { position: absolute; inset: 0; display: none; }
.gallery-main.is-3d .viewer3d { display: block; }
.viewer3d canvas {
  display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.35s;
  touch-action: pan-y; cursor: grab; outline: none;
}
.viewer3d canvas:active { cursor: grabbing; }
.viewer3d canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
.gallery-main.is-ready .viewer3d canvas { opacity: 1; }
.viewer3d-hint {
  position: absolute; left: 14px; top: 12px; margin: 0; pointer-events: none; max-width: calc(100% - 120px);
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink-2); padding: 4px 8px; border-radius: 3px;
  opacity: 0; transition: opacity 0.5s;
}
@media (max-width: 600px) { .viewer3d-hint-more { display: none; } }   /* keep it off the mast */
.gallery-main.is-ready .viewer3d-hint { opacity: 1; }
.gallery-main.is-ready .viewer3d.is-used .viewer3d-hint { opacity: 0; }
.viewer3d-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; visibility: hidden; }
.gallery-main.is-ready .viewer3d-tools { visibility: visible; }
.viewer3d-tools button {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.viewer3d-tools button:hover { border-color: var(--rule-strong); background: var(--card); }
.viewer3d-tools button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.viewer3d-tools svg { width: 18px; height: 18px; }
.viewer3d-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
.viewer3d-progress span { display: block; width: 0; height: 100%; background: var(--red); transition: width 0.2s; }
.viewer3d.is-expanded {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(110% 80% at 50% 40%, var(--card), var(--paper-2));
}
.viewer3d.is-expanded canvas { touch-action: none; }
.viewer3d.is-expanded .viewer3d-tools { right: 16px; top: 16px; }
.viewer3d.is-expanded .viewer3d-hint { left: 16px; top: 18px; }
html.viewer3d-open { overflow: hidden; }
.viewer3d-load {
  position: absolute; right: 12px; top: 12px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius);
  font: 500 0.7rem var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--rule-strong); color: var(--ink); background: color-mix(in srgb, var(--card) 88%, transparent);
}
.gallery-main:not(.is-3d) .viewer3d-load { display: none; }

.buybox { position: sticky; top: 92px; }
.buybox h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); margin-bottom: 0.3em; }
.buybox .lede { font-size: 1.02rem; }
.buy-row { display: flex; gap: 10px; margin-top: 18px; align-items: stretch; }
.qty { display: inline-flex; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.qty button { width: 40px; border: 0; background: transparent; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.qty button:hover { background: var(--paper-2); }
.qty input { width: 44px; border: 0; text-align: center; font: 600 1rem var(--f-body); background: transparent; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1; }
.buy-note { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--ink-2); margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--rule); }
.buy-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--blue); }
.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.buy-price .price { font-size: 2.3rem; }
.buy-price .what { font-weight: 600; }
.buy-price .what small { display: block; font-weight: 400; color: var(--muted); font-size: 0.86rem; }
.includes { margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.93rem; color: var(--ink-2); }
.includes li { padding: 6px 0 6px 20px; border-top: 1px dashed var(--rule); position: relative; }
.includes li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 9px; height: 1px; background: var(--red); }
.buy-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; font-size: 0.92rem; }
@media (max-width: 980px) {
  .product { grid-template-columns: 1fr; }
  .buybox { position: static; }
}

/* spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec-table thead th { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; border-bottom: 1.5px solid var(--rule-strong); }
.spec-table tbody th { font-weight: 600; width: 32%; color: var(--ink); }
.spec-table td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.table-scroll .spec-table { min-width: 480px; }
.table-scroll .spec-table tr:last-child th, .table-scroll .spec-table tr:last-child td { border-bottom: 0; }

/* key dimensions list (full-size boat) */
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1.5px solid var(--rule-strong); margin-top: 24px; }
.dims div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); }
.dims dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dims dd { margin: 4px 0 0; font-family: var(--f-display); font-size: 1.45rem; }

/* build steps */
.steps { counter-reset: step; columns: 3 240px; column-gap: 32px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; break-inside: avoid; padding: 10px 0 10px 44px; position: relative; border-top: 1px solid var(--rule); font-size: 0.97rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 11px;
  font-family: var(--f-mono); font-size: 0.75rem; color: var(--red); letter-spacing: 0.06em;
}
.steps .phase { display: block; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }

/* FAQ */
/* FAQ */
.faq details { border-top: 1px solid var(--rule); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative;
  font-family: var(--f-display); font-size: 1.2rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--f-mono); font-size: 1.3rem; color: var(--red); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 46em; }

.form-grid { display: grid; gap: 14px; margin-top: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; font: 1rem var(--f-body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--radius);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.notice {
  font-size: 0.88rem; color: var(--ink-2); background: color-mix(in srgb, var(--blue) 9%, transparent);
  border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0 0;
}
.order-sent { display: none; }
.order-sent textarea { width: 100%; font: 0.8rem/1.4 var(--f-mono); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; padding: 8px; }
.order-sent.is-shown { display: block; }

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--band); color: var(--band-ink); padding: 14px 18px; border-radius: 8px;
  display: flex; gap: 16px; align-items: center; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
  z-index: 80; transition: transform 0.25s ease; max-width: calc(100vw - 32px); font-size: 0.95rem;
}
.toast.is-shown { transform: translate(-50%, 0); }
.toast a, .toast button { color: #f1b3a1; font: 600 0.95rem var(--f-body); white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ about page */
.pipeline { list-style: none; margin: 0; padding: 0; counter-reset: pipe; }
.pipeline li { counter-increment: pipe; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 24px 0; border-top: 1px solid var(--rule); }
.pipeline li::before { content: counter(pipe, decimal-leading-zero); font-family: var(--f-mono); color: var(--red); font-size: 0.85rem; letter-spacing: 0.08em; padding-top: 6px; }
.pipeline h3 { margin-bottom: 6px; }
.pipeline p { color: var(--ink-2); margin: 0; max-width: 42em; }
.quote {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.25; margin: 0; max-width: 28em;
  padding-left: 24px; border-left: 2px solid var(--red);
}

.callout { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: clamp(28px, 4vw, 44px); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.callout h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.callout p { margin: 0; color: var(--ink-2); }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }

/* ------------------------------------------------------------ home: why these boats */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.reasons li { padding: 18px 0; border-top: 1px solid rgba(236, 230, 216, 0.16); }
.reasons strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; color: var(--band-ink); margin-bottom: 4px; }
.reasons span { color: var(--band-muted); font-size: 0.95rem; }
.profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); margin-top: clamp(36px, 5vw, 56px); align-items: end; }
.profiles figcaption { color: var(--band-muted); font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.reasons--light li { border-top-color: var(--rule); }
.reasons--light strong { color: var(--ink); }
.reasons--light span { color: var(--ink-2); }
@media (max-width: 760px) { .reasons, .profiles { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ boat page: her story */
.bio { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.bio-text p { max-width: 38em; }
.bio-text h3 { margin-top: 1.5em; }
.bio-aside { position: sticky; top: 100px; display: grid; gap: 32px; }
.bio-aside .dims { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--rule-strong); }
.timeline li { position: relative; padding: 0 0 18px 22px; font-size: 0.95rem; color: var(--ink-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.timeline .yr { display: block; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--red); }
@media (max-width: 900px) { .bio { grid-template-columns: 1fr; } .bio-aside { position: static; } }

/* ------------------------------------------------------------ cart panel */
.drawer { position: fixed; inset: 0; z-index: 120; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 17, 24, 0.45); opacity: 0; transition: opacity 0.25s; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 100vw);
  background: var(--paper); border-left: 1px solid var(--rule); box-shadow: -16px 0 40px -20px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s ease; outline: none;
}
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
html.drawer-open { overflow: hidden; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { font-size: 1.6rem; margin: 0; }
.drawer-close {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; color: var(--ink);
}
.drawer-close:hover { border-color: var(--rule-strong); background: var(--card); }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 22px 32px; }
.drawer-body .empty p { color: var(--ink-2); margin: 18px 0 14px; }
.drawer-body h3 { font-size: 1.25rem; margin: 0; }

.cart-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-picks a { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: center; text-decoration: none; padding: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.cart-picks a:hover { border-color: var(--rule-strong); color: inherit; }
.cart-picks img { aspect-ratio: 4 / 3; object-fit: contain; width: 100%; }
.cart-picks span { font-size: 0.88rem; color: var(--muted); }
.cart-picks strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; color: var(--ink); }

.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.cart-line .thumb { aspect-ratio: 4 / 3; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-line h3 { font-size: 1.08rem; margin: 0 0 2px; }
.cart-line h3 a { text-decoration: none; }
.cart-line .meta { font-size: 0.82rem; color: var(--muted); margin: 0 0 8px; }
.cart-line .controls { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cart-line .qty button { width: 32px; }
.cart-line .qty input { width: 34px; }
.cart-line .line-total { font-family: var(--f-display); font-size: 1.15rem; text-align: right; }
.remove { background: none; border: 0; color: var(--muted); cursor: pointer; font: 0.86rem var(--f-body); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.remove:hover { color: var(--red); }
.summary-rows { padding: 8px 0 4px; }
.summary-rows .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 0.95rem; }
.summary-rows .row.total { border-top: 1.5px solid var(--rule-strong); margin-top: 6px; padding-top: 12px; font-weight: 600; }
.summary-rows .row.total span:last-child { font-family: var(--f-display); font-size: 1.45rem; font-weight: 500; }
.summary-rows p { margin: 6px 0 0; }
#order-form { border-top: 1px solid var(--rule); padding-top: 18px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; margin-top: 0; }
