/* Charmie. Direction: "The object, large" (tasteskill seed 15569545), type Sentient, palette "Three stones". */

@font-face { font-family: "Sentient"; src: url("/fonts/sentient-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Sentient"; src: url("/fonts/sentient-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sentient"; src: url("/fonts/sentient-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #eeecea;
  --surface: #e4e1dd;
  --ink: #333231;
  --muted: #5f5b57;
  --accent: #5c6b54;
  --accent-press: #4c5946;
  --accent-ink: #ffffff;
  --field: #cdc3b6;
  --night: #1b1a19;
  --paper: #f2f2f0;

  --graphite: #4c4c4c;
  --burgundy: #59262e;
  --iceblue: #dfe8f5;
  --silver: #f2f2f2;

  /* five sizes */
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.5rem, 1rem + 12vw, 13rem);

  --margin: clamp(20px, 3.9vw, 56px);
  --gap: clamp(120px, 14vw, 200px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.55 "Sentient", Georgia, serif;
  font-kerning: normal; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--field); color: var(--ink); }
button { font: inherit; color: inherit; }

h2 { font-weight: 300; font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.015em; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-size: var(--step-small); font-weight: 500; letter-spacing: 0.01em; cursor: pointer;
  transition: background-color 200ms var(--ease), transform 200ms var(--ease);
}
.button:hover { background: var(--accent-press); text-decoration: none; }
.button:active { transform: scale(0.97); }

/* ---------- hero: the specimen, large ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; overflow: hidden; }
.hero-left { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 40px); padding: var(--margin); }
.wordmark {
  font-weight: 300; font-size: clamp(4.5rem, 11.5vw, 11rem); line-height: 0.82; letter-spacing: -0.04em;
  margin-left: -0.04em;
}
.hero-say { max-width: 27rem; display: grid; gap: 24px; justify-items: start; }
.hero-line { font-size: var(--step-lead); line-height: 1.35; }
.hero-pick { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.pick-label { font-size: var(--step-small); color: var(--muted); }
.names { display: grid; gap: 4px; }
.name {
  background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left;
  font-size: var(--step-lead); font-weight: 300; line-height: 1.2; color: var(--muted); opacity: 0.55;
  transition: opacity 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease);
}
.name:hover { opacity: 0.85; }
.name[aria-pressed="true"] { color: var(--ink); opacity: 1; font-size: var(--step-head); transform: translateX(0); }
.hero-fact { font-size: var(--step-small); color: var(--muted); max-width: 22rem; }
.hero-links { display: flex; gap: 24px; font-size: var(--step-small); margin-top: auto; }

.specimen { position: relative; min-height: 100svh; overflow: hidden; } /* bleeds off the top, right and bottom */
.specimen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1600ms var(--ease);
}
.specimen img.on { opacity: 1; }

/* ---------- intro ---------- */
.intro {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px);
  padding: var(--gap) var(--margin) 0; align-items: end;
}
.intro-text { display: grid; gap: 1.1em; max-width: 26rem; }
.intro-text h2 { margin-bottom: 0.3em; }
.intro-text .first { font-weight: 500; }
.intro-photo { overflow: hidden; }
.intro-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transform: scale(1.06); transition: transform 2400ms var(--ease); }
.intro-photo.in img { transform: scale(1); }

