:root {
  color-scheme: dark;
  --void: #080a0f;
  --deep: #111823;
  --panel: rgba(235, 244, 245, 0.07);
  --line: rgba(235, 244, 245, 0.16);
  --text: #f2f6f2;
  --muted: #b8c4c4;
  --cyan: #66d9e8;
  --gold: #e6bf67;
  --red: #a6464f;
  --green: #4f8a6a;
  --shadow: 0 24px 86px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(102, 217, 232, 0.12), transparent 28%),
    linear-gradient(260deg, rgba(166, 70, 79, 0.14), transparent 44%),
    var(--void);
  font-family: Georgia, "Times New Roman", serif;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(8, 10, 15, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(102, 217, 232, 0.72);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
}

.nav-links a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--line);
  color: var(--text);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 86vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-overlay,
.hero-content {
  grid-area: 1 / 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: contrast(1.08) saturate(0.86);
}

.hero-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.96) 0%, rgba(8, 10, 15, 0.7) 48%, rgba(8, 10, 15, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 10, 15, 0.92) 0%, transparent 46%);
}

.hero-content {
  z-index: 2;
  align-self: center;
  width: min(780px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: 86px 0 112px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.4rem, 10vw, 8.2rem);
  line-height: 0.88;
  font-weight: 600;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 6vw, 4.1rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.32rem;
}

p {
  line-height: 1.68;
}

.hero-copy {
  width: min(680px, 100%);
  margin-bottom: 26px;
  color: #dce7e7;
  font-size: 1.18rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: Arial, sans-serif;
}

.primary-action,
.secondary-action,
button {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-action,
.secondary-action {
  text-decoration: none;
}

.primary-action {
  color: #061014;
  background: var(--cyan);
}

.secondary-action,
button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(235, 244, 245, 0.06);
}

button {
  cursor: pointer;
}

button:hover,
button:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: rgba(102, 217, 232, 0.62);
  outline: none;
}

.truth-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.truth-band article {
  min-height: 170px;
  padding: clamp(24px, 4vw, 46px);
  background: #10151d;
  border-right: 1px solid var(--line);
}

.truth-band article:nth-child(2) {
  background: #121b1d;
}

.truth-band article:nth-child(3) {
  background: #1a1419;
  border-right: 0;
}

.truth-band h2 {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 2rem;
}

.truth-band p {
  margin: 0;
  color: var(--muted);
}

.section {
  padding: clamp(64px, 9vw, 116px) clamp(18px, 5vw, 72px);
}

.section-heading {
  width: min(980px, 100%);
  margin-bottom: 34px;
}

.section-heading p {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.06rem;
}

.section-heading.narrow {
  width: min(880px, 100%);
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.narrow p {
  margin-right: auto;
  margin-left: auto;
}

.translator-section {
  background: #0d1118;
}

.translator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.translator-panel,
.decoder-status,
.cards-grid article,
.timeline article,
.principles-grid article,
.oracle-card,
.sources-grid a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.translator-panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h3 {
  margin: 0;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.26);
  font: 1rem/1.6 Consolas, "Courier New", monospace;
}

textarea:focus {
  border-color: rgba(102, 217, 232, 0.7);
  outline: none;
}

.button-row {
  margin-top: 14px;
}

.decoder-status {
  margin-top: 16px;
  padding: 16px 18px;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

.decoder-status.good {
  border-color: rgba(79, 138, 106, 0.7);
  color: #c9f0d8;
}

.decoder-status.bad {
  border-color: rgba(166, 70, 79, 0.82);
  color: #ffd6dc;
}

.maximus-section {
  background: #111318;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
}

.image-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-panel p {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.34);
}

.cards-grid,
.timeline,
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cards-grid article,
.timeline article,
.principles-grid article {
  min-height: 194px;
  padding: 24px;
}

.date {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--cyan);
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cards-grid p,
.timeline p,
.principles-grid p,
.oracle-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.quantum-section {
  background:
    linear-gradient(135deg, rgba(79, 138, 106, 0.15), transparent 48%),
    #0d1416;
}

.principles-grid {
  margin-top: 16px;
}

.codex-section {
  background: #111019;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

figure {
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

figure img {
  width: 100%;
  height: 310px;
  object-fit: cover;
}

figure:nth-child(4) img {
  object-fit: contain;
  padding: 24px;
  background: #080a0f;
}

figcaption {
  min-height: 92px;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.45;
}

.oracle-card {
  width: min(960px, 100%);
  margin: 34px auto 0;
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
}

#oracleBinary {
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
}

.sources-section {
  background: #0c1015;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sources-grid a {
  min-height: 58px;
  padding: 17px 18px;
  color: var(--muted);
  text-decoration: none;
}

.sources-grid a:hover,
.sources-grid a:focus-visible {
  border-color: rgba(102, 217, 232, 0.62);
  color: var(--text);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: #05070b;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(8, 10, 15, 0.97) 0%, rgba(8, 10, 15, 0.72) 66%, rgba(8, 10, 15, 0.14) 100%);
  }

  .hero-content {
    align-self: end;
    margin-right: 18px;
    margin-left: 18px;
  }

  h1 {
    font-size: 3.6rem;
  }

  .truth-band,
  .translator-grid,
  .cards-grid,
  .timeline,
  .principles-grid,
  .gallery-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .truth-band article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
