@font-face {
  font-family: "Archivo";
  src: url("./fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("./fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("./fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #050806;
  --bone: #efe9dc;
  --ink: #0d150f;
  --paper: #e9e3d3;
  --coral: #e76364;
  --fg: var(--bone);
  --edge: clamp(20px, 4.4vw, 76px);
  --display: "Archivo", "Arial Narrow", sans-serif;
  --text: "Switzer", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --vh: 1vh;
}
@supports (height: 1svh) {
  :root { --vh: 1svh; }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--fg);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p, h1, h2, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
::selection { background: var(--coral); color: var(--night); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 6px; border-radius: 2px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--edge); top: 12px; z-index: 50;
  padding: 10px 14px; background: var(--bone); color: var(--ink);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- the world ---------- */
.world {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none;
}
.world-sky { z-index: 0; }
.world-land { z-index: 2; }
.legend {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, #e3ddce 0%, rgba(227, 221, 206, 0.94) 22%, rgba(227, 221, 206, 0.55) 44%, rgba(227, 221, 206, 0) 66%);
}
.grain {
  position: fixed; inset: -50%; z-index: 6; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.16;
  mix-blend-mode: overlay;
}
html.is-day .grain { opacity: 0.34; mix-blend-mode: multiply; }

/* ---------- logo ---------- */
.mark {
  position: relative; display: block; width: 100%;
  aspect-ratio: 3350 / 1461;
  background: var(--nav-fg, var(--fg));
  -webkit-mask: url("./assets/ozw-mark.png") center / 100% 100% no-repeat;
  mask: url("./assets/ozw-mark.png") center / 100% 100% no-repeat;
  transition: background-color 0.5s var(--out);
}
.nav-logo, .contact-logo, .curtain { --dot: 7.94%; }
.nav-logo::after, .contact-logo::after, .curtain-mark::after {
  content: ""; position: absolute;
  left: 88.88%; top: 74.54%; width: 7.94%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--coral);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: clamp(18px, 3.2vh, 34px) var(--edge) 0;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-logo { position: relative; display: block; width: clamp(74px, 6.4vw, 104px); }
.nav-mail { color: var(--nav-fg, var(--fg)); }
.nav-mail, .contact-mail {
  position: relative; font-weight: 500; letter-spacing: -0.005em;
  transition: color 0.5s var(--out);
}
.nav-mail { font-size: clamp(14px, 1.05vw, 17px); padding: 6px 0; }
.nav-mail::before, .nav-mail::after {
  position: absolute; top: 50%; font-family: var(--display); font-stretch: 62%; font-weight: 700;
  font-size: 1.5em; line-height: 1; opacity: 0; transform: translateY(-54%);
  transition: opacity 0.3s, transform 0.5s var(--out);
}
.nav-mail::before { content: "["; right: 100%; transform: translate(4px, -54%); }
.nav-mail::after { content: "]"; left: 100%; transform: translate(-4px, -54%); }
.nav-mail:hover::before, .nav-mail:focus-visible::before { opacity: 1; transform: translate(-7px, -54%); }
.nav-mail:hover::after, .nav-mail:focus-visible::after { opacity: 1; transform: translate(7px, -54%); }

/* ---------- curtain (first load) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 40; display: none;
  background: var(--night); place-items: center;
}
html.js .curtain { display: grid; }
html.is-ready .curtain { pointer-events: none; }
.curtain-mark { position: relative; display: block; width: clamp(120px, 14vw, 220px); opacity: 0; will-change: transform; }
.curtain .mark { background: var(--bone); }

/* ---------- scenes ---------- */
.scene { position: relative; }
.pinned { height: calc(var(--len, 2) * 100 * var(--vh)); }
.pin {
  position: sticky; top: 0; z-index: 3; height: calc(100 * var(--vh)); overflow: hidden;
}
html:not(.js) .pinned { height: auto; }
html:not(.js) .pin { position: static; height: auto; padding: 14vh var(--edge); }

/* hero */
.hero { height: calc(100 * var(--vh)); }
.hero-type {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--edge);
  will-change: transform;
}
html:not(.js) .hero-type { position: absolute; }
.hero h1, .contact-title, .figure, .beat[data-beat="a"], .step-name {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.012em;
  line-height: 0.84;
}
.hero h1 { font-size: min(21.5vw, calc(27.5 * var(--vh))); margin-top: calc(-4 * var(--vh)); }
.h-line { display: block; overflow: hidden; padding-top: 0.06em; margin-top: -0.06em; }
.h-in { display: inline-block; will-change: transform; }
.stop {
  display: inline-block; width: 0.185em; height: 0.185em; margin-left: 0.035em;
  border-radius: 50%; background: currentColor; vertical-align: baseline;
}
.stop-sun { background: transparent; }
html.no-gl .stop-sun, html:not(.js) .stop-sun, .stop-coral { background: var(--coral); }
.hero-sub {
  position: absolute; left: var(--edge); bottom: calc(4.5 * var(--vh)); z-index: 12;
  height: clamp(68px, 5.6vw, 88px); display: flex; align-items: center;
  font-size: clamp(15px, 1.2vw, 19px); letter-spacing: -0.005em;
}

.go {
  position: absolute; left: 50%; bottom: calc(4.5 * var(--vh)); z-index: 12;
  width: clamp(68px, 5.6vw, 88px); aspect-ratio: 1; margin-left: calc(clamp(68px, 5.6vw, 88px) / -2);
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--bone) 42%, transparent);
  background: color-mix(in srgb, var(--night) 35%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
  will-change: transform;
}
.go svg {
  width: 30%; fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
  animation: nudge 2.4s var(--out) infinite;
}
.go:hover, .go:focus-visible { background: var(--bone); border-color: var(--bone); color: var(--ink); }
@keyframes nudge {
  0%, 55%, 100% { transform: translateY(-8%); }
  75% { transform: translateY(14%); }
}

