:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-soft: #0c1020;
  --panel: rgba(15, 20, 35, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.72);
  --soft: rgba(244, 241, 234, 0.12);
  --accent: #f4b860;
  --accent-2: #64d2ff;
  --tile: #111827;
  --tile-top: #1c2435;
  --tile-bottom: #0f1625;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(100, 210, 255, 0.16), transparent 32%),
    radial-gradient(circle at 80% 15%, rgba(244, 184, 96, 0.16), transparent 24%),
    linear-gradient(160deg, #05070c 0%, #080d16 50%, #05070c 100%);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.page__glow,
.page__noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page__glow {
  filter: blur(70px);
  opacity: 0.6;
}

.page__glow--one {
  background: radial-gradient(circle at 15% 25%, rgba(100, 210, 255, 0.18), transparent 30%);
}

.page__glow--two {
  background: radial-gradient(circle at 85% 30%, rgba(244, 184, 96, 0.18), transparent 28%);
}

.page__noise {
  opacity: 0.07;
  background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.brand__mark {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  margin: 0;
  padding: 11px 15px;
  border: 1px solid rgba(244, 184, 96, 0.22);
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.08);
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 150px);
  padding-bottom: 24px;
}

.hero__copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.25rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  max-width: 10ch;
}

.lede {
  margin: 22px 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.65;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), #ffdca2);
  color: #0a0c12;
  box-shadow: 0 18px 35px rgba(244, 184, 96, 0.22);
}

.button--ghost {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.hero__board {
  justify-self: end;
  width: min(100%, 560px);
}

.board-shell {
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%),
    rgba(10, 14, 24, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.board-shell__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.board-shell__label {
  color: var(--text);
}

.flip-board {
  display: grid;
  gap: 10px;
}

.board-row {
  display: grid;
  grid-template-columns: repeat(var(--row-width), minmax(0, 1fr));
  gap: 8px;
}

.flap {
  position: relative;
  aspect-ratio: 0.82 / 1;
  min-height: 52px;
  perspective: 800px;
  border-radius: 12px;
  background: var(--tile);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.flap__top,
.flap__bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(0.9rem, 1.2vw, 1.08rem);
  color: var(--text);
}

.flap__top {
  top: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--tile-top), var(--tile));
  transform-origin: bottom;
}

.flap__bottom {
  bottom: 0;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, var(--tile), var(--tile-bottom));
  transform-origin: top;
}

.flap__top::after,
.flap__bottom::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.flap__top::after {
  bottom: 0;
}

.flap__bottom::before {
  top: 0;
}

.flap__char {
  position: relative;
  top: 1px;
  transform: translateY(2px);
}

.flap::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-0.5px);
}

.flap.is-flipping .flap__top {
  animation: flipTop 280ms ease-in forwards;
}

.flap.is-flipping .flap__bottom {
  animation: flipBottom 280ms ease-out forwards;
}

@keyframes flipTop {
  0% {
    transform: rotateX(0deg);
  }
  100% {
    transform: rotateX(-88deg);
  }
}

@keyframes flipBottom {
  0% {
    transform: rotateX(88deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.board-caption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.signal-card {
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
}

.signal-card__kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.signal-card h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.signal-card p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__board {
    justify-self: start;
    width: 100%;
  }

  .signals {
    grid-template-columns: 1fr;
  }
}

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-shell {
    padding: 16px;
  }

  .board-row {
    gap: 6px;
  }

  .flap {
    min-height: 42px;
    border-radius: 10px;
  }

  .flap__top,
  .flap__bottom {
    border-radius: inherit;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }
}
