*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.atmos-loading,
body.nav-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

img,
picture,
svg,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-press);
  color: var(--tone-light);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

section[id] {
  scroll-margin-top: 96px;
}

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.t-quiet,
.t-display,
.t-money,
.t-title,
.t-prose {
  font-family: var(--font-serif);
  font-weight: 400;
}

.t-quiet {
  font-size: clamp(26px, 1.2rem + 2vw, 40px);
  line-height: 1.3;
}

.t-display {
  font-size: clamp(40px, 2rem + 4.4vw, 96px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.t-money {
  font-size: clamp(52px, 2.4rem + 6vw, 128px);
  line-height: 1.02;
}

.t-title {
  font-size: clamp(30px, 1.6rem + 2.4vw, 54px);
  line-height: 1.12;
}

.t-prose {
  font-size: 17px;
  line-height: 1.75;
}

.t-label,
.t-micro {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.t-label {
  line-height: 1.4;
  letter-spacing: 0.35em;
}

.t-micro {
  line-height: 1.45;
  letter-spacing: 0.22em;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--accent-press);
  color: var(--tone-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 20px;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(calc(-100% - 24px));
  transition: transform 300ms var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.rlink {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: 14px;
  padding-block: 15px;
  color: currentColor;
  text-decoration: none;
}

.rlink > .rule {
  flex: 0 0 44px;
  width: 44px;
  transition: width 500ms var(--ease), flex-basis 500ms var(--ease),
    background-color 1.1s var(--ease);
}

.rlink:hover > .rule,
.rlink:focus-visible > .rule {
  flex-basis: 64px;
  width: 64px;
}

.rlink .roll {
  height: 14px;
  overflow: hidden;
}

.rlink .roll > * {
  display: block;
  height: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.26em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 550ms var(--ease);
}

.rlink:hover .roll > *,
.rlink:focus-visible .roll > * {
  transform: translateY(-100%);
}

.btn {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--accent-press);
  color: var(--tone-light);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}

.btn:hover {
  box-shadow: inset 0 0 0 999px rgb(0 0 0 / 0.08);
  transform: translateY(-1px);
}

.btn:active {
  box-shadow: inset 0 0 0 999px rgb(0 0 0 / 0.16);
  transform: translateY(0);
}

.rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line-strong);
}

.rule-double {
  display: block;
  width: 100%;
  height: 5px;
  border-block: 1px solid var(--line-strong);
}

.loop {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 1.6px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}

.seal {
  color: currentColor;
}

.seal,
.seal svg {
  display: block;
}

.device {
  position: relative;
  display: flex;
  justify-content: center;
}

.device-frame {
  position: relative;
  width: min(320px, 72vw);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: 0 40px 90px rgb(10 6 4 / 0.6);
}

.device-frame > img {
  width: 100%;
  border-radius: 18px;
}

.device-glow {
  position: absolute;
  inset: -18%;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--accent-press) 14%, transparent),
    transparent 72%
  );
  filter: blur(60px);
  pointer-events: none;
}

.chapter {
  position: relative;
  z-index: 2;
}

.chapter[data-tone="#1A1510"] {
  --chapter-tone: var(--tone-abyss);
}

.chapter[data-tone="#231A14"] {
  --chapter-tone: var(--tone-warm);
}

.chapter[data-tone="#382A24"] {
  --chapter-tone: var(--tone-night);
}

.chapter[data-tone="#FBF8FA"] {
  --chapter-tone: var(--tone-light);
}

.chapter {
  background: var(--chapter-tone, var(--bg));
}

html.bg-live .chapter {
  background: transparent;
}

.rv {
  opacity: 1;
  transform: none;
  transition: opacity 2.3s var(--ease), transform 2.3s var(--ease);
}

.rv.d1 {
  transition-delay: 300ms;
}

.rv.d2 {
  transition-delay: 600ms;
}

.rv.d3 {
  transition-delay: 900ms;
}

html[data-ready] .rv:not(.in) {
  opacity: 0;
  transform: translateY(30px);
}

html[data-ready] .rv.in {
  opacity: 1;
  transform: none;
}

.thread path {
  fill: none;
  stroke: var(--accent-press);
  stroke-width: 1.6px;
}

html[data-ready] .thread path {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
}

html[data-ready] .thread.in path {
  animation: thread-draw 5.5s 600ms var(--ease) forwards;
}

@keyframes thread-draw {
  to {
    stroke-dashoffset: 0;
  }
}

html[data-mode="launch-wave"] [data-when="live"],
html[data-mode="live"] [data-when="launch-wave"],
html:not([data-mode]) [data-when="live"] {
  display: none !important;
}

html[data-mode="launch-wave"] [data-when="launch-wave"],
html[data-mode="live"] [data-when="live"],
html:not([data-mode]) [data-when="launch-wave"] {
  display: revert;
}

.atmos-loader {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--tone-abyss);
  color: var(--ink);
  opacity: 1;
  visibility: visible;
  transition: opacity 1s var(--ease), visibility 1s;
}

html[data-js] .atmos-loader {
  display: flex;
}

.atmos-loader.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.atmos-loader__seal {
  width: 72px;
  height: 57px;
  color: var(--accent-press);
}

.atmos-loader__count,
.atmos-loader__tag {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
}

.atmos-loader__count {
  color: var(--platinum);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35em;
}

.atmos-loader__tag {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.3em;
}

#ground {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--tone-abyss);
  pointer-events: none;
}

#haze {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (max-width: 599px) {
  .shell {
    padding-inline: 16px;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  html[data-js] .atmos-loader,
  #haze {
    display: none;
  }

  html[data-ready] .rv,
  html[data-ready] .rv:not(.in) {
    opacity: 1;
    transform: none;
  }

  html[data-ready] .thread path,
  html[data-ready] .thread.in path {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }

  html.bg-live .chapter {
    background: var(--chapter-tone, var(--bg));
  }
}
