/* SeaGlass. Two typefaces: Anybody (display, with a width axis that the page animates) and Instrument Sans (text).
   The page ground is one fixed color layer that changes; all text takes its color from --ink. */
@font-face { font-family: "Anybody"; src: url("fonts/anybody.woff2") format("woff2"); font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-italic.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-style: italic; font-display: swap; }

:root {
  --paper: #2443D8; --ink: #ffffff;           /* current ground and the text color that reads on it */
  --side-l: #FF5230; --side-r: #FFC72C;       /* the visitor's current sides; the page borrows them */
  --side-l-ink: #000; --side-r-ink: #000;
  --cap: #FFC72C;
  --display: "Anybody", "Arial Black", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(18px, 3.2vw, 48px);
  --rule: color-mix(in srgb, var(--ink) 22%, transparent);
  --soft: color-mix(in srgb, var(--ink) 9%, transparent);
  --mute: color-mix(in srgb, var(--ink) 68%, transparent);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; font: 400 clamp(16px, 1.05vw + 12px, 19px)/1.5 var(--text); color: var(--ink); overflow-x: clip; transition: color .35s; }
h1, h2, h3, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; } fieldset { border: 0; min-width: 0; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--side-l); color: var(--side-l-ink); }
.skip { position: fixed; left: 12px; top: -80px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* layers: ground 0, .under 1, canvas 2, .over 3, nav 10 */
.ground { position: fixed; inset: 0; z-index: 0; background: var(--paper); transition: background-color .6s var(--ease); }
.ground-wipe { position: absolute; inset: 0; clip-path: circle(0 at 50% 50%); }
.ground-wipe.go { transition: clip-path .85s cubic-bezier(.6, 0, .2, 1); clip-path: circle(150vmax at var(--wx, 50%) var(--wy, 50%)); }
.ground-split { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); background: linear-gradient(100deg, var(--side-r) 0 50%, var(--side-l) 50% 100%); }
.list-on .ground-split { opacity: 1; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 2; pointer-events: none; display: block; }
.under { position: relative; z-index: 1; }
.over { position: relative; z-index: 3; }