/* case plates */
.plate {
  position: absolute; left: var(--edge); bottom: calc(8 * var(--vh)); z-index: 10;
  max-width: min(92vw, 1100px);
  transition: color 0.45s var(--out);
}
.figure { font-size: min(30vw, calc(34 * var(--vh))); line-height: 0.8; }
.figure .suffix { font-weight: 800; font-size: 0.62em; margin-left: 0.02em; }
.figure-range { font-size: min(19vw, calc(26 * var(--vh))); }
.num { font-weight: 800; font-variant-numeric: tabular-nums; }
.unit { font-size: clamp(20px, 2.1vw, 34px); letter-spacing: -0.015em; margin-top: 0.5em; font-weight: 500; }
.who { font-size: clamp(15px, 1.1vw, 18px); margin-top: 1.5em; opacity: 0.72; }
.more { font-size: clamp(15px, 1.1vw, 18px); margin-top: 0.5em; }
.more a {
  display: inline-block; padding: 2px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--out);
}
.more a::after { content: "↗"; display: inline-block; margin-left: 0.35em; color: var(--coral); transition: transform 0.4s var(--out); }
.more a:hover { background-size: 0 1px; background-position: 100% 100%; }
.more a:hover::after { transform: translate(3px, -3px); }

.rise { display: block; overflow: hidden; }
.rise > span { display: inline-block; will-change: transform; }
.figure .rise { padding-top: 0.04em; }

.beat[data-beat="a"] {
  position: absolute; left: 0; bottom: 0; white-space: nowrap;
  font-size: min(11vw, calc(12.5 * var(--vh))); line-height: 0.86;
}

/* summit labels */
.summits li, .spots li {
  position: absolute; left: 0; top: 0; z-index: 9;
  font-family: var(--mono); font-size: clamp(11px, 0.86vw, 14px); letter-spacing: 0.02em;
  white-space: nowrap; opacity: 0; will-change: transform, opacity;
}
.summits li span {
  display: block; transform: translate(-50%, calc(-100% - 22px));
  padding-bottom: 6px;
}
.summits li span::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 16px;
  background: currentColor; opacity: 0.5;
}
.summits li.is-kept span { color: var(--coral); }
.spots li { font-size: clamp(11px, 0.9vw, 13px); opacity: 0; transition: opacity 0.5s; color: var(--ink); }
.spots li span { display: block; transform: translate(8px, -50%); }
.spots li::before {
  content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px;
  border: 1px solid currentColor; border-radius: 50%;
}

