/* Layout for the two landing pages (njreid/woodwerx#20) only. Tokens, base typography,
   header/footer and the kj-btn/kj-field/kj-notice classes live in kj.css. */

/* ---------- in-page section nav ---------- */
.kj-page-nav {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.kj-page-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.kj-page-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
}
.kj-page-nav a:hover { background: var(--surface-2); color: var(--ink); }
/* The ladder's forward link (njreid/woodwerx#196): last in the in-page nav, pushed to the
   right edge; wraps onto its own line when the nav is narrow. */
.kj-page-nav a.ladder-forward { margin-left: auto; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent-2);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-art { justify-self: center; }
.hero-art svg { width: 100%; height: auto; max-width: 420px; color: var(--accent); }

/* Heirloom hero still (njreid/woodwerx#196): one <img> per theme, swapped by display like the
   wordmark, so the header's manual theme toggle works without script. */
.hero-still { margin: 0; }
.hero-still-img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line-strong); }
.hero-still-img--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-still-img--light { display: none; }
  :root:not([data-theme="light"]) .hero-still-img--dark { display: block; }
}
:root[data-theme="dark"] .hero-still-img--light { display: none; }
:root[data-theme="dark"] .hero-still-img--dark { display: block; }
.hero-still figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--ink-faint); }
.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: none; margin: 0 auto; }
  /* The jump nav is one swipeable row on a phone, not a wall of wrapped pills. */
  .kj-page-nav .wrap { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .kj-page-nav a { flex: none; }
  .kj-page-nav a.ladder-forward { margin-left: 0; }
}

/* ---------- hero: recorded walkthroughs (customer page: desk; shop page: music stand nesting) ---------- */
.hero-art--video { justify-self: stretch; width: 100%; }
.kj-hero-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

.kj-hero-wrap { position: relative; }
.kj-hero-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.kj-hero-toggle::before { content: ""; width: 0; height: 0; margin-left: 3px;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; }
.kj-hero-toggle[data-state="playing"]::before { margin-left: 0; width: 12px; height: 14px;
  border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; box-sizing: border-box; }
.kj-hero-toggle:hover { background: var(--surface); }
.kj-hero-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- sections ---------- */
.landing section { padding: var(--reg-section-pad) 0; border-bottom: 1px solid var(--line); }
.landing section:last-of-type { border-bottom: none; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { font-size: 1.05rem; }

/* pitch grid (shops) */
.pitch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--reg-gap);
}
@media (max-width: 640px) { .pitch-grid { grid-template-columns: 1fr; } }
.pitch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.pitch-card h3 { margin-bottom: 6px; }
.pitch-card p { margin-bottom: 0; }
.pitch-card .mark {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.pitch-card .mark svg { width: 18px; height: 18px; }

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--reg-gap);
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  width: 30px; height: 30px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-2);
  color: var(--accent-2-ink);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin-bottom: 0; font-size: 0.96rem; }

/* what you get / what you do (customers) */
.split-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .split-columns { grid-template-columns: 1fr; } }
.split-card {
  border-radius: var(--radius);
  padding: 24px 24px 8px;
  border: 1px solid var(--line);
}
.split-card { background: var(--surface); }
.split-card h3 { margin-top: 0; }
.split-card.get { border-top: 4px solid var(--check); }
.split-card.do { border-top: 4px solid var(--accent-2); }
.split-card ul { margin: 0; padding-left: 0; list-style: none; }
.split-card li { margin-bottom: 10px; color: var(--ink); padding-left: 1.6em; position: relative; }
.split-card li::before { position: absolute; left: 0; font-weight: 700; }
.split-card.get li::before { content: '\2713'; color: var(--check); }
.split-card.do li::before { content: '\2192'; color: var(--accent-2); }

