/*
 * Specimen Catalogue: the website as a quiet catalogue of well-made things.
 * Pale paper, navy type, hairline rules, objects on soft grey plates with
 * a spec row under each. One accent, the logo's coral, and it only ever
 * means "do this". One grotesk at a few sizes. Nothing here belongs to one
 * kind of machine. Used by the site pages and the share pages (main.wrap).
 */

@font-face { font-family: "Host Grotesk"; src: url("/site/host-grotesk.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --paper: #f6f6f4; --ink: #16213e; --ink2: #5f636a; --line: #d9dbdf; --plate: #ecedef; --plate-hi: #ffffff;
  /* The brand's coral (logo, 2026-10-04): --accent fills, with navy text on it (5.7:1);
     --accent-text is coral as text or a thin line on paper (4.5:1). */
  --accent: #ff6b57; --accent-hover: #f25a45; --accent-ink: #16213e; --accent-text: #c8432d; --accent-soft: rgba(255, 107, 87, .16);
  --ok: #1d6b3a; --err: #a3271c;
  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The footer sits at the bottom even on a short page: the page is a column and its main part takes the room left. */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 17px/1.6 var(--font); color: var(--ink); background: var(--paper); caret-color: var(--accent-text); font-feature-settings: "ss01" 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
/* skeletons: a picture's box shimmers until it arrives (layout.ts SKELETON_SCRIPT marks it .ld) */
body > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
main img { background: linear-gradient(100deg, var(--plate) 40%, var(--plate-hi) 50%, var(--plate) 60%) var(--plate); background-size: 250% 100%; }
@media (prefers-reduced-motion: no-preference) { main img:not(.ld) { animation: skeleton 1.5s linear infinite; } }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: 0 0; } }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }

