:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(17, 23, 32, 0.74);
  --panel-strong: rgba(24, 31, 42, 0.92);
  --line: rgba(189, 224, 232, 0.18);
  --line-strong: rgba(189, 224, 232, 0.34);
  --text: #f4f7f8;
  --muted: #aeb9c2;
  --ice: #bde0e8;
  --ice-strong: #d7f5fb;
  --graphite: #171c24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(189, 224, 232, 0.05), transparent 320px),
    radial-gradient(circle at top right, rgba(189, 224, 232, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(189, 224, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 224, 232, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ice-strong);
  color: #061016;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.86);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  color: var(--ice-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.brand-mark {
  width: 0.72rem;
  height: 0.72rem;
  border: 1px solid var(--ice);
  background: rgba(189, 224, 232, 0.14);
  transform: rotate(45deg);
}

.main-nav {
  display: none;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ice-strong);
}

.hero,
.content-section {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: auto;
  align-items: center;
  padding: 2rem 0 3rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background:
    radial-gradient(circle at 50% 24%, rgba(215, 245, 251, 0.1), transparent 20rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.hero-content {
  width: min(100% - 2rem, 96rem);
  margin-inline: auto;
  max-width: none;
  position: relative;
  text-align: center;
}

.hero-art {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  filter: drop-shadow(0 1.5rem 5rem rgba(0, 0, 0, 0.72));
}

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--ice);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero-subtitle {
  max-width: 36rem;
  margin-inline: auto;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 4.5vw, 1.25rem);
}

.hero-actions,
.transmission-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-actions {
  justify-content: center;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--ice);
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ice-strong);
  color: #061016;
}

.button-secondary {
  background: rgba(189, 224, 232, 0.1);
}

.button-ghost {
  color: var(--ice-strong);
}

.content-section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.transmission-screen {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 40%, rgba(189, 224, 232, 0.14), transparent 22rem),
    repeating-linear-gradient(
      0deg,
      rgba(189, 224, 232, 0.05),
      rgba(189, 224, 232, 0.05) 1px,
      transparent 1px,
      transparent 14px
    ),
    var(--graphite);
  box-shadow: var(--shadow);
}

.screen-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(189, 224, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 224, 232, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}

.screen-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ice);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 20rem;
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
}

.screen-content h2 {
  margin: 0;
  font-size: clamp(1.6rem, 7vw, 3.6rem);
  line-height: 1.05;
}

.screen-content p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
}

.screen-status {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  color: var(--ice-strong);
  font-size: 0.8rem;
  animation: blink 1.3s steps(2, start) infinite;
}

.screen-status.pulse-reset {
  animation:
    restart-flash 520ms ease,
    blink 1.3s steps(2, start) 520ms infinite;
}

.transmission-actions {
  align-items: stretch;
}

.transcript {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 9, 13, 0.46);
  color: var(--muted);
}

.book-section {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.book-cover,
.saga-item,
.expanded-section,
.author-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.book-cover {
  display: grid;
  min-height: 24rem;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(160deg, rgba(244, 247, 248, 0.06), transparent 40%),
    var(--panel-strong);
}

.cover-frame {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, rgba(189, 224, 232, 0.12), transparent 42%),
    #0b0f15;
}

.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-copy p {
  color: var(--muted);
}

.saga-copy {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.saga-copy p {
  margin-bottom: 0;
}

.saga-copy strong {
  color: var(--ice-strong);
  font-size: 1.08em;
  text-shadow: 0 0 1rem rgba(189, 224, 232, 0.26);
}

.book-copy .book-meta {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
}

.release {
  color: var(--ice);
}

.saga-grid {
  display: grid;
  gap: 1rem;
}

.saga-grid {
  margin-top: 1.5rem;
}

.saga-item {
  padding: 1.2rem;
}

.saga-item {
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.saga-item span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ice);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.saga-item h3 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.section-heading {
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.05;
}

.section-heading p:last-child {
  margin-top: 0.75rem;
  color: var(--muted);
}

.expanded-section {
  display: grid;
  gap: 1.5rem;
  padding: 1rem;
  align-items: start;
}

.expanded-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(189, 224, 232, 0.1), transparent 45%),
    var(--panel-strong);
}

.expanded-image img {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
}

.expanded-copy {
  display: grid;
  gap: 0.85rem;
  color: var(--muted);
}

.expanded-copy h2 {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.05;
}

.expanded-copy p {
  margin-bottom: 0;
}

.expanded-question {
  color: var(--ice-strong);
  font-size: 1.1rem;
  font-weight: 800;
  text-shadow: 0 0 1rem rgba(189, 224, 232, 0.24);
}

.author-section {
  padding: 2rem;
}

.author-copy {
  display: grid;
  gap: 0.95rem;
  max-width: 54rem;
  color: var(--muted);
}

.author-copy p {
  margin-bottom: 0;
}

.author-copy blockquote {
  margin: 0.2rem 0;
  padding: 0.85rem 1rem;
  border-left: 1px solid var(--ice);
  border-radius: var(--radius);
  background: rgba(189, 224, 232, 0.08);
  color: var(--ice-strong);
  font-weight: 700;
}

.author-copy em {
  color: var(--text);
  font-style: normal;
}

.author-highlight {
  color: var(--ice-strong);
  font-size: 1.1rem;
  font-weight: 800;
  text-shadow: 0 0 1rem rgba(189, 224, 232, 0.22);
}

.author-section .button {
  margin-top: 1.5rem;
}

.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0.25rem;
}

@keyframes blink {
  0%,
  52% {
    opacity: 1;
  }

  53%,
  100% {
    opacity: 0.35;
  }
}

@keyframes restart-flash {
  0% {
    opacity: 0.2;
    transform: scale(0.98);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (min-width: 560px) {
  .hero-actions,
  .transmission-actions {
    grid-template-columns: repeat(3, max-content);
  }

  .transmission-actions {
    grid-template-columns: repeat(2, max-content);
  }

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

@media (min-width: 800px) {
  .site-header {
    padding-inline: 2rem;
  }

  .main-nav {
    display: flex;
  }

  .hero {
    min-height: calc(92vh - 65px);
  }

  .hero-art {
    width: min(100%, 112rem);
  }

  .hero-subtitle {
    margin-top: clamp(-4.5rem, -5vw, -1.2rem);
  }

  .book-section {
    grid-template-columns: minmax(18rem, 0.7fr) minmax(0, 1fr);
    gap: 2rem;
  }

  .expanded-section {
    grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.15fr);
    gap: 2rem;
    padding: 1.25rem;
  }

  .expanded-image {
    position: sticky;
    top: 5.5rem;
  }

  .saga-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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