:root {
  --text: #f7fbff;
  --text-dim: rgba(247, 251, 255, 0.6);
  --text-faint: rgba(247, 251, 255, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --panel: rgba(255, 255, 255, 0.03);
  --panel-hover: rgba(255, 255, 255, 0.055);

  --accent-1: #ae35ff;
  --accent-2: #2631ff;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --focus: #c98bff;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);

  --radius: 14px;
  --wrap: 1060px;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000000;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(174, 53, 255, 0.4);
  color: #fff;
}

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

.scramble {
  position: relative;
}

.scramble-fx {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

.scramble.is-scrambling .scramble-real {
  color: transparent;
}

.scramble.is-scrambling .scramble-fx {
  display: block;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

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

main {
  flex: 1;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  background: #fff;
  color: #000;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0.85rem;
}

/* header */

.site-header {
  --fade: 56px;
  position: sticky;
  top: 0;
  z-index: 40;
  padding-bottom: var(--fade);
  margin-bottom: calc(var(--fade) * -1);
  pointer-events: none;
}

/* soft blur behind the header that fades out together with the tint */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.site-header::before {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
}

/* eased fade that starts right at the top: no solid band, no visible edge */
.site-header::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.701) 19%,
    rgba(0, 0, 0, 0.514) 34%,
    rgba(0, 0, 0, 0.363) 47%,
    rgba(0, 0, 0, 0.264) 56.5%,
    rgba(0, 0, 0, 0.184) 65%,
    rgba(0, 0, 0, 0.12) 73%,
    rgba(0, 0, 0, 0.071) 80.2%,
    rgba(0, 0, 0, 0.04) 86.1%,
    rgba(0, 0, 0, 0.02) 91%,
    rgba(0, 0, 0, 0.008) 95.2%,
    rgba(0, 0, 0, 0.002) 98.2%,
    rgba(0, 0, 0, 0.0) 100%
  );
}

.site-header > * {
  pointer-events: auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  line-height: 1;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.clock .clock-side {
  display: block;
  white-space: nowrap;
}

.clock .clock-tz {
  color: var(--text-faint);
  font-weight: 400;
}

.clock .digit-strip {
  display: inline-flex;
}

.clock .digit-slot {
  display: block;
  position: relative;
  height: 1em;
  overflow: hidden;
}

.clock .digit-reel {
  display: block;
}

.clock .digit-reel span {
  display: block;
  height: 1em;
}

/* buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease),
    filter 0.35s var(--ease);
}

.btn .icon {
  font-size: 0.85rem;
  transition: transform 0.35s var(--ease);
}

.btn .icon-home {
  font-size: 1.05rem;
}

/* clips the arrow so it can drop out and back in on hover */
.btn-arrow {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.btn-arrow .icon {
  font-size: 0.95rem;
}

.btn-primary {
  border-color: transparent;
  background: var(--accent-grad) border-box;
  box-shadow: 0 8px 24px -10px rgba(174, 53, 255, 0.7);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary:focus-visible {
  filter: brightness(1.12);
  box-shadow:
    0 12px 30px -10px rgba(174, 53, 255, 0.85);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .btn-primary:hover {
    filter: brightness(1.12);
    box-shadow:
      0 12px 30px -10px rgba(174, 53, 255, 0.85);
  }

  .btn-primary:hover .btn-arrow .icon {
    animation: arrow-drop 0.6s var(--ease);
  }

  .btn-primary:hover .icon-home {
    transform: translateY(-1px);
  }

  .btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
  }
}

@keyframes arrow-drop {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(150%);
  }
  46% {
    transform: translateY(-150%);
  }
  100% {
    transform: translateY(0);
  }
}

/* glitch title */

.glitch-title {
  position: relative;
  text-shadow:
    -1.5px 0 rgba(174, 53, 255, 0.35),
    1.5px 0 rgba(38, 49, 255, 0.35);
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: #000000;
  overflow: hidden;
  pointer-events: none;
  color: var(--text);
  text-shadow: none;
  display: none;
}

.glitch-title::before {
  translate: 3px 0;
  text-shadow: -2px 0 var(--accent-1);
}

.glitch-title::after {
  translate: -3px 0;
  text-shadow: -2px 0 var(--accent-2);
}

.glitch-title.burst {
  animation: h1-burst-skew 0.55s steps(7) both;
}

.glitch-title.burst::before {
  display: block;
  animation: h1-burst-1 0.55s steps(7) both;
}

.glitch-title.burst::after {
  display: block;
  animation: h1-burst-2 0.55s steps(7) both;
}

/* scanlines + grain */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 1px,
    transparent 3px
  );
}

.grain {
  position: fixed;
  inset: -6%;
  z-index: 111;
  pointer-events: none;
  opacity: 0.05;
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* footer */

.site-footer {
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.875rem;
}

.footer-note {
  color: var(--text-dim);
}

.footer-note a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.footer-note a:hover {
  text-decoration-color: currentColor;
}

.footer-copy {
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

html:not(.js) .js-only {
  display: none;
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 1.75rem, var(--wrap));
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .clock .clock-tz {
    display: none;
  }
}

@keyframes h1-burst-1 {
  0% {
    clip-path: inset(0% 0 58% 0);
    translate: -7px 1px;
  }
  14% {
    clip-path: inset(42% 0 8% 0);
    translate: 9px -2px;
  }
  28% {
    clip-path: inset(66% 0 2% 0);
    translate: -10px 1px;
  }
  42% {
    clip-path: inset(20% 0 52% 0);
    translate: 8px 2px;
  }
  57% {
    clip-path: inset(4% 0 74% 0);
    translate: -6px 0;
  }
  71% {
    clip-path: inset(55% 0 18% 0);
    translate: 10px -1px;
  }
  85% {
    clip-path: inset(30% 0 46% 0);
    translate: -5px 1px;
  }
  100% {
    clip-path: inset(0% 0 0% 0);
    translate: 3px 0;
  }
}

@keyframes h1-burst-2 {
  0% {
    clip-path: inset(58% 0 0 0);
    translate: 7px -1px;
  }
  14% {
    clip-path: inset(8% 0 44% 0);
    translate: -9px 2px;
  }
  28% {
    clip-path: inset(2% 0 68% 0);
    translate: 10px -1px;
  }
  42% {
    clip-path: inset(52% 0 22% 0);
    translate: -8px -2px;
  }
  57% {
    clip-path: inset(74% 0 4% 0);
    translate: 6px 0;
  }
  71% {
    clip-path: inset(18% 0 56% 0);
    translate: -10px 1px;
  }
  85% {
    clip-path: inset(46% 0 30% 0);
    translate: 5px -1px;
  }
  100% {
    clip-path: inset(0% 0 0% 0);
    translate: -3px 0;
  }
}

@keyframes h1-burst-skew {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: translate(2px, -1px) skewX(1.5deg);
  }
  62% {
    transform: translate(-3px, 1px) skewX(-1.6deg);
  }
}

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

  .glitch-title::before,
  .glitch-title::after {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
