@font-face { font-family: "Archivo"; src: url("./archivo-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("./instrument-sans-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("./ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("./ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* The palette. Change it here: everything below is drawn from these. */
:root {
  --ground: #eeeae3;
  --ground-2: #e5e0d7;
  --ink: #1b1a17;
  --muted: #6b675f;
  --accent: #d2452c;
  --ply: #e8d4ae;
  --dark: #1b1a17;
  --on-dark: #f1ece3;
  --rule: color-mix(in srgb, var(--ink) 14%, transparent);
  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5.5vw, 88px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--ground); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Type */
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 5.6vw, 88px); }
h2 { font-size: clamp(30px, 3.2vw, 48px); }
h3 { font-size: 28px; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.kicker { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }

/* Buttons: square, as the sheet is. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 2px; font-family: var(--f-body); font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background 160ms, color 160ms; }
.btn-ink { background: var(--ink); color: var(--ground); }
.btn-ink:hover { background: var(--accent); }
.btn-line { border-color: currentColor; }
.btn-line:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--on-dark); color: var(--dark); }

/* Nav */
.nav { position: fixed; z-index: 20; inset: 0 0 auto; height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gutter); background: linear-gradient(var(--ground) 55%, color-mix(in srgb, var(--ground) 0%, transparent)); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.mark svg { width: 24px; height: 24px; color: var(--accent); }
.nav nav { display: flex; gap: 28px; font-size: 14px; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }
.nav .btn { justify-self: end; }

/* The stage: one fixed canvas behind the pieces' copy. The iris is a clip-path set by the script. */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 600ms; }
body.canvas-ready .stage-poster { opacity: 0; }

/* The counters: the figure that counts as the picture changes. */
.hud { position: fixed; z-index: 10; right: var(--gutter); top: 92px; width: 250px; font-family: var(--f-mono); font-size: 12px; color: var(--ink); opacity: 0; transform: translateY(8px); transition: opacity 240ms, transform 240ms; pointer-events: none; }
.hud.is-on { opacity: 1; transform: none; }
.hud-name { margin: 0 0 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hud dl { margin: 0; border-top: 1px solid var(--ink); }
.hud dl div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.hud dt { color: var(--muted); letter-spacing: 0.04em; }
.hud dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

/* The pieces: tall sections the canvas builds behind, with copy that steps past it. */
main { position: relative; z-index: 1; }
.piece { position: relative; height: 440vh; }
.step { position: absolute; left: var(--gutter); width: min(440px, 34vw); top: calc(var(--at) * (100% - 100vh) + 26vh); }
.step p { margin: 16px 0 0; color: var(--muted); }
.step h2 + p { margin-top: 18px; }
.step-hero { width: min(620px, 44vw); top: 18vh; }
.step-hero .lede { font-size: 19px; color: var(--ink); max-width: 30em; }
.cue { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 40px !important; }
.price { font-family: var(--f-display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink) !important; }

/* The catalogue, on the page ground again once the iris has closed. */
.catalogue { position: relative; background: var(--ground); padding: 140px var(--gutter) 120px; }
.catalogue-head { max-width: 760px; margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: #f6f3ee; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground-2); border-bottom: 1px solid var(--rule); }
.card-body { padding: 24px; }
.card table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 14px; }
.card th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 0; border-top: 1px solid var(--rule); }
.card td { text-align: right; font-family: var(--f-mono); font-size: 13px; padding: 8px 0; border-top: 1px solid var(--rule); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.card-foot strong { font-family: var(--f-display); font-size: 28px; letter-spacing: -0.03em; }

/* The flip: the one place the ground turns dark, for the order. */
.order { position: relative; background: var(--dark); color: var(--on-dark); padding: 140px var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 80px; align-items: start; }
.order-copy p:last-child { color: color-mix(in srgb, var(--on-dark) 68%, transparent); max-width: 32em; }
.order-form { display: grid; gap: 8px; }
.order-form label { font-size: 13px; color: color-mix(in srgb, var(--on-dark) 70%, transparent); margin-top: 10px; }
.order-form input, .order-form select { height: 48px; padding: 0 14px; border-radius: 2px; border: 1px solid color-mix(in srgb, var(--on-dark) 26%, transparent); background: transparent; color: var(--on-dark); font: inherit; }
.order-form select option { color: var(--ink); }
.order-form input:focus, .order-form select:focus { border-color: var(--accent); outline: none; }
.order-form .btn { margin-top: 20px; height: 52px; }
.order-done { grid-column: 2; border-top: 2px solid var(--accent); padding-top: 20px; }
.order-done p { color: color-mix(in srgb, var(--on-dark) 75%, transparent); }
.foot { position: relative; background: var(--dark); color: color-mix(in srgb, var(--on-dark) 60%, transparent); border-top: 1px solid color-mix(in srgb, var(--on-dark) 14%, transparent); padding: 28px var(--gutter); display: flex; justify-content: space-between; gap: 20px; font-size: 14px; }
.foot nav { display: flex; gap: 22px; }
.foot a { text-decoration: none; }

/* Reveal once, 16px up. */
.has-motion .rise { opacity: 0; transform: translateY(16px); transition: opacity 600ms cubic-bezier(0.2, 0, 0, 1), transform 600ms cubic-bezier(0.2, 0, 0, 1); }
.has-motion .rise.is-in { opacity: 1; transform: none; }

/* The gallery recording shows the builds with the counters and a title, and none of the scrolling copy. */
.rec-title { display: none; }
.recording .step, .recording .catalogue, .recording .order, .recording .foot, .recording .nav nav { display: none; }
.recording .rec-title { display: grid; gap: 6px; position: fixed; z-index: 10; left: var(--gutter); bottom: 40px; }
.recording .rec-title span { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.recording .rec-title strong { font-family: var(--f-display); font-size: 64px; letter-spacing: -0.04em; line-height: 1; }
.recording .rec-title em { font-style: normal; font-family: var(--f-display); font-size: 28px; font-weight: 700; color: var(--muted); }
.recording .hud { transition: none; left: var(--gutter); right: auto; top: 84px; width: 230px; }
.recording .nav { grid-template-columns: 1fr auto; }

@media (max-width: 899px) {
  .nav nav { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .hud { left: 20px; right: 20px; width: auto; top: 70px; bottom: auto; }
  .hud-name { margin-bottom: 6px; }
  .hud dl { display: grid; grid-template-columns: repeat(4, auto); gap: 0 14px; border-top: 0; }
  .hud dl div { display: grid; border: 0; padding: 0; }
  .hud dt { font-size: 10px; }
  /* The copy sits in a panel on the page ground beneath the picture, one step at a time (set by the script). */
  .step, .step-hero { position: fixed; z-index: 5; left: 0; right: 0; top: auto; bottom: 0; width: auto; min-height: 40svh; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 2px solid var(--accent); opacity: 0; visibility: hidden; transition: opacity 240ms, visibility 0s 240ms; }
  .step.is-current { opacity: 1; visibility: visible; transition: opacity 240ms; }
  .has-motion .step.rise { transform: none; }
  .has-motion .step.rise:not(.is-current) { opacity: 0; }
  .has-motion .step.rise.is-current { opacity: 1; }
  .step h2 { font-size: 28px; }
  .step p { margin-top: 12px; font-size: 16px; }
  .step .price { font-size: 26px; margin-top: 10px; }
  .step-hero .lede { font-size: 16px; }
  .cue { margin-top: 18px !important; }
  h1 { font-size: clamp(36px, 10vw, 52px); }
  .cards { grid-template-columns: 1fr; }
  .order { grid-template-columns: 1fr; gap: 40px; padding: 96px 20px; }
  .order-done { grid-column: 1; }
  .catalogue { padding: 96px 20px; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hud, .stage-poster, .btn { transition: none; }
}
