:root {
  --ink: #080706;
  --ink-soft: #16110d;
  --paper: #fffaf0;
  --stone: #d89235;
  --stone-light: #ffd991;
  --sky: #1aa5f7;
  --electric: #6f2cff;
  --cyan: #1fdcff;
  --header-h: 76px;
  --scroll: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--paper);
  background: var(--ink);
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
}

::selection {
  color: var(--ink);
  background: var(--stone-light);
}

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

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

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

.scroll-fracture {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  width: 4px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.scroll-fracture span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleY(var(--scroll));
  transform-origin: top;
  background: linear-gradient(var(--cyan), var(--electric), var(--stone));
  box-shadow: 0 0 18px var(--cyan);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(to bottom, rgba(5, 5, 4, 0.84), rgba(5, 5, 4, 0.18));
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 0.88rem;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.site-header nav a {
  position: relative;
}

.site-header nav a:not(.nav-enter)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--stone-light);
  transition: transform 180ms ease;
}

.site-header nav a:hover::after {
  transform: scaleX(1);
}

.nav-enter {
  padding: 11px 18px;
  color: var(--ink);
  background: var(--paper);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #111;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent 24%, transparent 60%, rgba(5, 4, 2, 0.74)),
    linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent 38%);
}

.hero-art {
  position: absolute;
  z-index: -3;
  inset: var(--header-h) 0 0;
  overflow: hidden;
  background: #111;
  transform: none;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: -3%;
  background: url("ethlehem-banner.png") center / cover no-repeat;
  filter: blur(16px) brightness(0.48) saturate(0.9);
  transform: scale(1.05);
}

.hero-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-banner {
  display: block;
  object-fit: contain;
  object-position: center top;
}

.hero-logo {
  display: none;
}

.sun-bloom {
  position: absolute;
  top: -20%;
  right: 6%;
  width: min(58vw, 900px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.28;
  background: repeating-conic-gradient(from 0deg, rgba(255, 238, 180, 0.26) 0 3deg, transparent 3deg 12deg);
  filter: blur(12px);
  animation: sun-spin 50s linear infinite;
}

.heat-haze {
  position: absolute;
  inset: 45% 0 0;
  opacity: 0.16;
  background: repeating-linear-gradient(176deg, transparent 0 11px, rgba(255, 255, 255, 0.28) 12px, transparent 14px 24px);
  filter: blur(5px);
  animation: haze 6s ease-in-out infinite alternate;
}

.hero-copy {
  position: absolute;
  z-index: 3;
  bottom: 12vh;
  left: clamp(24px, 5vw, 78px);
  max-width: 430px;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.66);
}

.eyebrow {
  margin: 0 0 18px;
  font-size: clamp(0.74rem, 1vw, 0.9rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--stone-light);
}

.tagline {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 3.1rem);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.tagline strong {
  display: inline-block;
  margin-top: 8px;
  font-weight: 950;
}

.crack-target {
  position: absolute;
  z-index: 8;
  top: 49%;
  right: 22.5%;
  width: clamp(150px, 16vw, 260px);
  aspect-ratio: 1;
  transform: translate(50%, -50%);
  border: 0;
  padding: 0;
  cursor: crosshair;
  color: var(--paper);
  background: transparent;
}

.target-ring,
.target-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.target-ring {
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 35px rgba(31, 220, 255, 0.14), 0 0 42px rgba(31, 220, 255, 0.2);
  animation: ring-pulse 2.2s ease-out infinite;
}

.target-core {
  inset: 28%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.68), rgba(31, 220, 255, 0.15) 38%, transparent 70%);
  transition: opacity 200ms ease, transform 200ms ease;
}

.crack-target:hover .target-core,
.crack-target:focus-visible .target-core {
  opacity: 1;
  transform: scale(1.24);
}

