/* ============================================================================
   demo.huntlog.xyz — the home only (linked by index.html, nowhere else).
   ----------------------------------------------------------------------------
   Four movements: a magazine COVER (ink), the TECHNIQUE (ink, real figures),
   the DESIGN board (paper, live studies driven by home.js), the CALL (orange).
   Shared chrome, the FAQ and the tokens (--signal, --sky, --ink, --brand-*,
   the --bg and --text families) come from showcase.css and the vendored
   token files.
   ========================================================================== */


:root {
  /* The design studies are ARTWORKS, each with the palette it demonstrates.
     Their colours are named here once, never inside a rule. */
  --st-mint: #BFE8D6; --st-orange: #FF8A3D; --st-pink: #F6B6D2; --st-sky: #9ED8F5;
  --st-stone: #ECEAE6; --st-lime: #C8F25B;
  --st-chip-1: #0B1A1E; --st-chip-2: #1E5A4E; --st-chip-3: #45C48A; --st-chip-4: #A9E6C2; --st-chip-5: #E7EEF0;
}


/* ----------------------------------------------------------------- cover -- */
.cover {
  position: relative;
  background: var(--ink);
  color: var(--brand-surface);
  padding-top: clamp(5rem, 10vh, 6.5rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
}
/* On a desktop the cover IS the first screen: it fills the viewport, the
   stage takes the height that is left (25rem = header, meta row, cover lines)
   and the lines sit on the bottom edge. A phone keeps the natural flow. */
@media (min-width: 900px) {
  .cover { min-height: 100svh; display: flex; flex-direction: column; }
  .cover .cover__stage { --w: min(84vw, 1040px, max(420px, calc((100svh - 30rem) * 1.293))); }
  .cover .cover__lines { margin-top: auto; }
}
.cover__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--brand-surface-rgb), 0.7);
  border-block: 1px solid rgba(var(--brand-surface-rgb), 0.22);
  padding-block: 0.6rem;
}
@media (max-width: 560px) { .cover__meta span:nth-child(2) { display: none; } }

/* The stage: a window onto the photo between 22% and 80% of its height. The
   photo and its cut-out are laid out identically (same width, same offset), so
   the climber lines up with himself; only the frame clips. */
.cover__stage {
  --w: min(600px, 84vw);
  position: relative;
  width: var(--w);
  aspect-ratio: 1 / 0.7733;
  margin: clamp(2rem, 5vh, 3.5rem) auto clamp(3rem, 7vh, 4.5rem);
}
.cover__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: clamp(18px, 3vw, 32px);
  background: var(--signal);
  /* the sunset spills onto the page, so the feet that leave the frame read
     against light instead of vanishing into the ink */
  box-shadow: 0 50px 140px -50px rgba(var(--signal-rgb), 0.7);
}
.cover__bg,
.cover__fig {
  position: absolute;
  left: 0;
  top: -37.93%;
  width: 100%;
  height: auto;
  max-width: none;
}
.cover__fig { z-index: 2; pointer-events: none; will-change: transform; }
/* the word's ghost over the climber: outline + a whisper of fill */
.cover__word.cover__word--ghost {
  z-index: 3;
  color: rgba(var(--sky-rgb), 0.42);
  -webkit-text-stroke: 2px var(--sky);
  pointer-events: none;
}
.cover__word {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(5rem, min(21vw, calc(var(--w) * 0.5)), 19rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sky);
}
.cover__lines {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
}
.cover__text { display: grid; gap: 0.8rem; max-width: 40rem; }
.cover__title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cover__lead {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.5;
  color: rgba(var(--brand-surface-rgb), 0.78);
}
.cover__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: flex-end; }
.cover__cta,
.home-call__btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1rem 1.6rem;
  font-weight: 700;
  background: var(--signal-cta);
  color: var(--signal-on);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.cover__cta:hover { transform: translateY(-2px); }