/* reassurance (customers) */
.reassure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--reg-gap);
}
@media (max-width: 760px) { .reassure-grid { grid-template-columns: 1fr; } }
.reassure-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.what-checked { margin-top: var(--reg-gap); font-size: 0.95rem; }
.reassure-card .mark {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.reassure-card .mark svg { width: 18px; height: 18px; }
/* Heirloom: teal means "checked" and nothing else, so a badge is a neutral outline unless it
   is the verified one (`mark--check`, landing.rs). */
:root[data-register="heirloom"] .reassure-card .mark {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
:root[data-register="heirloom"] .reassure-card .mark--check {
  color: var(--check);
  border-color: var(--check);
}
.reassure-card p { margin-bottom: 0; font-size: 0.95rem; }

/* what we look for (shops) */
.look-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .look-columns { grid-template-columns: 1fr; } }
.look-columns ul { margin: 0; padding-left: 1.15em; }
.look-columns li { margin-bottom: 8px; color: var(--ink-soft); }

/* FAQ */
details.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--accent-2);
  flex-shrink: 0;
}
details.faq[open] summary::after { content: '\2212'; }
details.faq p { padding-bottom: 16px; margin-bottom: 0; }

/* form */
.form-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
@media (max-width: 560px) { .form-shell { padding: 22px 18px; } }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

fieldset.kj-field {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px 6px;
  margin: 0 0 20px;
}
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } }
.check-item { display: flex; align-items: flex-start; gap: 9px; padding-bottom: 8px; }
.check-item input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.check-item label { font-weight: 500; margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 22px;
}
.consent-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.consent-row label { font-weight: 400; font-size: 0.92rem; color: var(--ink-soft); }

.bedsize-reveal {
  margin: -2px 0 12px 26px;
  max-width: 260px;
}
.bedsize-reveal label { font-size: 0.85rem; font-weight: 500; }

/* ---------- cross-link to the other landing page ---------- */
.page-foot {
  padding: 24px 20px 44px;
  color: var(--ink-faint);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}
.page-foot a { color: var(--ink-faint); }
.page-foot .foot-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- collections (src/collections.rs, njreid/woodwerx#401) ---------- */
.coll-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--reg-gap);
}
@media (max-width: 700px) { .coll-summary-grid { grid-template-columns: 1fr; } }
.coll-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 20px;
}
.coll-summary-pic { display: block; margin-bottom: 14px; }
.coll-summary h3 { margin-bottom: 2px; }
.coll-summary h3 a { color: var(--ink); text-decoration: none; }
.coll-summary h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.coll-style { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 8px; }
.coll-more { margin-bottom: 0; font-weight: 600; }
.coll-note { margin-top: 20px; font-size: 0.875rem; color: var(--ink-soft); }
.coll-crumb { margin-bottom: 16px; font-size: 0.92rem; }
.coll-page-layout { display: flex; gap: 32px; align-items: flex-start; }
.coll-page-main { flex: 1; min-width: 0; }
.coll-sidenav { flex: none; width: 200px; }
.coll-sidenav-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 0 0 8px; }
.coll-sidenav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.coll-sidenav a { display: block; padding: 6px 10px; border-radius: var(--radius); color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.coll-sidenav a:hover { background: var(--surface-2); color: var(--ink); }
.coll-sidenav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .coll-page-layout { flex-direction: column; gap: 16px; }
  .coll-sidenav { width: 100%; }
  .coll-sidenav ul { flex-direction: row; flex-wrap: wrap; }
}
.coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--reg-gap);
}
@media (max-width: 520px) { .coll-grid { grid-template-columns: repeat(2, 1fr); } }
/* `.coll-card-wrap` carries the box (border/background): the `<a>` inside it (pic/body layout only,
   see `piece_card`'s own doc comment) and the Configure button beside it as a sibling both read as
   "inside the card" this way, even though the button must structurally stay a sibling of the `<a>`,
   not a nested anchor. */