/* ---------- closer: one frame, three distances ---------- */
.closer { position: relative; height: 320vh; margin-top: var(--gap); }
.closer-stage {
  position: sticky; top: 0; height: 100svh; display: grid; place-items: center;
  grid-template-rows: 1fr auto 1fr; padding: 24px var(--margin); overflow: hidden;
}
.closer-h { display: contents; }
.closer-a, .closer-b { font-weight: 300; font-size: clamp(3rem, 7vw, 7.5rem); line-height: 1; letter-spacing: -0.03em; text-align: center; }
.closer-a { grid-row: 1; align-self: end; padding-bottom: 0.2em; }
.closer-frame { grid-row: 2; }
.closer-b { grid-row: 3; align-self: start; padding-top: 0.2em; opacity: 0.2; transition: opacity 700ms var(--ease); }
.closer-stage[data-stage="2"] .closer-b, .closer-stage[data-stage="3"] .closer-b { opacity: 1; }
.closer-frame { width: min(34vw, 46svh); aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.closer-frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 53% 70%; transition: transform 900ms var(--ease); }
.closer-stage[data-stage="2"] .closer-frame img { transform: scale(2.2); transform-origin: 53% 70%; }
.closer-stage[data-stage="3"] .closer-frame img { transform: scale(3.4); transform-origin: 53% 53%; }
.closer-notes { position: absolute; right: var(--margin); top: 50%; transform: translateY(-50%); width: min(24ch, 22vw); font-size: var(--step-body); }
.closer-notes p { position: absolute; top: 0; left: 0; right: 0; opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.closer-stage[data-stage="1"] [data-note="1"],
.closer-stage[data-stage="2"] [data-note="2"],
.closer-stage[data-stage="3"] [data-note="3"] { opacity: 1; transform: none; }
.closer-marks { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-rows: 1fr 1fr 1fr; }

/* ---------- what it does ---------- */
.does {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px);
  padding: var(--gap) var(--margin) 0 0; align-items: start;
}
.does-photo { position: sticky; top: 6svh; height: 82svh; overflow: hidden; margin-left: -12%; border-radius: 999px 999px 0 0 / 34% 34% 0 0; } /* Charmie's own arch */
.does-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 26% 50%; }
.does-body { padding-top: 2svh; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; margin-top: 56px; }
.points h3 { font-size: var(--step-body); font-weight: 500; line-height: 1.3; margin-bottom: 8px; }
.points p { font-size: var(--step-small); color: var(--muted); line-height: 1.5; }
.arch { display: inline-block; width: 0.62em; height: 0.82em; border-radius: 0.31em 0.31em 0.08em 0.08em; margin-right: 0.45em; vertical-align: -0.08em; }
.c1 { background: var(--burgundy); }
.c2 { background: var(--accent); }
.c3 { background: var(--graphite); }

/* ---------- rhythm band ---------- */
.rhythm { margin-top: var(--gap); }
.band { background: var(--field); height: 34vh; min-height: 200px; display: flex; align-items: center; overflow: hidden; }
.band-track { display: flex; white-space: nowrap; animation: drift 60s linear infinite; }
.band-track span { font-weight: 300; font-size: clamp(3rem, 8vw, 8rem); letter-spacing: -0.03em; line-height: 1; padding-right: 0.5em; }
.band-track span::after { content: ""; display: inline-block; width: 0.18em; height: 0.18em; border-radius: 50%; background: var(--ink); margin-left: 0.5em; vertical-align: 0.22em; }
@keyframes drift { to { transform: translateX(-50%); } }
.rhythm-h { font-size: var(--step-lead); font-weight: 400; line-height: 1.35; padding: 28px var(--margin) 0; max-width: 34rem; }

/* ---------- at home: strip of frames ---------- */
.home { margin-top: var(--gap); position: relative; }
.home-h { font-size: var(--step-lead); font-weight: 400; padding: 0 var(--margin); position: relative; z-index: 2; margin-bottom: -12px; }
.home-h span { color: var(--muted); margin-left: 0.4em; }
.strip {
  display: flex; gap: 4vw; overflow-x: auto; padding: 0 var(--margin) 8px; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: 0 0 auto; width: clamp(220px, 21vw, 340px); aspect-ratio: 4 / 5; overflow: hidden; scroll-snap-align: start; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 450ms var(--ease); }
.strip figure:hover img { transform: scale(1.06); }

/* ---------- questions ---------- */
.questions { padding: var(--gap) var(--margin) 0; }
.questions h2 { font-size: clamp(2.5rem, 5.5vw, 6rem); max-width: 14ch; }
.qs { margin: 80px 0 0 33%; display: grid; gap: 12px; }
.qs details { padding: 20px 24px; margin: 0 -24px; transition: background-color 300ms var(--ease); }
.qs details[open] { background: var(--surface); }
.qs summary { font-size: var(--step-lead); line-height: 1.3; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin: 0.45em 4px 0 0;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
  transition: transform 300ms var(--ease);
}
.qs details[open] summary::after { transform: rotate(-135deg); }
.qs details p { max-width: 48ch; margin-top: 14px; }