.cover__works { font-weight: 600; border-bottom: 2px solid var(--sky); padding-bottom: 2px; }
.cover__works:hover { color: var(--sky); }
@media (max-width: 760px) {
  .cover__lines { grid-template-columns: 1fr; }
  .cover__actions { justify-content: flex-start; }
}

/* ------------------------------------------------------- section heads -- */
.home-head { display: grid; gap: 1rem; max-width: 52rem; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.home-head__label { margin: 0; font-weight: 700; color: var(--signal-ink); }
.home-head__title {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.home-head__lead { margin: 0; max-width: 40rem; font-size: 1.1rem; line-height: 1.55; color: var(--text-secondary); }

/* ------------------------------------------------------------- technique -- */
/* Sky in both themes: the cover is ink, the design board paper, the close
   orange — so scrolling walks through the whole palette and the cover has an
   end. The big figures use the AA orange (~4.3:1 on sky, large type). */
.home-tech { background: var(--sky); color: var(--ink); padding-block: clamp(4.5rem, 11vh, 8rem); }
.home-tech .home-head__label { color: var(--sky-ink); }
.home-tech .home-head__lead { color: rgba(var(--ink-rgb), 0.74); }
.home-tech__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
@media (max-width: 1000px) { .home-tech__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .home-tech__grid { grid-template-columns: 1fr; } }
.tech-metric { display: grid; gap: 0.7rem; align-content: start; padding-top: 1.1rem; border-top: 2px solid var(--ink); min-width: 0; }
.tech-metric__name { margin: 0; font-size: 1.05rem; font-weight: 700; }
.tech-metric__value {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(5rem, 9vw, 8rem);
  line-height: 0.85;
  color: var(--signal-ink);
  font-variant-numeric: tabular-nums;
}
.tech-metric__value small { font-size: 0.32em; font-stretch: 100%; color: rgba(var(--ink-rgb), 0.55); margin-left: 0.15em; }
.tech-metric__text { margin: 0; color: rgba(var(--ink-rgb), 0.82); line-height: 1.5; }
.tech-metric__src { margin: 0; font-size: 0.82rem; color: rgba(var(--ink-rgb), 0.62); }
.tech-metric--geo { border-top-color: var(--signal-ink); }
.geo-ask { display: grid; gap: 0.8rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(var(--brand-white-rgb), 0.55); border: 1px solid rgba(var(--ink-rgb), 0.12); }
.geo-ask__fields { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 0.7rem; align-items: center; font-size: 0.85rem; }
.geo-ask__fields label { color: rgba(var(--ink-rgb), 0.7); }
.geo-ask__fields input {
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--ink-rgb), 0.22);
  background: var(--brand-white);
  color: var(--ink);
}
.geo-ask__fields input:focus { border-color: var(--ink); outline: none; }
.geo-ask__q { font-size: 1.05rem; line-height: 1.4; quotes: "«" "»"; }
.geo-ask__copy {
  justify-self: start;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: var(--brand-surface);
  cursor: pointer;
}
.geo-ask__copy:hover, .geo-ask__copy.is-done { background: var(--signal); color: var(--signal-on); }
.home-tech__rest { margin: clamp(2.5rem, 6vh, 4rem) 0 0; max-width: 46rem; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; color: rgba(var(--ink-rgb), 0.85); }

/* ---------------------------------------------------------------- design -- */
.home-design { background: var(--bg-primary); padding-block: clamp(4.5rem, 11vh, 8rem); }
.design-board { columns: 3 300px; column-gap: clamp(1rem, 2vw, 1.5rem); }
.design-study { break-inside: avoid; margin: 0 0 clamp(1rem, 2vw, 1.5rem); }
.design-study figcaption { padding: 0.75rem 0.2rem 0; font-weight: 700; font-size: 0.95rem; }
.design-study figcaption span { display: block; font-weight: 400; color: var(--text-secondary); }
.design-study > div { border-radius: 24px; overflow: hidden; position: relative; }
.home-design__note { margin: 1rem 0 0; font-size: 0.85rem; color: var(--text-secondary); }
.design-study button { font: inherit; cursor: pointer; }