.coll-card-wrap {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.coll-card-wrap:hover { border-color: var(--line-strong); }
.coll-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.coll-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.coll-card-body { padding: 12px 14px 14px; }
.coll-card-body h3 { margin: 0 0 2px; font-size: 1.02rem; }
.coll-cat { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.coll-others { margin-top: 24px; color: var(--ink-soft); }

/* ---------- collection pieces: the expanded view (njreid/woodwerx#427, in-place reflow per #501) ----------
   Expanding a card is a plain grid-column span, not an overlay: the card stays in the grid, grows to the
   full width of .coll-grid (itself inside .wrap, the content column, never the viewport), and the other
   cards reflow around it under CSS Grid's own layout. The only element given a view-transition-name is
   the clicked image (collection.js), so it morphs size/position while the rest of the grid cross-fades to
   its reflowed position — the default View Transitions behaviour for any layout change. */
/* The no-picture card has no wrap (nothing to expand, `piece_card`): it carries its own box, the
   same look `.coll-card-wrap` gives the pictured variant. */
.coll-card--text {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: default;
}
.coll-card--text:hover { border-color: var(--line); }
.coll-dims { margin: 6px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.coll-card-dims { display: none; margin: 6px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.coll-card-history { display: none; margin: 10px 0 0; font-size: 0.9rem; line-height: 1.5; }
.coll-card-price { display: none; margin: 6px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.coll-card-wrap:has(.coll-card--expanded) { grid-column: 1 / -1; }
.coll-card--expanded .coll-card-dims,
.coll-card--expanded .coll-card-history,
.coll-card--expanded .coll-card-price { display: block; }
/* The Configure button (njreid/woodwerx#542) is a plain sibling of the card's own `<a>` inside
   `.coll-card-wrap` (`piece_card`'s own doc comment: never nested inside the `<a>`, so it never
   shares the card's click-to-expand toggle). Hidden by default like `.coll-card-dims` above, it is
   shown purely by this `:has()` selector once `collection.js` marks the `<a>` expanded — no script
   of its own, and no longer a separate grid row below the card: it renders inside the same
   `.coll-card-wrap` border the `<a>` draws. */
.coll-card-configure { display: none; }
.coll-card-wrap:has(.coll-card--expanded) .coll-card-configure {
  display: block;
  padding: 0 14px 14px;
}
@media (min-width: 700px) {
  .coll-card--expanded {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--reg-gap);
    align-items: start;
  }
  .coll-card--expanded .coll-card-body { padding-top: 14px; }
  /* At this width the button docks to the card's own bottom-right corner, over the detail
     column, rather than taking a row of its own below the picture+body grid — the box's height
     stays exactly what the picture and body already need, not stretched to also fit the button
     underneath. `.coll-card-wrap` is the positioning context (position:relative, below). */
  .coll-card-wrap:has(.coll-card--expanded) .coll-card-configure {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 0;
  }
}
::view-transition-group(piece) { animation-duration: 0.32s; animation-timing-function: ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Heirloom hero: the chest video full width, the headline over its left (njreid/woodwerx#427) ----------
   The take keeps the piece in the right half of the frame, so the left is the paper grid; the scrim is the
   page's own --bg, so it follows light, dark and the manual theme toggle with no second rule. */
.landing section.hero--wide { position: relative; padding: 0; overflow: hidden; min-height: clamp(520px, 50vw, 860px); display: flex; align-items: center; }
.hero--wide .hero-stage, .hero--wide .kj-hero-wrap { position: absolute; inset: 0; }
.hero--wide .kj-hero-video {
  height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none;
  object-fit: cover; object-position: right center;
}
.hero--wide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 30%,
    color-mix(in srgb, var(--bg) 55%, transparent) 48%, transparent 66%);
}
.hero--wide .wrap { position: relative; z-index: 1; display: block; padding-top: 56px; padding-bottom: 56px; width: 100%; }
.hero--wide .hero-copy { max-width: 31rem; }
.hero--wide .kj-hero-toggle { z-index: 2; }
/* The label is on a drawing, not a photograph; fixed colours like the render chip, legible on any frame. */
.hero-illus {
  position: absolute; left: 16px; bottom: 12px; z-index: 2; margin: 0;
  padding: 3px 9px; border-radius: 6px; font-size: 0.8125rem; line-height: 1.3; font-weight: 600;
  background: var(--render-chip-bg); color: var(--render-chip-ink);
}
/* A phone has no room to put a headline over a 16:9 picture: the take is a 4:3 crop on the piece, the words
   follow it (as the stacked hero did at this width before). */
@media (max-width: 820px) {
  .landing section.hero--wide { display: block; min-height: 0; }
  .hero--wide .hero-stage, .hero--wide .kj-hero-wrap { position: relative; inset: auto; }
  .hero--wide .kj-hero-video { height: auto; aspect-ratio: 4 / 3; object-position: 82% center; }
  .hero--wide::after { display: none; }
  .hero--wide .wrap { padding-top: 24px; padding-bottom: 36px; }
  .hero-illus { top: 12px; bottom: auto; }
}