.target-label {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  width: max-content;
  transform: translateX(-50%);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(5, 5, 4, 0.56);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.crack-console {
  position: absolute;
  z-index: 5;
  right: clamp(20px, 4vw, 60px);
  bottom: 42px;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 7, 6, 0.62);
  backdrop-filter: blur(12px);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.console-meter {
  display: flex;
  gap: 5px;
}

.console-meter i {
  width: 28px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.hero[data-stage="1"] .console-meter i:nth-child(1),
.hero[data-stage="2"] .console-meter i:nth-child(-n + 2),
.hero[data-stage="3"] .console-meter i {
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 38px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.scroll-cue i {
  width: 46px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.scroll-cue i::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  background: var(--paper);
  animation: cue 1.8s ease-in-out infinite;
}

.impact-flash {
  position: absolute;
  z-index: 6;
  top: var(--impact-y, 50%);
  left: var(--impact-x, 76%);
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  background: white;
  box-shadow: 0 0 40px 18px var(--cyan), 0 0 100px 40px var(--electric);
}

.hero.is-impacting .impact-flash {
  animation: impact 520ms ease-out;
}

.hero.is-impacting .hero-art {
  animation: none;
}

.shard {
  position: absolute;
  z-index: 9;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.72);
  pointer-events: none;
  clip-path: polygon(0 0, 100% 38%, 34% 100%);
  background: linear-gradient(135deg, #fff1c4, #b56d21 55%, #34200f);
  box-shadow: 0 0 9px rgba(31, 220, 255, 0.7);
  animation: shard-fly 900ms ease-out forwards;
}

.gate-panel {
  position: absolute;
  z-index: 20;
  inset: var(--header-h) 0 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 32px;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.04);
  background: radial-gradient(circle at 72% 44%, rgba(31, 220, 255, 0.19), transparent 25%), rgba(6, 5, 4, 0.88);
  backdrop-filter: blur(14px) saturate(0.84);
  transition: opacity 500ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1), visibility 500ms;
}

.hero[data-stage="3"] .gate-panel {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.hero[data-stage="3"] .crack-target,
.hero[data-stage="3"] .hero-copy,
.hero[data-stage="3"] .crack-console,
.hero[data-stage="3"] .scroll-cue {
  visibility: hidden;
}

.gate-kicker {
  margin: 0 0 12px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  color: var(--stone-light);
}

.gate-panel h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(4.2rem, 11vw, 10rem);
  line-height: 0.74;
  letter-spacing: -0.08em;
  font-weight: 950;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(34px, 6vh, 70px);
}

.action {
  min-width: 190px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

a.action:hover {
  transform: translateY(-4px);
  color: var(--ink);
  background: var(--stone-light);
}

.action-light {
  color: var(--ink);
  background: var(--paper);
}

.action-disabled {
  color: rgba(255, 255, 255, 0.52);
  border-color: rgba(255, 255, 255, 0.18);
}

.continue-link {
  margin-top: 28px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.continue-link span {
  margin-left: 8px;
  color: var(--cyan);
}

.origin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(40px, 8vw, 140px);
  min-height: 100svh;
  padding: clamp(100px, 13vw, 190px) clamp(24px, 8vw, 140px);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 38%, rgba(41, 168, 255, 0.13), transparent 28%),
    linear-gradient(145deg, #080706 0 63%, #16100b 63%);
}

.origin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 9%;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(255, 217, 145, 0.52), transparent);
}

.origin-number {
  position: absolute;
  top: 8%;
  left: -1vw;
  opacity: 0.04;
  font-size: clamp(15rem, 32vw, 34rem);
  line-height: 0.8;
  font-weight: 950;
  letter-spacing: -0.12em;
}

.origin-copy,
.origin-visual {
  position: relative;
  z-index: 2;
}

.origin h2,
.portal h2 {
  margin: 0;
  font-size: clamp(3rem, 6.2vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.origin-lead {
  max-width: 580px;
  margin: 34px 0 0;
  color: rgba(255, 250, 240, 0.7);
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  line-height: 1.65;
}

.origin-visual {
  margin: 0;
}

.origin-visual::before {
  content: "";
  position: absolute;
  inset: 9% -8% -8% 9%;
  border: 1px solid rgba(255, 217, 145, 0.26);
}

.origin-visual img {
  position: relative;
  display: block;
  width: 100%;
  max-width: 640px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}

.origin-visual figcaption {
  position: relative;
  margin-top: 22px;
  text-align: right;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--stone-light);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms ease, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.manifesto {
  padding: clamp(80px, 12vw, 160px) clamp(22px, 6vw, 100px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--paper);
  color: var(--ink);
}

.manifesto p {
  margin: 0;
  font-size: clamp(2.3rem, 6.7vw, 8.2rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.manifesto p:nth-child(2) {
  color: transparent;
  -webkit-text-stroke: 1px rgba(8, 7, 6, 0.5);
}

.manifesto p:last-child {
  max-width: 1100px;
  margin-top: 22px;
  color: var(--stone);
}

.portal {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(40px, 8vw, 140px);
  padding: clamp(110px, 14vw, 210px) clamp(24px, 8vw, 140px);
  background:
    linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.92)),
    url("ethlehem-banner.png") center / cover fixed;
}

.portal-links {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.portal-links > * {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto 28px;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 15px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  transition: padding 220ms ease, background 220ms ease, color 220ms ease;
}

.portal-links a:hover {
  padding-right: 18px;
  padding-left: 18px;
  color: var(--ink);
  background: var(--paper);
}

.link-index,
.link-handle {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
}

.portal-links a:hover .link-index,
.portal-links a:hover .link-handle {
  color: rgba(8, 7, 6, 0.58);
}

.link-name {
  font-size: clamp(1.1rem, 1.7vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.link-arrow {
  font-size: 1.5rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  justify-self: center;
  border-radius: 50%;
  background: var(--stone-light);
  box-shadow: 0 0 0 0 rgba(255, 217, 145, 0.55);
  animation: dot-pulse 1.8s infinite;
}

.contract {
  display: grid;
  grid-template-columns: 0.4fr 1fr 0.8fr;
  align-items: center;
  gap: 30px;
  padding: 42px clamp(24px, 8vw, 140px);
  background: var(--stone-light);
  color: var(--ink);
}

.contract p,
.contract span {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.contract strong {
  font-size: clamp(1.35rem, 2.4vw, 2.5rem);
  letter-spacing: -0.04em;
}

.contract span {
  max-width: 360px;
  justify-self: end;
  line-height: 1.5;
  text-align: right;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 30px;
  padding: 80px clamp(24px, 8vw, 140px) 36px;
  color: rgba(255, 250, 240, 0.54);
  background: var(--ink);
  font-size: 0.72rem;
}

.footer-brand {
  color: var(--paper);
  font-size: clamp(3rem, 8vw, 10rem);
  line-height: 0.75;
  letter-spacing: -0.08em;
  font-weight: 950;
}

.noscript {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  color: var(--ink);
  background: var(--stone-light);
  text-align: center;
  font-weight: 700;
}

@keyframes ring-pulse {
  0% { transform: scale(0.82); opacity: 0; }
  32% { opacity: 0.95; }
  100% { transform: scale(1.18); opacity: 0; }
}

@keyframes sun-spin {
  to { transform: rotate(360deg); }
}

@keyframes haze {
  to { transform: translateY(-16px) scaleX(1.03); }
}

@keyframes cue {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(220%); }
}

@keyframes impact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(10); }
}

@keyframes quake {
  10%, 90% { transform: translate3d(-2px, 0, 0) scale(1.025); }
  20%, 80% { transform: translate3d(4px, 1px, 0) scale(1.025); }
  30%, 50%, 70% { transform: translate3d(-7px, -2px, 0) scale(1.025); }
  40%, 60% { transform: translate3d(7px, 2px, 0) scale(1.025); }
}

@keyframes shard-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); }
}

