@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/poppins-300.woff2") format("woff2");
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/poppins-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ink: #161b1f;
  --paper: #e7eef1;
  --paper-2: #d5e0e6;
  --fog: #8ea0aa;
  --deep: #12191e;
  --line: rgba(255, 255, 255, 0.42);
  font-family: Poppins, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--deep);
  color: #f4f7f8;
  overflow: hidden;
}

body {
  background:
    radial-gradient(ellipse at 50% 118%, rgba(186, 204, 214, 0.28), transparent 46%),
    radial-gradient(ellipse at 50% 0%, #6f838e 0%, #314049 42%, #141b20 100%);
}

button, a { font: inherit; color: inherit; }

.world {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  perspective: 900px;
}

.ring {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.r1 { width: 78vw; height: 78vw; }
.r2 { width: 112vw; height: 62vw; opacity: 0.7; }
.r3 { width: 140vw; height: 36vw; top: 62%; opacity: 0.45; }

.floor {
  position: absolute;
  left: 50%;
  bottom: -8vh;
  margin: 0;
  transform: translateX(-50%) rotateX(68deg);
  transform-origin: center bottom;
  font-weight: 500;
  font-size: 28vw;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

header {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(22px + env(safe-area-inset-top)) 28px 0;
  pointer-events: none;
}

.brand {
  pointer-events: auto;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.28em;
}

nav {
  display: flex;
  gap: 22px;
  pointer-events: auto;
}

nav button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.72;
}

nav button:hover,
nav button.on { opacity: 1; }

.aside {
  margin: 0;
  justify-self: end;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  opacity: 0.72;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  perspective: 1800px;
  cursor: grab;
  touch-action: none;
}

.stage:active { cursor: grabbing; }

.orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.board {
  position: absolute;
  left: 50%;
  top: 47%;
  width: min(64vw, 740px);
  aspect-ratio: 16 / 10;
  margin-left: calc(min(64vw, 740px) / -2);
  height: auto;
  margin-top: calc(min(64vw, 740px) * 10 / 16 / -2);
  padding: 28px 32px 26px;
  display: flex;
  flex-direction: column;
  transform: rotateY(calc(var(--i) * 60deg)) translateZ(min(42vw, 500px));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: 2px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.board header,
.board p,
.board h2,
.board ul { margin: 0; }

.board header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
}

.board h2 {
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 78px);
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.board p {
  margin-top: auto;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.01em;
  max-width: 28ch;
}

.light {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
}

.dark {
  background:
    radial-gradient(ellipse at 70% 40%, rgba(120, 150, 166, 0.2), transparent 46%),
    linear-gradient(180deg, #1a242b 0%, #0c1216 100%);
  color: #f3f6f7;
}

.board.light h2 { margin-top: 18px; }

.forms ul {
  list-style: none;
  padding: 0;
  margin-top: 28px;
}

.forms li {
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 64px);
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.forms p { opacity: 0.7; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  padding: 0;
  background: #dfe7eb;
  color: var(--ink);
}

.split > div {
  padding: 28px 32px 26px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.split h2 { margin-top: 22px; font-size: clamp(32px, 3.8vw, 54px); }

.split .ink {
  background: #10161a;
  color: #f4f7f8;
  justify-content: flex-end;
}

.split .ink p {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.45;
  opacity: 0.88;
}

.markboard {
  align-items: flex-start;
  color: #f4f7f8;
}

.markboard svg {
  width: min(46%, 240px);
  margin: 8px auto 0;
  color: rgba(255, 255, 255, 0.82);
}

.markboard h2 {
  position: absolute;
  left: 32px;
  bottom: 18px;
  margin: 0;
  font-size: clamp(64px, 8vw, 120px);
  letter-spacing: -0.06em;
}

.quiet h2 { margin-top: 28px; }

.hello h2 {
  margin-top: auto;
  margin-bottom: auto;
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -0.03em;
  font-weight: 400;
}

.hello a { text-decoration: none; }
.hello a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.hint {
  position: fixed;
  z-index: 5;
  left: 28px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.6s ease;
}

body.moved .hint { opacity: 0; }

.tick {
  position: fixed;
  z-index: 4;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.7;
}

.tl { top: 16px; left: 16px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tr { top: 16px; right: 16px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.bl { bottom: 16px; left: 16px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.br { bottom: 16px; right: 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }

.plain {
  position: fixed;
  z-index: 6;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
}

.plain a { color: #f4f7f8; }

@media (max-width: 800px) {
  header { grid-template-columns: auto 1fr; }
  .aside { display: none; }
  nav { justify-self: end; gap: 14px; }
  .board {
    width: min(84vw, 740px);
    margin-left: calc(min(84vw, 740px) / -2);
    margin-top: calc(min(84vw, 740px) * 10 / 16 / -2);
    transform: rotateY(calc(var(--i) * 60deg)) translateZ(46vw);
    padding: 20px 20px 18px;
  }
  .split > div { padding: 20px; }
  .floor { font-size: 42vw; bottom: -4vh; }
}

@media (prefers-reduced-motion: reduce) {
  .hint { display: none; }
  .stage { cursor: default; }
}