/* method */
.steps {
  position: absolute; left: var(--edge); bottom: calc(9 * var(--vh)); z-index: 10;
  display: grid; gap: calc(0.6 * var(--vh));
  transition: color 0.45s var(--out);
}
.step { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: clamp(14px, 1.6vw, 28px); }
.step-name {
  font-size: min(15vw, calc(17 * var(--vh))); line-height: 0.86;
  color: color-mix(in srgb, var(--fg) 20%, transparent);
  transition: color 0.5s var(--out), font-stretch 0.7s var(--out);
}
.step-line {
  max-width: 19em; padding-bottom: 0.7em; font-size: clamp(16px, 1.3vw, 21px); letter-spacing: -0.01em;
  opacity: 0; transform: translateX(-10px);
  transition: opacity 0.45s, transform 0.6s var(--out);
}
.step[aria-selected="true"] .step-name { color: var(--fg); font-stretch: 78%; }
.step:hover .step-name { color: color-mix(in srgb, var(--fg) 55%, transparent); }
.step[aria-selected="true"]:hover .step-name { color: var(--fg); }
.step[aria-selected="true"] .step-line { opacity: 1; transform: none; }

/* contact */
.contact {
  position: relative; z-index: 12; min-height: calc(100 * var(--vh));
  background: var(--night); color: var(--bone);
  display: flex; align-items: flex-end;
  border-radius: var(--curve, 0) var(--curve, 0) 0 0 / calc(var(--curve, 0) * 0.32) calc(var(--curve, 0) * 0.32) 0 0;
}
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 70% at 78% 108%, #101a13 0%, transparent 62%);
}
.contact-in { position: relative; width: 100%; padding: calc(16 * var(--vh)) var(--edge) calc(6 * var(--vh)); }
.contact-title { font-size: min(26vw, calc(40 * var(--vh))); line-height: 0.82; }
.contact-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-top: calc(7 * var(--vh));
}
.contact-mail {
  font-size: clamp(22px, 3.3vw, 54px); letter-spacing: -0.03em; font-weight: 400; padding-bottom: 0.12em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.6s var(--out);
}
.contact-mail:hover { background-size: 0 1px; background-position: 100% 100%; }
.contact-logo { position: relative; display: block; width: clamp(74px, 7vw, 116px); flex: none; }
.contact .mark { background: var(--bone); }

.contact-ways { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9em; }
.contact-brief { font-size: clamp(16px, 1.3vw, 21px); padding: 2px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size 0.5s var(--out); }
.contact-brief::after { content: "↗"; display: inline-block; margin-left: 0.35em; color: var(--coral); transition: transform 0.4s var(--out); }
.contact-brief:hover { background-size: 0 1px; background-position: 100% 100%; }
.contact-brief:hover::after { transform: translate(3px, -3px); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .hero h1 { font-size: min(26vw, calc(12.4 * var(--vh))); margin-top: calc(-6 * var(--vh)); }
  .hero-sub { bottom: calc(15 * var(--vh)); height: auto; }
  .legend { background: linear-gradient(0deg, #e3ddce 0%, rgba(227, 221, 206, 0.94) 26%, rgba(227, 221, 206, 0.5) 46%, rgba(227, 221, 206, 0) 64%); }
  .plate, .steps { bottom: calc(7 * var(--vh)); }
  .figure { font-size: min(38vw, calc(24 * var(--vh))); }
  .figure-range { font-size: min(22vw, calc(18 * var(--vh))); }
  .beat[data-beat="a"] { font-size: min(15vw, calc(11 * var(--vh))); }
  .step { grid-template-columns: 1fr; }
  .step-name { font-size: min(22vw, calc(12 * var(--vh))); }
  .step-line { padding-bottom: 0; max-height: 0; overflow: hidden; transition: opacity 0.45s, transform 0.6s var(--out), max-height 0.5s var(--out); }
  .step[aria-selected="true"] .step-line { max-height: 5em; padding: 0.3em 0 0.7em; }
  .contact-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- without the world ---------- */
html.no-gl .world, html:not(.js) .world { display: none; }
html.no-gl body, html:not(.js) body {
  background: radial-gradient(90% 60% at 70% 62%, #14211a 0%, var(--night) 70%) fixed;
}
html:not(.js) .summits, html:not(.js) .spots { display: none; }
html:not(.js) .plate, html:not(.js) .steps { position: static; }
html:not(.js) .beat[data-beat="a"] { position: static; margin: 0 0 0.3em; white-space: normal; }
html:not(.js) .step-name { color: var(--fg); }
html:not(.js) .step-line { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .go svg { animation: none; }
  .step-name, .step-line, .mark { transition: none; }
}
