/* The seat that cleans itself · an early ALLOIC design.
   ALLOIC's own look: white ground, near-black ink, copper on the one action, General Sans. */

:root {
  --bg: #ffffff;
  --surface: #f1f0ed;
  --surface-2: #e2dfda;
  --ink: #111111;
  --muted: #57534e;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-ink: #ffffff;
  --inv-bg: #111111;
  --inv-ink: #f5f5f3;
  --stage: #d9d5d0;

  --font: "General Sans", "General Sans Fallback", "Helvetica Neue", Arial, sans-serif;

  --small: 1rem;
  --body: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --lead: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  --head: clamp(2.5rem, 1.2rem + 4vw, 4.75rem);
  --display: clamp(4.5rem, 13vw, 13.125rem);

  --margin: clamp(1.25rem, 2.4vw, 2.5rem);
  --gutter: clamp(1rem, 1.6vw, 1.75rem);
  --section: clamp(6rem, 10vw, 10rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.3, 1);
}

@font-face { font-family: "General Sans Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 98%; ascent-override: 98%; descent-override: 24%; line-gap-override: 0%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, canvas, picture { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
h2 { font-size: var(--head); font-weight: 600; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-size: var(--lead); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: absolute; left: var(--margin); top: -100px; z-index: 20; background: var(--ink); color: var(--inv-ink); padding: 12px 16px; }
.skip:focus { top: 12px; }

.button { display: inline-block; border: 0; border-radius: 0; background: var(--accent); color: var(--accent-ink); font: 600 var(--body)/1 var(--font); letter-spacing: -0.01em; padding: 1.15em 1.6em; text-decoration: none; cursor: pointer; transition: transform 100ms var(--ease-out), background-color 180ms ease; }
.button:active { transform: scale(0.97); }
.button[disabled] { cursor: progress; background: var(--ink); }
@media (hover: hover) and (pointer: fine) { .button:not([disabled]):hover { background: var(--accent-hover); } }

/* ---------- top ---------- */
.top { position: absolute; top: 0; right: 0; z-index: 6; padding: 24px var(--margin); }
.top-mark { display: block; }
.top-mark img { height: 24px; width: auto; }

/* ---------- hero: the seat, cropped by three edges ---------- */
.hero { position: relative; height: 100svh; min-height: 600px; overflow: hidden; background: var(--bg); --S: min(max(158svh, 88vw), 108vw); }
/* the stage ends where the headline begins, so the picture's box never lies over the words */
.hero-stage { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 62.5vw; overflow: hidden; pointer-events: none; }
.hero-object { position: absolute; left: calc(53.5vw - 0.78 * var(--S)); top: 53%; width: var(--S); height: var(--S); transform: translateY(-50%); }
.seat-rot { position: absolute; inset: 0; transform: rotate(14deg); }
.seat-shake { position: absolute; inset: 0; }
.seat-shake > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.seat-lid { opacity: 0; transform: translateY(-2.5%) scale(0.985); transition: opacity 700ms ease, transform 900ms var(--ease-out); }
.seat-glow { opacity: 0; transition: opacity 600ms ease; }
.hero[data-phase="shut"] .seat-lid, .hero[data-phase="lit"] .seat-lid { opacity: 1; transform: none; }
.hero[data-phase="lit"] .seat-glow { opacity: 1; }

.hero-words { position: absolute; z-index: 1; right: var(--margin); top: 50%; transform: translateY(-54%); text-align: right; }
.hero h1 { font-size: var(--display); font-weight: 600; line-height: 0.86; letter-spacing: -0.05em; text-transform: lowercase; }
.hero-sub { text-wrap: balance; margin: 36px 0 0 auto; max-width: 29ch; font-size: var(--body); line-height: 1.45; position: relative; z-index: 3; }

.hero-run { position: absolute; z-index: 4; right: var(--margin); bottom: 28px; display: flex; align-items: center; gap: 20px; }
.run-state { font-size: var(--body); font-variant-numeric: tabular-nums; text-align: right; max-width: 26ch; line-height: 1.3; }
html:not(.js) .hero-run { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-object { clip-path: inset(0 100% 0 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .hero-object .seat-rot { transform: rotate(14deg) scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .hero-object.is-in { clip-path: inset(0 0 0 0); }
  .js .hero-object.is-in .seat-rot { transform: rotate(14deg); }
  .js .hero-words > *, .js .hero-run { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 800ms var(--ease-out); }
  .js .hero.is-in .hero-words > *, .js .hero.is-in .hero-run { opacity: 1; transform: none; }
  .js .hero.is-in .hero-sub { transition-delay: 90ms; }
  .js .hero.is-in .hero-run { transition-delay: 180ms; }
  .hero[data-phase="shake"] .seat-shake { animation: shake 90ms linear infinite; }
  .hero[data-phase="lit"] .seat-glow { animation: glow 2400ms ease-in-out infinite; }
}
@keyframes shake { 0% { transform: translate(0, 0); } 25% { transform: translate(0.7px, -0.5px); } 50% { transform: translate(-0.6px, 0.6px); } 75% { transform: translate(0.5px, 0.5px); } 100% { transform: translate(0, 0); } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }

/* clip mode (?clip): only the seat, close up, for recording the loop shown in the first tile */
.clip body { overflow: hidden; }
.clip .top, .clip .hero-words, .clip .hero-run, .clip main > :not(.hero), .clip .foot, .clip .skip { display: none; }
.clip .hero { height: 100svh; min-height: 0; --S: 330svh; background: var(--surface-2); }
.clip .hero-stage { width: 100vw; }
.clip .hero-object { left: calc(50vw - 0.635 * var(--S)); top: calc(50svh - 0.765 * var(--S)); transform: none; clip-path: none !important; transition: none !important; }
.clip .seat-rot { transform: none !important; transition: none !important; }
.clip .seat-lid, .clip .seat-glow { transition: none !important; animation: none !important; }
.clip .seat-shake { animation: none !important; }
.clip-full .hero { --S: 116svh; background: #2c2960; }
.clip-full .hero-object { left: calc(50vw - 0.5 * var(--S)); top: calc(50svh - 0.47 * var(--S)); }
.clip-full .seat-rot { transform: rotate(-9deg) !important; }

/* ---------- intro: the heading captions a panorama ---------- */
.intro { height: 100svh; min-height: 640px; display: flex; flex-direction: column; overflow: hidden; margin-top: var(--section); }
.intro-head { padding: 0 var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.intro-head h2 { grid-column: 1 / 8; max-width: 12ch; }
.intro-notes { grid-column: 8 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); padding-bottom: 0.4em; }
.intro-notes p { max-width: 25ch; line-height: 1.4; }
.intro-pan { flex: 1; min-height: 0; margin-top: 40px; overflow: hidden; }
.intro-pan img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }

/* ---------- the cycle: tiles that grow ---------- */
.cycle { padding: var(--section) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; grid-template-rows: 70vh auto; }
.cycle-title { grid-column: 1 / 8; grid-row: 1; align-self: start; max-width: 9ch; }
.tile { grid-row: 1; align-self: end; overflow: hidden; background: var(--surface); }
.tile img, .tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-a { grid-column: 1 / 4; height: 30vh; }
.tile-b { grid-column: 4 / 8; height: 46vh; }
.tile-c { grid-column: 8 / 13; height: 70vh; }
.tile-b img { object-position: 36% 50%; }
.tile-c img { object-position: 40% 62%; }
.stage { grid-row: 2; margin-top: 20px; padding-right: 12px; }
.stage-a { grid-column: 1 / 4; }
.stage-b { grid-column: 4 / 8; }
.stage-c { grid-column: 8 / 13; }
.stage p { margin-top: 8px; max-width: 36ch; }

/* ---------- grip: the cut section, each note pinned to its place ---------- */
.grip { padding: var(--section) var(--margin) 0; }
.grip-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.grip-head h2 { grid-column: 1 / 8; max-width: 12ch; }
.grip-head p { grid-column: 8 / 13; max-width: 34ch; padding-bottom: 0.4em; }
.grip-fig { margin-top: 48px; background: var(--surface); padding: clamp(1.25rem, 4vw, 4rem) clamp(1.25rem, 4vw, 4rem) clamp(1.5rem, 3.4vw, 3.5rem); }
.grip-canvas { position: relative; max-width: 1040px; margin: 0 auto; }
.grip-canvas img { width: 100%; height: auto; }
.pin { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); opacity: 0; transition: transform 350ms var(--ease-out), background-color 250ms ease; }
.pin.is-placed { opacity: 1; }
.pin.is-on { background: var(--accent); transform: scale(2); }
.grip-notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(1.5rem, 3vw, 3rem); }
.grip-notes li::before { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); margin-bottom: 14px; transition: transform 350ms var(--ease-out), background-color 250ms ease; transform-origin: 0 50%; }
.grip-notes li.is-on::before { background: var(--accent); transform: scale(2); }
.grip-notes p { margin-top: 8px; max-width: 30ch; }
.facts-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
.facts.facts-wide > div { display: block; background: none; padding: 28px 0 0; }
.facts-wide dd { margin-top: 6px; }

/* ---------- inside: one scene, stepping statements ---------- */
.inside { position: relative; margin-top: var(--section); }
.inside-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--stage); }
.inside-bg { position: absolute; inset: 4svh 0; }
.inside-bg img { width: 100%; height: 100%; object-fit: contain; }
.inside-steps span { display: block; height: 34vh; }
.inside-lines { position: absolute; z-index: 2; left: var(--margin); top: 50%; transform: translateY(-50%); width: min(21rem, 25vw); display: grid; gap: 14px; }
.inside-lines li { font-size: var(--lead); line-height: 1.15; letter-spacing: -0.015em; color: var(--muted); font-weight: 500; transition: color 300ms ease; }
.inside-lines li.is-on { color: var(--ink); font-weight: 600; }
.inside-lines h2 { font: inherit; letter-spacing: inherit; color: inherit; }
.inside-mark { position: absolute; z-index: 2; left: var(--mx, 50%); top: var(--my, 50%); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); border: 4px solid var(--bg); opacity: 0; transition: top 600ms var(--ease-out), left 600ms var(--ease-out), opacity 300ms ease; }
.inside-mark.is-on { opacity: 1; }
.inside-cards { position: absolute; z-index: 2; right: var(--margin); top: 50%; transform: translateY(-50%); width: min(20rem, 24vw); display: grid; }
.card { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(14px); transition: opacity 350ms ease, transform 500ms var(--ease-out); }
.card.is-on { opacity: 1; transform: none; transition-delay: 120ms; }