/* ---------- type: one grotesk, a few sizes ---------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 4.4rem); line-height: 1.02; margin: 0 0 .35em; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); line-height: 1.12; margin: 1.6em 0 .45em; }
h3 { font-size: 1.1rem; line-height: 1.35; margin: 0 0 .35em; letter-spacing: -.01em; font-weight: 600; }
p, li { max-width: 66ch; }
.lead { font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem); line-height: 1.55; color: var(--ink2); }
strong { font-weight: 600; }

/* ---------- header and footer ---------- */
.rail { max-width: 1200px; margin: 0 auto; padding: 16px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: .45em; font: 650 1.2rem/1 var(--font); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand svg { width: 1.55em; height: 1.55em; flex: none; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1; }
.site-header nav a, .site-footer nav a, .login { color: var(--ink2); text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover, .login:hover { color: var(--ink); }
.actions { display: flex; align-items: center; gap: 18px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer .brand { font-size: 1rem; }
.site-footer p { margin: 0; color: var(--ink2); font-size: .9rem; }

/* ---------- actions: the accent means "do this" and nothing else ---------- */
.cta, .button {
  display: inline-flex; align-items: center; gap: .5em; padding: 12px 22px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 500 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.cta:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button { padding: 8px 16px; font-size: .95rem; }
.cta.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.cta.secondary:hover { border-color: var(--ink); background: transparent; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.text-link { color: var(--accent-text); font-weight: 500; }

/* ---------- pages ---------- */
main.home { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
main.wrap { max-width: 860px; margin: 0 auto; padding: 48px var(--gutter) 72px; }
main.wrap > :first-child { margin-top: 0; }
.band { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.band > h2:first-child, .band-copy > h2:first-child, .community-copy > h2:first-child { margin-top: 0; }

/* ---------- plates: an object, then its caption and specs ---------- */
.plate { margin: 0; }
.plate img { width: 100%; border-radius: 6px; }
.plate figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.spec-name { font-weight: 600; }
.spec-note { color: var(--ink2); font-size: .95rem; flex-basis: 100%; }
.specs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; font-size: .92rem; }
.specs div { display: flex; gap: 8px; }
.specs dt { color: var(--ink2); }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- home: the first viewport ---------- */
.hero { display: grid; gap: 36px; align-items: center; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; } }
.hero-copy h1 { max-width: 12ch; }

/* ---------- home: the live box ---------- */
.redraw { display: grid; gap: 32px; align-items: start; }
@media (min-width: 980px) { .redraw { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; } }
.kit-figure { margin: 0; padding: clamp(14px, 2.5vw, 24px); background: var(--plate-hi); border: 1px solid var(--line); border-radius: 6px; }
.kit { display: block; width: 100%; height: auto; overflow: visible; }
.kit .bed-edge { fill: none; stroke: none; }
.kit .guide { fill: none; stroke: var(--line); stroke-width: .5; }
.kit .cut { fill: var(--paper); stroke: var(--ink); stroke-width: .6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.kit .engrave { fill: var(--ink2); font-family: var(--font); font-weight: 500; text-anchor: middle; }
.kit .engrave.dim { fill: var(--ink2); font-weight: 400; font-variant-numeric: tabular-nums; opacity: .8; }
.kit .engrave.name { fill: var(--accent-text); font-weight: 600; letter-spacing: -.01em; }
@media (prefers-reduced-motion: no-preference) {
  /* each part is drawn in turn, once, as the page opens */
  .kit-sheet:not(.live) .cut { stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; animation-delay: calc(.2s + var(--i) * .22s); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 600px) { .kit .engrave.dim { display: none; } }
.kit-controls { display: grid; gap: 14px 22px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.dial { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin: 0; }
.dial span { font-size: .85rem; color: var(--ink2); }
.dial output { font-size: .92rem; font-variant-numeric: tabular-nums; }
.dial input[type=range] { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--accent-text); height: 22px; }
.dial.name { grid-template-columns: 1fr; }
.dial.name input { margin-top: 4px; padding: 7px 10px; }
.kit-readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin: 14px 0 0; font-size: .9rem; color: var(--ink2); max-width: none; }
.kit-readout strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- home: steps, plates, audiences ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; gap: 0; }
.steps li { counter-increment: step; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-size: .92rem; color: var(--ink2); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}
.steps p { margin: 0; color: var(--ink2); }
.plate-row { display: grid; gap: 40px; }
@media (min-width: 860px) { .plate-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.audiences { display: grid; gap: 8px 40px; }
@media (min-width: 860px) { .audiences { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.audiences h2 { font-size: 1.3rem; margin: 0 0 .4em; }
.audiences p { color: var(--ink2); margin: 0 0 20px; }
.community { display: grid; gap: 32px; align-items: center; }
@media (min-width: 980px) { .community:has(.grid) { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; } }
.community .grid.preview { margin: 0; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.closing h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); letter-spacing: -.03em; margin-top: 0; }
.closing p { color: var(--ink2); }

/* ---------- features ---------- */
.features { display: grid; margin: 32px 0 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.features .card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.features .card:has(.shot) { grid-column: 1 / -1; display: grid; gap: 14px 40px; align-items: center; }
@media (min-width: 760px) {
  .features .card:has(.shot) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .features .card:has(.shot) > picture { grid-row: 1 / span 2; }
  .features .card:has(.shot) > h2 { align-self: end; }
  .features .card:has(.shot) > p { align-self: start; }
}
.features h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .35em; }
.features p { margin: 0; color: var(--ink2); }
.card .shot { width: 100%; border-radius: 6px; }
main.wrap:has(.features) { max-width: 1040px; }

/* ---------- templates gallery: plates ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 20px 0 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cats a { color: var(--ink2); text-decoration: none; }
.cats a:hover { color: var(--ink); }
.catalog { display: grid; gap: 8px 48px; margin-top: 20px; }
@media (min-width: 900px) { .catalog { grid-template-columns: 250px minmax(0, 1fr); align-items: start; } .facet-panel { position: sticky; top: 20px; } .facet-panel > summary { display: none; } }
.catalog .facet-panel { border: 0; margin: 0; }
.facet-panel > summary { cursor: pointer; font-weight: 500; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.facets fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.facets legend { font-weight: 500; padding: 0; margin-bottom: 6px; }
.facets label { white-space: nowrap; display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 0; font-weight: 400; color: var(--ink2); cursor: pointer; }
.facets label:has(:checked) { color: var(--ink); }
.facets input[type=checkbox] { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent-text); }
.facets .count { margin-left: auto; font-size: .85rem; font-variant-numeric: tabular-nums; }
.facets .search { display: block; margin: 0 0 18px; }
.facets .search span { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.facet-actions { white-space: nowrap; display: flex; align-items: center; gap: 14px; margin: 0; }
.facet-actions a { color: var(--ink2); }
.results > .grid:first-child, .found { margin-top: 0; }
.found { color: var(--ink2); }
.grid { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 16px 0 6px; }
main.wrap:has(.grid) { max-width: 1200px; }
.template { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.template img { width: 100%; aspect-ratio: 1200 / 630; object-fit: contain; border-radius: 6px; transition: transform .35s var(--ease); }
.template:hover img { transform: scale(1.015); }
.template .name { font-weight: 500; }
.template:hover .name { color: var(--accent-text); }
.badge { margin-left: 6px; color: var(--ink2); font-size: .85rem; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 24px; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 0; font-weight: 500; font-size: 1.08rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ink2) 0 0) center / 12px 1.5px no-repeat, linear-gradient(var(--ink2) 0 0) center / 1.5px 12px no-repeat; transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 20px; color: var(--ink2); }

/* ---------- notes ---------- */
.notice, .error { padding: 12px 16px; border-radius: 6px; max-width: none; margin: 16px 0; }
.notice { background: #e9f3ec; color: var(--ok); }
.error { background: #f8e9e7; color: var(--err); }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; margin: 18px 0 6px; }
input:not([type=range]), select, textarea {
  display: block; width: 100%; font: 400 16px/1.4 var(--font); padding: 11px 12px; color: var(--ink);
  background: var(--plate-hi); border: 1px solid var(--line); border-radius: 6px;
}
input::placeholder, textarea::placeholder { color: #8a8e95; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; border-color: var(--accent-text); }
textarea { min-height: 150px; resize: vertical; }
button { font: inherit; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.contact { max-width: 600px; margin: 10px 0 18px; }
form.contact .cta { margin-top: 24px; }
form.contact .note { font-size: .92rem; color: var(--ink2); }

/* ---------- 404 ---------- */
.lost { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .lost { grid-template-columns: 220px 1fr; } }
.lost-part { width: 100%; max-width: 220px; }
.lost-part path { fill: none; stroke: var(--ink2); stroke-width: 1.2; stroke-dasharray: 4 4; }

@media (max-width: 640px) {
  /* the footer reads as one left-aligned column on a phone */
  .site-footer .rail { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer nav { flex: none; }
}
@media (max-width: 520px) {
  .site-header .rail { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
  .site-header .actions { display: contents; }
  .site-header .button { grid-column: 2; grid-row: 1; }
  .site-header nav { grid-column: 1; grid-row: 2; gap: 4px 18px; }
  .site-header .login { grid-column: 2; grid-row: 2; justify-self: end; }
}

/* ---------- /pricing: one plate per plan, a spec list under the price ---------- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0 8px; }
.plan { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--plate-hi); }
.plan h2 { font-size: 1.25rem; margin: 0 0 .3em; }
.plan .price { margin: 0; font-size: 1.35rem; font-weight: 600; }
.plan .year { margin: 0; color: var(--ink2); font-size: .9rem; }
.plan ul { list-style: none; margin: 16px 0 20px; padding: 0; flex: 1; font-size: .95rem; }
.plan li { padding: 8px 0; border-top: 1px solid var(--line); }
.plan .button { justify-content: center; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .plans { grid-template-columns: minmax(0, 1fr); } }