@keyframes dot-pulse {
  70% { box-shadow: 0 0 0 12px rgba(255, 217, 145, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 217, 145, 0); }
}

@media (max-width: 960px) {
  .origin,
  .portal {
    grid-template-columns: 1fr;
  }

  .origin-visual {
    width: min(78vw, 620px);
    margin: auto;
  }

  .portal-heading {
    max-width: 700px;
  }

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

  .contract span {
    justify-self: start;
    text-align: left;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 66px;
  }

  .site-header {
    padding: 0 16px 0 20px;
  }

  .brand span,
  .site-header nav a:not(.nav-enter) {
    display: none;
  }

  .nav-enter {
    padding: 10px 15px;
  }

  .hero {
    min-height: 100svh;
    background:
      radial-gradient(circle at 50% 34%, rgba(27, 160, 255, 0.56), transparent 44%),
      linear-gradient(#093260, #16100b 70%);
  }

  .hero::after {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08), transparent 45%, rgba(6, 4, 2, 0.86));
  }

  .hero-art {
    inset: var(--header-h) 0 auto;
    height: min(104vw, 64svh);
    transform: none;
  }

  .hero-banner {
    display: none;
  }

  .hero-logo {
    display: block;
    object-fit: contain;
    object-position: top center;
  }

  .sun-bloom {
    top: -30%;
    right: -20%;
    width: 100vw;
  }

  .crack-target {
    top: calc(var(--header-h) + min(44vw, 31svh));
    right: 50%;
    width: min(38vw, 180px);
  }

  .target-label {
    top: calc(100% + 10px);
    font-size: 0.6rem;
  }

  .hero-copy {
    right: 22px;
    bottom: 15svh;
    left: 22px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .tagline {
    font-size: clamp(1.65rem, 8.5vw, 2.5rem);
  }

  .crack-console {
    right: 18px;
    bottom: 24px;
    left: 18px;
    grid-template-columns: auto 1fr auto;
  }

  .console-meter {
    justify-content: center;
  }

  .console-meter i {
    width: clamp(28px, 13vw, 52px);
  }

  .scroll-cue {
    display: none;
  }

  .gate-panel {
    padding: 28px 20px;
  }

  .gate-panel h2 {
    font-size: clamp(4rem, 21vw, 7rem);
    line-height: 0.78;
  }

  .gate-actions {
    display: grid;
    width: min(100%, 390px);
    margin-top: 40px;
  }

  .action {
    width: 100%;
  }

  .origin {
    padding: 110px 24px;
  }

  .origin h2,
  .portal h2 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .origin-visual {
    width: 100%;
  }

  .manifesto {
    padding: 90px 22px;
  }

  .manifesto p {
    font-size: clamp(2.7rem, 14vw, 5rem);
  }

  .portal {
    padding: 110px 22px;
    background-attachment: scroll;
  }

  .portal-links > * {
    grid-template-columns: 32px 1fr 24px;
  }

  .link-handle {
    display: none;
  }

  .contract {
    padding: 34px 22px;
  }

  footer {
    grid-template-columns: 1fr;
    padding: 76px 22px 34px;
  }

  .footer-brand {
    grid-column: auto;
    font-size: 18vw;
  }
}

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

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

  .hero-art {
    transform: none !important;
  }
}