h2 { font: 800 clamp(40px, 6.4vw, 104px)/.9 var(--display); font-stretch: 125%; letter-spacing: -.02em; text-wrap: balance; }
h3 { font: 800 clamp(20px, 1.7vw, 28px)/1.05 var(--display); font-stretch: 125%; letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.4; max-width: 30em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 16px/1 var(--text); text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), background-color .35s, color .35s, border-color .35s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.link-btn, .text-link { background: none; border: 0; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 16px var(--gut); }
.nav { transition: transform .35s var(--ease); }
.nav.away { transform: translateY(-110%); }
.list-on .nav .wordmark { color: var(--side-r-ink); } .list-on .nav nav { color: var(--side-l-ink); } .list-on .nav .btn { visibility: hidden; }
.wordmark { font: 900 clamp(17px, 1.5vw, 22px)/1 var(--display); font-stretch: 150%; letter-spacing: .06em; text-decoration: none; margin-right: auto; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { text-decoration: none; font-weight: 600; font-size: 16px; }
.nav nav a:hover { text-decoration: underline; }
@media (max-width: 860px) { .nav nav { display: none; } }

/* swatches and chips, shared by the hero and the builder */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: var(--c); position: relative; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 28%, transparent); transition: transform .2s var(--ease); }
.sw:hover { transform: scale(1.1); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.sw.frost { background: radial-gradient(circle at 32% 28%, #c9f4ec 0 12%, var(--c) 60%); }
.sw.mirror { background: linear-gradient(140deg, color-mix(in srgb, var(--c) 55%, #fff) 0 28%, var(--c) 52%, color-mix(in srgb, var(--c) 70%, #000)); }
.sw.fade { background: linear-gradient(180deg, var(--c) 0 45%, color-mix(in srgb, var(--c) 45%, #fff) 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--rule); background: transparent; font-weight: 600; font-size: 15px; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip small { font-weight: 400; opacity: .75; margin-left: 6px; }
.chip:disabled { opacity: .35; cursor: not-allowed; }

/* 1. hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: clamp(84px, 11vh, 120px) var(--gut) clamp(10px, 2vh, 24px); }
.hero-lede { grid-column: 1; grid-row: 1; max-width: 17.5em; font-size: clamp(18px, 1.55vw, 25px); line-height: 1.32; font-weight: 500; }
.wearing { grid-column: 2; grid-row: 1; justify-self: end; max-width: 300px; text-align: right; }
.wearing-q { font-weight: 700; margin-bottom: 10px; }
.wearing .swatches { justify-content: flex-end; margin-bottom: 12px; }
.wearing .link-btn { font-size: 15px; }
.hero-title { grid-column: 1 / -1; grid-row: 3; display: flex; flex-direction: column; font: 900 14.2vw/.88 var(--display); letter-spacing: -.035em; text-transform: none; user-select: none; }
.hero-title span { display: block; font-stretch: var(--hs, 150%); white-space: nowrap; }
.ht-b { align-self: flex-end; }
.hero-title.squeeze .ht-a { animation: squeeze 1.25s var(--ease); }
.hero-title.squeeze .ht-b { animation: squeeze 1.25s .14s var(--ease); }
@keyframes squeeze { 0%, 100% { font-stretch: var(--hs, 150%); } 38% { font-stretch: 62%; } }
.poster { position: absolute; left: 50%; top: 42%; width: min(62vw, 900px); transform: translate(-50%, -50%); z-index: 2; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: 40svh auto auto auto; padding-top: 70px; row-gap: 14px; }
  .hero-title { grid-row: 2; font-size: 21vw; --hs: 100%; line-height: .9; }
  .hero-lede { grid-row: 3; max-width: 24em; }
  .wearing { grid-column: 1; grid-row: 4; justify-self: start; text-align: left; max-width: none; padding-bottom: 18px; }
  .wearing .swatches { justify-content: flex-start; }
  .sw { width: 36px; height: 36px; }
}

/* 2. swap: the instructions ride on a tag, the hinge does the talking */
.swap { height: 420vh; }
.swap-pin { position: sticky; top: 0; z-index: 3; height: 100vh; height: 100svh; display: flex; align-items: flex-end; padding: 90px var(--gut) clamp(18px, 4vh, 44px); }
.swap-copy { width: min(42%, 540px); background: var(--ink); color: var(--paper); border-radius: clamp(18px, 2vw, 30px); padding: clamp(18px, 2.2vw, 34px); }
.swap-copy h2 { font-size: clamp(30px, 3.5vw, 58px); }
.steps { margin-top: clamp(14px, 2.4vh, 26px); counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 11px 0 11px 2.3em; border-top: 1.5px solid color-mix(in srgb, var(--paper) 24%, transparent); font-size: 16px; line-height: 1.4; opacity: .42; transition: opacity .3s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; font: 800 1.2em/1.25 var(--display); font-stretch: 125%; }
.steps li b { display: block; font: 800 clamp(18px, 1.5vw, 23px)/1.15 var(--display); font-stretch: 112%; }
.steps li.on { opacity: 1; }
.steps li.on::before { color: var(--cap); }
.aside { margin-top: 12px; font-size: 14px; opacity: .6; }
@media (max-width: 760px) {
  .swap-copy { width: 100%; padding: 16px 18px; }
  .swap-copy h2 { font-size: 30px; }
  .steps { margin-top: 10px; }
  .steps li { padding: 9px 0 2px 2.1em; font-size: 15px; border-top: 0; }
  .steps li:not(.on) { display: none; }
  .aside { display: none; }
}

/* 3. builder */
.build { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: var(--gut); padding: 96px var(--gut) 60px; align-items: start; }
.build-stage { position: sticky; top: 90px; height: calc(100vh - 150px); height: calc(100svh - 150px); pointer-events: auto; cursor: grab; touch-action: pan-y; display: flex; align-items: flex-end; justify-content: center; }
.build-stage:active { cursor: grabbing; }
.drag-hint { font-size: 14px; color: var(--mute); padding-bottom: 6px; }
.build-panel { display: grid; gap: 22px; padding-bottom: 20px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.panel-head h2 { font-size: clamp(38px, 4.4vw, 68px); }
legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
legend .val { font-weight: 400; color: var(--mute); margin-left: 6px; }
.hint { font-size: 15px; color: var(--mute); margin-top: 8px; }
.summary { border-top: 1.5px solid var(--rule); padding-top: 18px; display: grid; gap: 6px; }
.summary-name { font: 800 clamp(20px, 1.8vw, 28px)/1.12 var(--display); font-stretch: 112%; text-wrap: balance; }
.summary-net { color: var(--mute); font-size: 16px; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
@media (max-width: 900px) {
  .build { grid-template-columns: minmax(0, 1fr); padding-top: 0; gap: 0; }
  .build-stage { top: 0; height: 40svh; z-index: 4; background: var(--paper); transition: background-color .35s; margin: 0 calc(-1 * var(--gut)); border-bottom: 1.5px solid var(--rule); }
  body[data-at="build"] #stage { z-index: 5; }
  .build-panel { padding-top: 22px; }
}

/* 4. the side drawer: every row is a side */
.sides { padding: clamp(90px, 14vh, 160px) 0 clamp(60px, 10vh, 120px); }
.sides-copy { padding: 0 var(--gut); display: grid; gap: 18px; max-width: 900px; }
.drawer { margin-top: clamp(28px, 5vh, 56px); display: grid; gap: 10px; width: 62%; }
.drawer li { display: block; }
.drawer-note { padding: 18px var(--gut) 6px; font-weight: 600; color: var(--mute); }
.side-row { --pull: 0px; display: grid; grid-template-columns: 1fr; width: 100%; border: 0; padding: 0; background: none; text-align: left; transform: translateX(var(--pull)); transition: transform .45s var(--ease); }
.side-row:hover, .side-row:focus-visible { --pull: 26px; }
.side-row[aria-pressed="true"] { --pull: 64px; }
.side-bar { position: relative; height: clamp(58px, 6.4vw, 92px); background: var(--c); color: var(--ci); border-radius: 0 999px 999px 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding-left: var(--gut); }
.side-bar canvas { position: absolute; right: clamp(40px, 6vw, 96px); top: 50%; height: 58%; width: auto; aspect-ratio: 7 / 1; transform: translateY(-50%); }
.side-name { position: relative; font: 800 clamp(17px, 1.9vw, 30px)/.95 var(--display); font-stretch: 125%; }
.side-note { position: relative; font-size: 14px; line-height: 1; opacity: .8; }
.side-on { position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 14px; height: 14px; border-radius: 50%; background: var(--cap); opacity: 0; transition: opacity .2s; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.side-row[aria-pressed="true"] .side-on { opacity: 1; }
.coming { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gut); padding: clamp(40px, 8vh, 90px) var(--gut) 0; width: 62%; }
.coming div { display: grid; gap: 10px; align-content: start; border-top: 1.5px solid var(--rule); padding-top: 16px; }
@media (max-width: 1180px) { .side-note { display: none; } }
@media (max-width: 900px) {
  .drawer { width: calc(100% - 28px); }
  .side-note { display: none; }
  .side-row[aria-pressed="true"] { --pull: 18px; } .side-row:hover { --pull: 8px; }
  .side-bar canvas { right: 30px; width: 36%; height: auto; }
  .coming { grid-template-columns: 1fr; width: auto; }
  .sides { padding-top: 90px; }
  .sides-copy h2 { font-size: 40px; }
}

/* 5. buying */
.buy { padding: clamp(90px, 16vh, 180px) var(--gut); display: grid; gap: clamp(28px, 5vh, 60px); }
.buy h2 { max-width: 9em; }
.buy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gut); }
.buy-grid div { display: grid; gap: 10px; align-content: start; border-top: 3px solid var(--ink); padding-top: 16px; }
.buy-note { max-width: 34em; color: var(--mute); }
@media (max-width: 760px) { .buy-grid { grid-template-columns: 1fr; } .buy { padding-top: 40svh; } }

/* 6. the net */
.net { height: 440vh; }
.net-pin { position: sticky; top: 0; z-index: 3; height: 100vh; height: 100svh; display: flex; align-items: center; padding: 90px var(--gut) 40px; }
.net-copy { width: min(48%, 660px); }
.net-copy h2 { font-size: clamp(36px, 4.6vw, 76px); }
.net-beats { position: relative; margin-top: clamp(20px, 4vh, 40px); min-height: 15em; }
.net-beats p { position: absolute; inset: 0 0 auto 0; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.42; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s var(--ease); pointer-events: none; }
.net-beats p.on { opacity: 1; transform: none; pointer-events: auto; }
.net-beats b { font-family: var(--display); font-stretch: 112%; font-weight: 800; }
@media (max-width: 760px) {
  .net-pin { align-items: flex-end; padding-bottom: 20px; }
  .net-copy { width: 100%; }
  .net-copy h2 { font-size: 38px; }
  .net-beats { min-height: 14.5em; margin-top: 12px; }
  .net-beats p { font-size: 16px; }
}

/* 7. the list */
.list { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 44vh var(--gut) clamp(28px, 6vh, 70px); }
.list-inner { display: grid; gap: 18px; width: min(100%, 900px); margin: 0 auto; background: var(--paper); color: var(--ink); padding: clamp(22px, 3vw, 44px); border-radius: clamp(18px, 2vw, 32px); }
.list-inner h2 { font-size: clamp(30px, 3.5vw, 56px); }
#list-form { display: grid; gap: 10px; margin-top: 6px; }
#list-form > label:first-child { font-weight: 700; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input { flex: 1 1 260px; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 500 18px/1 var(--text); }
.field input::placeholder { color: var(--mute); }
.field .btn { min-height: 52px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--mute); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-msg { min-height: 1.5em; font-weight: 600; }

/* footer */
.foot { background: #191B1F; color: #EFE9DC; padding: clamp(40px, 8vh, 90px) var(--gut) 26px; overflow: hidden; }
.foot-mark { font: 900 11.3vw/.8 var(--display); font-stretch: 150%; letter-spacing: -.02em; white-space: nowrap; color: var(--side-l); background: linear-gradient(100deg, var(--side-l) 0 50%, var(--side-r) 50% 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.foot-fine { margin-top: 14px; font-size: 13px; opacity: .6; max-width: 60em; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; margin-top: 28px; font-size: 15px; }
.foot-row p:last-child { display: flex; gap: 22px; }
.foot :focus-visible { outline-color: #EFE9DC; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; translate: -50% 0; background: #191B1F; color: #EFE9DC; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); transform: translateY(12px); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 10px; }
.toast.on { opacity: 1; transform: none; }
.toast i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }
.noscript { position: relative; z-index: 5; padding: 120px var(--gut); max-width: 40em; }

/* no WebGL: a still picture and the story still work */
.no-gl #stage, .no-gl .build-stage, .no-gl .drag-hint { display: none; }
.no-gl .poster { display: block; }
.no-gl .swap, .no-gl .net { height: auto; } .no-gl .swap-pin, .no-gl .net-pin { position: static; height: auto; padding-top: 120px; }
.no-gl .steps li { opacity: 1; color: var(--ink); display: grid; } .no-gl .net-beats { min-height: 0; } .no-gl .net-beats p { position: static; opacity: 1; transform: none; margin-bottom: 1em; }
.no-gl .build { grid-template-columns: 1fr; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