/* ---------- numbers: facts set large ---------- */
.numbers { padding: var(--section) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.numbers-head { grid-column: 1 / 8; }
.numbers-head h2 { max-width: 12ch; }
.numbers-head p { margin-top: 28px; max-width: 34ch; }
.facts { grid-column: 1 / 8; margin-top: 56px; display: grid; gap: 6px; }
.grip .facts { margin-top: 6px; }
.facts > div { display: grid; grid-template-columns: minmax(7.2ch, 0.42fr) 1fr; gap: 20px; align-items: baseline; background: var(--surface); padding: 22px 24px; }
.facts dt { font-size: var(--lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.facts dd { max-width: 40ch; }
.numbers-pics { grid-column: 8 / 13; grid-row: 1 / 3; display: grid; gap: 40px; }
.numbers-pics img { width: 100%; height: auto; }
.numbers-pics figcaption { margin-top: 12px; font-size: var(--small); line-height: 1.4; max-width: 44ch; }
.sources { grid-column: 1 / 8; max-width: 68ch; margin-top: 40px; font-size: var(--small); line-height: 1.55; color: var(--muted); }
.sources a { color: var(--ink); text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }

/* ---------- band: names running off the edges ---------- */
.band { margin-top: var(--section); }
.band-strip { background: var(--accent); color: var(--accent-ink); height: 34vh; min-height: 190px; display: flex; align-items: center; overflow: hidden; }
.band-track { display: flex; align-items: center; flex: none; white-space: nowrap; font-size: var(--display); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.band-track i { flex: none; width: 0.24em; height: 0.24em; border-radius: 50%; background: currentColor; margin: 0 0.4em; }
@media (prefers-reduced-motion: no-preference) { .band-track { animation: band 46s linear infinite; } .band-strip:hover .band-track { animation-play-state: paused; } }
@keyframes band { to { transform: translateX(-50%); } }
.band-note { padding: 28px var(--margin) 0; max-width: calc(58ch + 2 * var(--margin)); }

/* ---------- about: inset panel, shaped picture ---------- */
.about { padding: var(--section) 20px 0; }
.about-panel { position: relative; overflow: hidden; background: var(--surface); min-height: 82svh; padding: 56px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-content: start; }
.about-panel h2 { grid-column: 1 / 8; max-width: 16ch; }
.about-shape { position: absolute; left: 56px; bottom: 0; width: 30vw; aspect-ratio: 0.8; transform: translateY(20%); clip-path: url(#lid-shape); }
.about-shape img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.about-text { grid-column: 8 / 13; grid-row: 1; display: grid; gap: 56px; justify-items: start; }
.about-text p { margin-top: 12px; max-width: 34ch; }

/* ---------- footer: the name across the last photograph ---------- */
.foot { position: relative; height: 100svh; min-height: 600px; margin-top: var(--section); overflow: hidden; background: var(--inv-bg); color: var(--inv-ink); }
/* the photograph is enlarged from its lower left corner, which sets the seat in the right half, clear of the name */
.foot-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.66); transform: scale(1.45); transform-origin: 0% 78%; }
.foot-top { position: absolute; top: 32px; left: var(--margin); right: var(--margin); display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.foot-links { display: grid; gap: 6px; }
.foot a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { text-decoration-color: currentColor; } }
.foot-reach { text-align: right; }
.foot-base { position: absolute; left: var(--margin); right: var(--margin); bottom: 24px; }
.foot-mark { width: 54vw; height: auto; }
.foot-legal { margin-top: 18px; font-size: var(--small); line-height: 1.45; max-width: 86ch; }

/* ---------- entrances ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .about-shape[data-reveal] { transform: translateY(26%); }
  .js .about-shape[data-reveal].is-in { transform: translateY(20%); }
  @supports (animation-timeline: view()) {
    .intro-pan img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes drift { from { transform: scale(1.08) translateY(-3%); } to { transform: scale(1.08) translateY(3%); } }

/* ---------- tablet ---------- */
@media (max-width: 1020px) {
  .cycle { grid-template-rows: 56vh auto; }
  .tile-a { height: 24vh; } .tile-b { height: 38vh; } .tile-c { height: 56vh; }
  .numbers-head, .facts { grid-column: 1 / 13; }
  .numbers-pics { grid-column: 1 / 13; grid-row: auto; margin-top: 40px; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
  .intro-head h2, .intro-notes { grid-column: 1 / 13; }
  .intro-notes { margin-top: 24px; max-width: 34rem; }
  .sources { grid-column: 1 / 13; }
  .foot-photo { transform: scale(1.4); transform-origin: 50% 100%; }
  .foot-mark { width: 100%; }
  .about-panel { padding: 40px; }
  .about-shape { left: 40px; }
  .inside-stage { display: flex; flex-direction: column; }
  .inside-bg { position: relative; inset: auto; flex: 1; min-height: 0; margin: 12px 0; }
  .inside-cards { position: static; transform: none; width: auto; padding: 14px var(--margin) 0; background: var(--bg); min-height: 6.4em; }
  .card { align-self: start; }
  .inside-lines { position: static; transform: none; width: auto; gap: 4px; padding: 10px var(--margin) 18px; background: var(--bg); }
  .inside-lines li { font-size: var(--body); }
  .grip-head h2, .grip-head p { grid-column: 1 / 13; }
  .grip-head p { margin-top: 24px; padding-bottom: 0; }
  .grip-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}

/* ---------- narrow: the cycle stacks, each picture over its own words ---------- */
@media (max-width: 700px) {
  .cycle { grid-template-columns: 1fr; grid-template-rows: none; }
  .cycle > * { grid-column: 1 / -1; grid-row: auto; }
  .cycle-title { max-width: none; margin-bottom: 28px; order: 0; }
  .tile-a { order: 1; height: 34vw; } .stage-a { order: 2; }
  .tile-b { order: 3; height: 46vw; } .stage-b { order: 4; }
  .tile-c { order: 5; height: 62vw; } .stage-c { order: 6; }
  .stage { margin: 14px 0 28px; padding-right: 0; }
}

/* ---------- phone: its own composition ---------- */
@media (max-width: 760px) {
  .top { padding: 16px var(--margin); }
  .hero { height: auto; min-height: 100svh; padding: 47svh var(--margin) 28px; --S: 150vw; }
  .hero-stage { width: 100%; height: 46svh; bottom: auto; }
  .hero-object { left: 50%; top: 0; transform: translate(-54%, -27%); }
  .hero-words { position: relative; right: auto; top: auto; transform: none; }
  .hero h1 { font-size: 19vw; }
  .hero-sub { margin-top: 20px; max-width: 30ch; }
  .hero-run { position: relative; right: auto; bottom: auto; margin-top: 28px; flex-direction: column; align-items: flex-end; gap: 14px; }

  .intro { height: 100svh; min-height: 560px; }
  .intro-head { display: block; }
  .intro-notes { display: block; margin-top: 20px; padding-bottom: 0; }
  .intro-notes p { max-width: 32ch; }
  .intro-notes p + p { margin-top: 6px; }
  .intro-pan { margin-top: 28px; }


  .inside-steps span { height: 24vh; }
  .intro { height: 82svh; }
  .inside-cards { min-height: 8em; }
  .grip-notes { grid-template-columns: 1fr; }
  .facts-wide { grid-template-columns: 1fr; }

  .facts > div { grid-template-columns: 1fr; gap: 6px; padding: 18px 18px; }
  .band-strip { height: 22vh; min-height: 130px; }
  .band-track { font-size: 19vw; }
  .band-note { padding-top: 20px; }

  .about { padding-left: 10px; padding-right: 10px; }
  .about-panel { display: flex; flex-direction: column; padding: 28px 20px 0; min-height: 0; }
  .about-text { order: 1; }
  .about-shape { order: 2; }
  .about-panel h2 { max-width: none; }
  .about-text { margin-top: 32px; gap: 32px; }
  .about-shape { position: relative; left: auto; width: 86vw; max-width: 100%; margin: 44px auto -27vw; transform: none; }
  .js .about-shape[data-reveal], .js .about-shape[data-reveal].is-in { transform: none; }

  .foot { height: 88svh; min-height: 520px; }
  .foot-top { top: 24px; }
  .foot-legal { margin-top: 12px; }
  .numbers-pics { grid-template-columns: 1fr; gap: 28px; }
}