/* palette: four strips; the focused one widens. */
.palette-swatches { display: flex; height: 320px; background: var(--ink); }
.palette-swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0.7rem;
  border: 0;
  text-align: left;
  transition: flex 0.5s var(--ease);
}
.palette-swatch:hover, .palette-swatch:focus-visible { flex: 2.4; }
.palette-swatch__name { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-cond); font-weight: 800; font-stretch: 75%; font-size: 2.2rem; line-height: 1; }
.palette-swatch__hex { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.palette-swatch--1 { background: var(--ink); color: var(--brand-surface); }
.palette-swatch--2 { background: var(--signal); color: var(--ink); }
.palette-swatch--3 { background: var(--brand-white); color: var(--ink); }
.palette-swatch--4 { background: var(--sky); color: var(--ink); }
.palette-swatch.is-copied .palette-swatch__hex::after { content: " ✓"; }

/* extract: the photo and the colours the browser pulled out of it. */
.palette-extract { background: var(--ink); }
.palette-extract__img { width: 100%; height: auto; display: block; }
.palette-extract__chips { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.extract-chip { flex: 1; height: 86px; display: flex; align-items: flex-end; padding: 0.5rem; background: var(--chip); transition: background 0.6s var(--ease); }
.extract-chip span { font-size: 0.68rem; font-weight: 600; color: var(--chip-ink, var(--brand-white)); }
.extract-chip--1 { --chip: var(--st-chip-1); } .extract-chip--2 { --chip: var(--st-chip-2); } .extract-chip--3 { --chip: var(--st-chip-3); }
.extract-chip--4 { --chip: var(--st-chip-4); --chip-ink: var(--ink); } .extract-chip--5 { --chip: var(--st-chip-5); --chip-ink: var(--ink); }

/* type: one face, two live axes. */
.type-specimen {
  --wght: 800; --wdth: 80;
  padding: 1.6rem 1.4rem 1.4rem;
  color: var(--brand-surface);
  background: linear-gradient(170deg, var(--ink) 0%, var(--ink) 45%, var(--signal) 100%);
}
.type-specimen__name { margin: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.7; }
.type-specimen__sample {
  margin: 0.8rem 0 1.4rem;
  font-family: var(--font-cond);
  font-weight: var(--wght);
  font-stretch: calc(var(--wdth) * 1%);
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  line-height: 0.95;
  min-height: 2em;
}
.type-specimen__axes { display: grid; grid-template-columns: 1fr; gap: 0.35rem; font-size: 0.85rem; }
.type-specimen__axes label { display: flex; justify-content: space-between; font-weight: 600; }
.type-specimen__axes input { width: 100%; accent-color: var(--sky); margin-bottom: 0.6rem; }

/* app: a phone with a dial and coloured rows. */
.app-phone { background: var(--st-stone); padding: 1.2rem; display: grid; gap: 1rem; color: var(--ink); }
.app-phone__dial { position: relative; display: grid; place-items: center; background: var(--brand-white); border-radius: 22px; padding: 1rem; }
.app-phone__dial svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.app-dial__track { fill: none; stroke: var(--st-stone); stroke-width: 10; }
.app-dial__arc { --p: 60; fill: none; stroke: var(--signal); stroke-width: 10; stroke-linecap: round; stroke-dasharray: var(--p) 100; transition: stroke-dasharray 0.7s var(--ease); }
.app-phone__value { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -62%); margin: 0; font-family: var(--font-cond); font-weight: 800; font-stretch: 75%; font-size: 2.6rem; line-height: 1; }
.app-phone__value small { font-size: 0.5em; }
.app-phone__label { margin: 0.3rem 0 0; font-weight: 700; font-size: 0.9rem; }
.app-phone__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.app-row { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border: 0; border-radius: 16px; color: var(--ink); font-weight: 600; transition: transform 0.2s var(--ease); }
.app-row b { font-family: var(--font-cond); font-stretch: 75%; font-size: 1.3rem; }
.app-row[aria-pressed="true"] { transform: translateX(6px); box-shadow: inset 0 0 0 2px var(--ink); }
.app-row--1 { background: var(--st-mint); } .app-row--2 { background: var(--st-orange); } .app-row--3 { background: var(--st-pink); }
.app-row--4 { background: var(--st-sky); } .app-row--5 { background: var(--st-lime); }

/* profile: three tones of one portrait, fanned out on hover. */
.profile-cards { display: grid; place-items: center; height: 360px; background: var(--st-stone); }
.profile-card {
  grid-area: 1 / 1;
  width: 36%;
  background: var(--brand-white);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.5rem 0.5rem 0.8rem;
  box-shadow: 0 18px 40px -20px rgba(15, 13, 11, 0.45);
  transition: transform 0.55s var(--ease);
}
/* height:auto — the width/height attributes would otherwise pin the height
   and the aspect-ratio would never apply */
.profile-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 35% 70%; border-radius: 12px; display: block; }
.profile-card--mono img { filter: grayscale(1) contrast(1.1); }
.profile-card--warm img { filter: sepia(0.35) saturate(1.2); }
.profile-card--cool img { filter: hue-rotate(160deg) saturate(0.7); }
.profile-card__name { margin: 0.5rem 0 0; font-weight: 700; font-size: 0.85rem; }
.profile-card__role { margin: 0; font-size: 0.75rem; color: var(--ink); opacity: 0.6; }
.profile-card__follow { margin-top: 0.5rem; width: 100%; padding: 0.4rem; border-radius: 999px; border: 0; background: var(--ink); color: var(--brand-white); font-size: 0.78rem; font-weight: 700; }
.profile-card__follow[aria-pressed="true"] { background: var(--signal); color: var(--ink); }
.profile-card--mono { transform: rotate(-7deg) translateX(-14%); }
.profile-card--cool { transform: rotate(7deg) translateX(14%); }
.profile-card--warm { z-index: 1; }
.profile-cards:hover .profile-card--mono, .profile-cards:focus-within .profile-card--mono { transform: rotate(-10deg) translateX(-58%); }
.profile-cards:hover .profile-card--cool, .profile-cards:focus-within .profile-card--cool { transform: rotate(10deg) translateX(58%); }
.profile-cards:hover .profile-card--warm, .profile-cards:focus-within .profile-card--warm { transform: translateY(-6%); }

