:root {
  --bg: #120d25;
  --bg-deep: #05030f;
  --ink: #fff4e8;
  --muted: rgba(255, 244, 232, 0.72);
  --line: rgba(255, 244, 232, 0.14);
  --hot: #ff6b3d;
  --sun: #ffc857;
  --mint: #94ffd8;
  --pink: #ff7be5;
  --violet: #8d6bff;
  --shadow: 0 32px 120px rgba(0, 0, 0, 0.38);
  --radius-xl: 38px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Syne", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 61, 0.42), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(141, 107, 255, 0.28), transparent 26%),
    radial-gradient(circle at 78% 82%, rgba(148, 255, 216, 0.16), transparent 22%),
    linear-gradient(135deg, #1c1238 0%, var(--bg) 42%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(295deg, rgba(255, 255, 255, 0.03), transparent 26%);
  pointer-events: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.sky {
  position: fixed;
  width: 42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.32;
  pointer-events: none;
}

.sky-left {
  top: -18rem;
  left: -14rem;
  background: linear-gradient(135deg, rgba(255, 200, 87, 0.86), rgba(255, 123, 229, 0.22));
}

.sky-right {
  right: -12rem;
  bottom: -14rem;
  background: linear-gradient(135deg, rgba(141, 107, 255, 0.66), rgba(148, 255, 216, 0.18));
}

.grain {
  position: fixed;
  inset: 0;
  opacity: 0.075;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.75) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.75) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at center, black, transparent 92%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(11, 7, 26, 0.62);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.eyebrow,
.console-label,
.pulse-label,
.statement-index,
.sticker,
.chip {
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow,
.console-label,
.pulse-label {
  margin: 0;
  font-size: 0.74rem;
  color: var(--sun);
}

h1,
h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 0.9;
}

h1 {
  font-size: clamp(4rem, 11vw, 8.8rem);
  max-width: 7ch;
}

h2 {
  font-size: clamp(4.4rem, 15vw, 10.5rem);
}

p {
  margin: 0;
  line-height: 1.6;
}

.gate,
.poster {
  min-height: calc(100vh - 2.4rem);
  align-items: center;
}

.gate,
.poster:not([hidden]) {
  display: grid;
}

.gate {
  grid-template-columns: minmax(16rem, 0.9fr) minmax(20rem, 1.1fr);
  gap: 1.4rem;
}

.gate-copy {
  padding: clamp(1rem, 3vw, 2rem);
}

.gate-intro {
  max-width: 33rem;
  margin-top: 1.2rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.gate-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.gate-note span {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
}

.console {
  padding: clamp(1.2rem, 3vw, 1.8rem);
}

.console::before {
  content: "";
  position: absolute;
  inset: auto -15% -45% auto;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 123, 229, 0.22), transparent 68%);
  pointer-events: none;
}

.console-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: baseline;
}

.console-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.statement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.statement-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 9rem;
  padding: 1rem;
  text-align: left;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(8, 5, 18, 0.64);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.statement-card:last-child {
  grid-column: span 2;
}

.statement-card:hover {
  transform: translateY(-2px);
}

.statement-card.is-selected {
  border-color: rgba(255, 200, 87, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.22), rgba(255, 255, 255, 0.05)),
    rgba(34, 17, 14, 0.66);
  box-shadow: 0 18px 40px rgba(255, 107, 61, 0.18);
}

.statement-card.is-valid {
  border-color: rgba(148, 255, 216, 0.62);
}

.statement-card.is-invalid {
  border-color: rgba(255, 107, 61, 0.62);
}

.statement-index {
  font-size: 0.7rem;
  color: var(--mint);
}

.statement-text {
  max-width: 24ch;
  font-size: 1rem;
  line-height: 1.45;
}

.console-actions,
.poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.primary-button {
  border: 0;
  color: #1c0e08;
  background: linear-gradient(135deg, var(--sun), var(--hot));
}

.ghost-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.console-feedback {
  min-height: 1.8rem;
  margin-top: 1rem;
  color: var(--muted);
}

.console-feedback.is-error {
  color: #ffb19c;
}

.console-feedback.is-success {
  color: var(--mint);
}

.poster-frame {
  min-height: calc(100vh - 2.4rem);
  padding: clamp(1.3rem, 4vw, 2.3rem);
}

.poster-backword {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(5rem, 24vw, 18rem);
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  pointer-events: none;
}

.poster-arc {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.poster-arc-a {
  width: 48rem;
  height: 48rem;
  top: -24rem;
  right: -16rem;
}

.poster-arc-b {
  width: 36rem;
  height: 36rem;
  left: -14rem;
  bottom: -18rem;
}

.poster-topline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.sticker,
.chip {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.sticker {
  color: #200b00;
  background: linear-gradient(135deg, var(--sun), var(--hot));
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.poster-title,
.poster-copy,
.pulse-card,
.poster-actions {
  position: relative;
  z-index: 1;
}

.poster-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1.4rem;
  min-height: calc(100vh - 7rem);
  align-items: start;
}

.poster-main {
  display: grid;
  align-content: start;
}

.poster-side {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding-top: clamp(4rem, 14vh, 9rem);
}

.poster-title {
  display: flex;
  flex-direction: column;
  margin-top: clamp(2rem, 8vh, 5rem);
}

.poster-title span:last-child {
  margin-left: clamp(2rem, 12vw, 12rem);
}

.poster-copy {
  max-width: 37rem;
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
}

.pulse-card {
  width: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 123, 229, 0.22), rgba(255, 200, 87, 0.08)),
    rgba(7, 5, 18, 0.74);
  box-shadow: 0 20px 60px rgba(255, 107, 61, 0.16);
}

.pulse-message {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.08;
  max-width: 10ch;
}

.word-cluster {
  display: grid;
  gap: 0.75rem;
}

.word-cluster span {
  justify-self: end;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 0.86rem;
}

.word-cluster span:nth-child(2) {
  margin-right: 2.6rem;
}

.word-cluster span:nth-child(3) {
  margin-right: 0.8rem;
}

.word-cluster span:nth-child(4) {
  margin-right: 4.2rem;
}

.noscript-panel {
  margin: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink);
}

.is-hidden {
  display: none !important;
}

.shake {
  animation: shake 360ms ease;
}

body.is-unlocked .poster-frame {
  animation: poster-in 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-unlocked .pulse-card {
  animation: rise-in 800ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes poster-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(18px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  20% {
    transform: translateX(-5px);
  }

  45% {
    transform: translateX(5px);
  }

  65% {
    transform: translateX(-3px);
  }
}

@media (max-width: 980px) {
  .gate {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 0.8rem;
  }

  .poster-frame {
    min-height: auto;
  }

  .poster-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .poster-title span:last-child {
    margin-left: 0;
  }

  .word-cluster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .word-cluster span,
  .word-cluster span:nth-child(2),
  .word-cluster span:nth-child(3),
  .word-cluster span:nth-child(4) {
    justify-self: start;
    margin-right: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--max));
    padding-top: 0.5rem;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.4rem);
  }

  h2 {
    font-size: clamp(3.8rem, 19vw, 6rem);
  }

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

  .statement-card:last-child {
    grid-column: span 1;
  }

  .statement-card {
    min-height: 0;
  }

  .poster-backword {
    top: 28%;
    font-size: clamp(4.2rem, 28vw, 8rem);
  }

  .poster-side {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