/* ---------- join: the object returns, in 3D ---------- */
.join {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px);
  margin-top: var(--gap); background: var(--surface); padding: clamp(48px, 6vw, 96px) var(--margin);
  align-items: center; min-height: 90svh;
}
.join-object { position: relative; }
model-viewer { width: 100%; height: min(78svh, 760px); background: transparent; --poster-color: transparent; }
.mv-poster { width: 60%; margin: 10% auto; mix-blend-mode: multiply; }
.turn { font-size: var(--step-small); color: var(--muted); text-align: center; }
.join-text { display: grid; gap: 22px; align-content: center; max-width: 30rem; }
.join-fact { font-size: var(--step-lead); }
.join-fact strong { font-weight: 500; }
.swatches { display: flex; gap: 14px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  transition: transform 200ms var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 4px; }
.swatch[data-colour="graphite"] { background: var(--graphite); }
.swatch[data-colour="burgundy"] { background: var(--burgundy); }
.swatch[data-colour="iceblue"] { background: #c9d8ee; }
.swatch[data-colour="silver"] { background: #fbfbfa; border: 2px solid #d3cec8; }

.form { display: grid; gap: 14px; margin-top: 8px; }
.form label[for="email"] { font-size: var(--step-small); color: var(--muted); }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 14rem; min-height: 52px; padding: 0 20px; font: inherit; font-size: var(--step-body); color: var(--ink);
  background: var(--bg); border: 1px solid #c9c4be; border-radius: 999px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step-small); line-height: 1.5; color: var(--ink); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: honeypot, not a rule */
.status { min-height: 1.5em; font-size: var(--step-body); }
.status.ok { color: var(--accent-press); font-weight: 500; }
.status.err { color: var(--burgundy); }

/* ---------- footer: the name across the last photograph ---------- */
.foot { position: relative; min-height: 100svh; color: var(--paper); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.foot-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; filter: brightness(0.62); }
.foot-top, .foot-bottom { position: relative; padding: 32px var(--margin); }
.foot-top { display: flex; justify-content: space-between; gap: 24px; font-size: var(--step-body); }
.foot-top nav { display: flex; gap: 24px; }
.foot-name { font-weight: 300; font-size: clamp(5rem, 21vw, 22rem); line-height: 0.8; letter-spacing: -0.045em; margin-left: -0.05em; }
.legal { font-size: var(--step-small); margin-top: 20px; opacity: 0.85; }

/* ---------- entrances (only when script runs) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .intro-photo[data-reveal] { transform: none; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .hero { display: flex; flex-direction: column; padding-bottom: 32px; }
  .hero-left { display: contents; }
  .wordmark { font-size: 23vw; order: 1; padding: var(--margin) var(--margin) 0; }
  .hero-say { order: 2; padding: 18px var(--margin) 0; }
  .specimen { order: 3; min-height: 0; aspect-ratio: 4 / 5; margin-top: 28px; }
  .hero-pick { order: 4; padding: 20px var(--margin) 0; }
  .names { display: flex; flex-wrap: wrap; gap: 2px 20px; }
  .name[aria-pressed="true"] { font-size: var(--step-lead); }
  .hero-links { display: none; }

  .intro { grid-template-columns: 1fr; }
  .intro-text { max-width: none; }
  .closer { height: 300vh; }
  .closer-frame { width: 70vw; }
  .closer-a, .closer-b { font-size: 12vw; }
  .closer-notes { position: absolute; left: var(--margin); right: var(--margin); top: auto; bottom: 4svh; transform: none; width: auto; text-align: center; font-size: var(--step-small); min-height: 4.5em; }

  .does { grid-template-columns: 1fr; padding: var(--gap) var(--margin) 0; }
  .does-photo { position: relative; top: 0; height: 60svh; width: 82vw; margin-left: calc(-1 * var(--margin)); }
  .points { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }

  .home-h { margin-bottom: 16px; }
  .band { height: 22vh; }
  .band-track span { font-size: 15vw; }
  .qs { margin: 40px 0 0; }
  .qs details { margin: 0 calc(-1 * var(--margin)); padding: 18px var(--margin); }
  .join { grid-template-columns: 1fr; min-height: 0; align-content: start; gap: 24px; }
  .join-text { order: -1; max-width: none; }
  model-viewer { height: 48svh; }
  .foot { min-height: 88svh; }
  .foot-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