/* rings: three activity rings on a warm blur. */
.design-rings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.2rem;
  align-items: center;
  padding: 1.4rem;
  color: var(--brand-surface);
  background:
    radial-gradient(circle at 15% 20%, var(--st-orange), transparent 55%),
    radial-gradient(circle at 85% 30%, var(--st-pink), transparent 50%),
    radial-gradient(circle at 60% 90%, var(--st-sky), transparent 55%),
    var(--ink);
}
.design-rings svg { width: 150px; height: 150px; transform: rotate(-90deg); background: var(--ink); border-radius: 50%; padding: 4px; }
.rings-arc__track { fill: none; stroke: rgba(var(--brand-surface-rgb), 0.12); stroke-width: 12; }
.rings-arc { --p: 0; fill: none; stroke-width: 12; stroke-linecap: round; stroke-dasharray: var(--p) 100; transition: stroke-dasharray 1.1s var(--ease); }
/* resting values (what the legend says); home.js animates them in from 0 */
.rings-arc--1 { --p: 72; stroke: var(--signal); } .rings-arc--2 { --p: 21; stroke: var(--st-lime); } .rings-arc--3 { --p: 52; stroke: var(--sky); }
.design-rings__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.design-rings__legend b { font-family: var(--font-cond); font-stretch: 75%; font-size: 1.4rem; margin-right: 0.3rem; }
.design-rings__item--1 b { color: var(--signal); } .design-rings__item--2 b { color: var(--st-lime); } .design-rings__item--3 b { color: var(--sky); }
.design-rings__shuffle { grid-column: 1 / -1; justify-self: start; padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid rgba(var(--brand-surface-rgb), 0.4); background: rgba(var(--brand-surface-rgb), 0.08); color: var(--brand-surface); font-size: 0.85rem; font-weight: 600; }

