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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ol,
ul,
figure,
pre {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 3rem, var(--page));
  margin-inline: auto;
}

.f-ink {
  fill: var(--ink);
}
.f-surface {
  fill: var(--surface);
}
.f-line {
  fill: var(--line);
}
.f-blue {
  fill: var(--blue);
}
.f-red {
  fill: var(--red);
}
.f-yellow {
  fill: var(--yellow);
}
.f-green {
  fill: var(--green);
}
.f-pink {
  fill: var(--pink);
}
.s-line {
  stroke: var(--line);
  stroke-width: 1.5;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.mark svg {
  width: 1.75rem;
  height: 1.75rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: var(--step--1);
  font-weight: 500;
}

.nav a {
  text-decoration: none;
}

.nav a:not(.btn):hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
}

.btn {
  display: inline-block;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--blue);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--blue);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--blue);
}

.nav .btn {
  padding: 0.5em 1.1em;
  box-shadow: 0 3px 0 var(--blue);
}

.link {
  font-weight: 600;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem) var(--gap);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
  }
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.lede {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: var(--step-1);
  line-height: 1.42;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.25rem;
}

.scene {
  display: block;
  width: 100%;
  height: auto;
}

.scene .card,
.scene .shims rect,
.scene .level,
.scene .bubble {
  transform-box: fill-box;
  transform-origin: center;
}

.scene .card-a {
  animation: settle-a 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.15) 0.55s both;
}
.scene .card-b {
  animation: settle-b 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.15) 0.7s both;
}
.scene .card-c {
  animation: settle-c 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.15) 0.85s both;
}
.scene .shims rect {
  animation: slide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.scene .shims rect:nth-child(1) {
  animation-delay: 0.1s;
}
.scene .shims rect:nth-child(2) {
  animation-delay: 0.2s;
}
.scene .shims rect:nth-child(3) {
  animation-delay: 0.3s;
}
.scene .shims rect:nth-child(4) {
  animation-delay: 0.4s;
}
.scene .level {
  animation: level 0.9s cubic-bezier(0.2, 0.9, 0.2, 1.15) 0.9s both;
}
.scene .bubble {
  animation: bubble 1.4s cubic-bezier(0.3, 0.7, 0.2, 1) 0.9s both;
}

@keyframes settle-a {
  from {
    transform: translateY(46px) rotate(-5deg);
  }
}
@keyframes settle-b {
  from {
    transform: translateY(22px) rotate(3deg);
  }
}
@keyframes settle-c {
  from {
    transform: translateY(34px) rotate(-3deg);
  }
}
@keyframes slide {
  from {
    transform: translateX(-90px);
    opacity: 0;
  }
}
@keyframes level {
  from {
    transform: translateY(30px) rotate(-4deg);
  }
}
@keyframes bubble {
  from {
    transform: translateX(-34px);
  }
}

.band {
  background: var(--night);
  color: var(--night-ink);
  padding-block: var(--gap);
  margin-bottom: var(--gap);
}

.band .sub,
.band .note,
.band .steps p {
  color: var(--night-dim);
}

.section {
  padding-block: 0 var(--gap);
}

.section h2,
.band h2 {
  max-width: 17ch;
  font-size: var(--step-3);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.sub {
  max-width: var(--measure);
  margin-top: 1.1rem;
  font-size: var(--step-1);
  line-height: 1.42;
  color: var(--ink-2);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.term {
  overflow-x: auto;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: #060919;
  color: #f2f4ff;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.8;
  border: 1px solid #2a3060;
  box-shadow: 8px 8px 0 var(--blue);
}

.term .dim {
  color: #8087ad;
}
.term .ok {
  color: var(--yellow);
}
.term .url {
  color: #9db0ff;
}

.note {
  margin-top: 1.5rem;
  font-size: var(--step--1);
}

.steps {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 52rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.6rem;
  margin-bottom: 1.25rem;
  border-radius: 0.3rem;
}

.steps li:nth-child(1)::before {
  background: var(--yellow);
}
.steps li:nth-child(2)::before {
  background: var(--red);
}
.steps li:nth-child(3)::before {
  background: var(--green);
}

.steps h3,
.facts h3 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.steps p,
.facts p {
  max-width: 30rem;
  margin-top: 0.6rem;
}

.facts p {
  color: var(--ink-2);
}

.facts {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 44rem) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.facts li {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-bottom-width: 6px;
}

.facts li:nth-child(4n + 1) {
  border-bottom-color: var(--blue);
}
.facts li:nth-child(4n + 2) {
  border-bottom-color: var(--red);
}
.facts li:nth-child(4n + 3) {
  border-bottom-color: var(--yellow);
}
.facts li:nth-child(4n + 4) {
  border-bottom-color: var(--green);
}

.close {
  background: var(--yellow);
  color: #0e1330;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.close h2 {
  max-width: 16ch;
  font-size: var(--step-4);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.close p {
  max-width: var(--measure);
  margin-top: 1.25rem;
  font-size: var(--step-1);
}

.close .btn {
  margin-top: 2rem;
  background: #0e1330;
  color: #f7f8fc;
  box-shadow: 0 4px 0 #ff5a45;
}

.close .btn:hover {
  box-shadow: 0 2px 0 #ff5a45;
}
.close .btn:active {
  box-shadow: 0 0 0 #ff5a45;
}

.stripes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 0.5rem;
}

.stripes i:nth-child(1) {
  background: var(--blue);
}
.stripes i:nth-child(2) {
  background: var(--red);
}
.stripes i:nth-child(3) {
  background: var(--green);
}
.stripes i:nth-child(4) {
  background: var(--pink);
}

.foot {
  padding-block: 2rem 3rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.solo {
  display: grid;
  min-height: calc(100vh - 4rem);
  place-items: center;
  padding-block: 4rem;
}

.solo h1 {
  max-width: 14ch;
  font-size: var(--step-4);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.solo p {
  max-width: 30rem;
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.42;
  color: var(--ink-2);
}

.solo .btn {
  margin-top: 2rem;
}

.solo .tilt {
  display: block;
  width: 9rem;
  height: auto;
  margin-bottom: 2rem;
}

@media (max-width: 34rem) {
  .nav a:not(.btn) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scene * {
    animation: none !important;
  }

  .btn {
    transition: none;
  }
}
