/* Shared by the v2 series: theme colours, corner labels, the mark's intro, and the slat transition. */
:root {
  --out: cubic-bezier(.22, 1, .36, 1);
  --io: cubic-bezier(.65, 0, .35, 1);
  --bg: #0B0B0B;
  --ink: #EFEFEA;
  --dim: #85857F;
  --soft: #191918;
  --line: rgba(239, 239, 234, .12);
}
[data-theme="light"] {
  --bg: #E6E6E1;
  --ink: #111110;
  --dim: #66665F;
  --soft: #D5D5CF;
  --line: rgba(17, 17, 16, .12);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; }

/* the mark: ring draws from the top, then the half pours in */
.mark { width: clamp(96px, 15vw, 144px); height: auto; display: block; overflow: visible; }
.ring { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 214; stroke-dashoffset: 214; animation: km-draw 1.5s var(--io) .25s forwards; }
.half { fill: var(--ink); clip-path: inset(0 0 100% 0); animation: km-pour 1.25s var(--out) 1.45s forwards; }
.word { margin: 0 -.32em 0 0; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 500; font-size: clamp(22px, 3.3vw, 34px); letter-spacing: .32em; opacity: 0; filter: blur(8px); transform: translateY(6px); animation: km-focus 1.3s var(--out) 2.25s forwards; }

/* corners */
.meta { position: fixed; z-index: 20; display: flex; align-items: center; gap: 10px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); opacity: 0; animation: km-fade 1.2s ease 2.9s forwards; }
.tl { top: 26px; left: 30px; color: var(--ink); }
.tr { top: 26px; right: 30px; }
.bl { bottom: 24px; left: 30px; }
.br { bottom: 24px; right: 30px; }
.meta > svg { width: 14px; height: 14px; flex: none; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: km-pulse 2.6s ease-in-out infinite; }

/* light / dark switch */
.kit-toggle { background: none; border: 0; padding: 8px 0; margin: -8px 0; cursor: pointer; color: var(--ink); }
.kit-toggle svg { width: 12px; height: 12px; transition: transform .7s var(--io); }
[data-theme="light"] .kit-toggle svg { transform: rotate(180deg); }
.kit-toggle:hover span { text-decoration: underline; text-underline-offset: 4px; }
.kit-toggle:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

/* the slats that sweep across when the theme changes */
.kit-slats { position: fixed; inset: 0; z-index: 100; display: flex; pointer-events: none; perspective: 1600px; }
.kit-slats i { flex: 1; margin-right: -1px; transform: rotateY(90deg); transition: transform .55s var(--io); }
.kit-slats.in i { transform: rotateY(0deg); }
.kit-slats { transition: opacity .55s cubic-bezier(.4, 0, .2, 1); }
.kit-slats.out { opacity: 0; }

@keyframes km-draw { to { stroke-dashoffset: 0; } }
@keyframes km-pour { to { clip-path: inset(0 0 0 0); } }
@keyframes km-focus { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes km-fade { to { opacity: 1; } }
@keyframes km-rise { to { transform: none; } }
@keyframes km-pulse { 50% { opacity: .25; } }

@media (max-width: 560px) {
  .meta { font-size: 10px; letter-spacing: .1em; }
  .tl, .bl { left: 18px; }
  .tr, .br { right: 18px; }
  .tl, .tr { top: 20px; }
  .bl, .br { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .half, .word, .meta { animation: none; opacity: 1; filter: none; transform: none; stroke-dashoffset: 0; clip-path: none; }
  .dot { animation: none; }
}

/* v3: the giant name along the bottom. It sits fully hidden inside its own clipped box,
   then each letter slides up into view. Set --rise on .ground for when it starts. */
.ground { display: flex; justify-content: center; padding: 0 0 64px; }
.giant { margin: 0; display: flex; overflow: hidden; padding: 0 .05em; font-family: 'Unbounded', system-ui, sans-serif; font-weight: 700; font-size: 13.2vw; line-height: 1.12; letter-spacing: -0.035em; }
.giant span { display: inline-block; transform: translateY(120%); animation: km-rise 1.15s var(--out) forwards; animation-delay: calc(var(--rise, 2s) + var(--i, 0) * 60ms); }
@media (max-width: 560px) { .ground { padding-bottom: 52px; } }
@media (prefers-reduced-motion: reduce) { .giant span { animation: none; transform: none; } }