/* folio: a brutalist grid in mono. */
.design-folio { background: var(--st-stone); color: var(--ink); padding: 1rem; font-family: var(--font-mono); }
.design-folio__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 0.8rem; font-size: 0.7rem; text-transform: uppercase; }
.design-folio__head b { font-family: var(--font-cond); font-stretch: 62%; font-weight: 900; font-size: 2.8rem; letter-spacing: 0.02em; line-height: 0.9; }
.design-folio__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.design-folio__grid li { position: relative; padding: 1.6rem 0.6rem 0.9rem; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); font-weight: 700; font-size: 0.95rem; text-align: center; transition: background 0.2s, color 0.2s; }
.design-folio__grid li:hover { background: var(--ink); color: var(--signal); }
.design-folio__no { position: absolute; left: 0.5rem; top: 0.4rem; font-size: 0.62rem; font-weight: 400; }

/* product: one card, three sizes. */
.design-product { display: grid; grid-template-columns: 0.9fr 1fr; background: var(--brand-white); color: var(--ink); border: 1px solid var(--border); }
.design-product__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.design-product__body { display: grid; align-content: center; gap: 0.6rem; padding: 1.1rem; }
.design-product__name { margin: 0; font-family: var(--font-cond); font-weight: 800; font-stretch: 75%; font-size: 1.7rem; line-height: 1; }
.design-product__price { margin: 0; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.design-product__sizes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.design-product__sizes button { padding: 0.35rem 0.6rem; border-radius: 999px; border: 1px solid rgba(15, 13, 11, 0.25); background: transparent; color: var(--ink); font-size: 0.78rem; }
.design-product__sizes button[aria-pressed="true"] { background: var(--ink); color: var(--brand-white); border-color: var(--ink); }
.design-product__add { margin-top: 0.3rem; padding: 0.6rem; border-radius: 999px; border: 0; background: var(--signal); color: var(--ink); font-weight: 700; }
.design-product__add.is-done { background: var(--sky); }

/* editorial: a magazine page that leans toward the pointer. */
.design-mag { background: var(--ink); color: var(--brand-surface); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s var(--ease); }
.design-mag img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; filter: saturate(1.15); }
/* a dark veil under the headline only: the bike's bright tones sat right
   behind the white type. It fades out by mid-height, so the photo above
   stays untouched. */
.design-mag::after {
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(to top, rgba(var(--brand-ink-rgb), 0.82), rgba(var(--brand-ink-rgb), 0));
  pointer-events: none;
}
.design-mag__head { z-index: 1; }
.design-mag__kicker { position: absolute; top: 1rem; left: 1rem; margin: 0; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--signal); color: var(--ink); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.design-mag__head { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; margin: 0; font-family: var(--font-cond); font-weight: 900; font-stretch: 62%; font-size: clamp(2.6rem, 4.6vw, 3.6rem); line-height: 0.88; text-transform: uppercase; color: var(--brand-white); text-shadow: 0 2px 24px rgba(15, 13, 11, 0.5); }

/* ------------------------------------------------------------------ call -- */
.home-call { background: var(--signal); color: var(--ink); padding-block: clamp(4.5rem, 12vh, 8.5rem); }
.home-call__title { margin: 0; font-family: var(--font-cond); font-weight: 900; font-stretch: 62%; font-size: clamp(4rem, 13vw, 12rem); line-height: 0.85; text-transform: uppercase; letter-spacing: -0.005em; text-wrap: balance; }
.home-call__row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.home-call__sub { margin: 0; max-width: 34rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.home-call__btn { background: var(--ink); color: var(--brand-surface); }
.home-call__btn:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .palette-swatch, .extract-chip, .app-dial__arc, .app-row, .profile-card, .rings-arc, .design-mag, .cover__cta, .home-call__btn { transition: none; }
  .cover__fig { will-change: auto; }
}
