:root {
  --bg: #050408;
  --bone: #f3eadc;
  --dim: #b7ab9a;
  --faint: rgba(243, 234, 220, 0.42);
  --line: rgba(243, 234, 220, 0.14);
  --hot: #fff4df;
  --ember: #ffb45a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--bone);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sky__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 78% 28%, rgba(255, 170, 70, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 18% 88%, rgba(80, 50, 20, 0.22), transparent 60%),
    linear-gradient(180deg, #050408 0%, #0a0810 48%, #050408 100%);
}

.sky__core {
  position: absolute;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  right: -4vw;
  top: 4vh;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      #fff 0 1.4%,
      rgba(255, 248, 230, 0.95) 2.2%,
      rgba(255, 200, 120, 0.45) 12%,
      rgba(180, 80, 20, 0.18) 28%,
      rgba(40, 18, 6, 0) 58%);
  filter: blur(0.3px);
}

.sky__jet {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 230, 0.95) 16%, rgba(255, 180, 90, 0.35) 55%, transparent 88%);
  box-shadow: 0 0 28px 4px rgba(255, 200, 120, 0.28);
}

.sky__jet--a {
  left: 56vw;
  right: -8vw;
  top: 24vh;
  transform: rotate(-9deg);
}

.sky__jet--b {
  left: 62vw;
  right: -4vw;
  top: 31vh;
  opacity: 0.45;
  height: 1px;
  transform: rotate(11deg);
  box-shadow: 0 0 18px 2px rgba(255, 170, 80, 0.2);
}

.sky__ring {
  position: absolute;
  right: -4vw;
  top: 8vh;
  border: 1px solid rgba(255, 236, 210, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(255, 190, 110, 0.1);
}

.sky__ring--outer {
  width: min(44vw, 540px);
  height: min(16vw, 200px);
  transform: rotate(-18deg);
}

.sky__ring--inner {
  width: min(30vw, 360px);
  height: min(11vw, 140px);
  right: 4vw;
  top: 14vh;
  border-color: rgba(255, 236, 210, 0.18);
  transform: rotate(-18deg);
}

.sky__shore {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 38vh;
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(255, 210, 140, 0.08), transparent 70%),
    linear-gradient(180deg, transparent, rgba(12, 8, 4, 0.85));
  border-top: 1px solid rgba(243, 234, 220, 0.06);
  transform: perspective(600px) rotateX(18deg);
  transform-origin: bottom center;
}

.sky__grain {
  position: absolute;
  inset: -20%;
  opacity: 0.2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  mix-blend-mode: overlay;
}

.bar, main, footer { position: relative; z-index: 1; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 6vw;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.word { text-decoration: none; }

.bar__nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.bar__nav a { text-decoration: none; color: var(--dim); }
.bar__nav a:hover { color: var(--bone); }

.bar__go {
  color: var(--bone) !important;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8vh 6vw 12vh;
  max-width: 48rem;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--hot);
  text-shadow: 0 0 40px rgba(255, 180, 90, 0.18);
}

.lede {
  max-width: 34rem;
  margin: 1.6rem 0 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.hero__actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 2.2rem 0 0;
}

.go {
  display: inline-block;
  text-decoration: none;
  background: var(--bone);
  color: #140f0a;
  padding: 0.9rem 1.2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.go:hover {
  background: var(--hot);
  box-shadow: 0 0 28px rgba(255, 200, 120, 0.25);
}

.quiet {
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.quiet:hover {
  color: var(--bone);
  border-bottom-color: var(--line);
}

.chapter {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.5rem;
  padding: 4.8rem 6vw;
  border-top: 1px solid var(--line);
  max-width: 70rem;
  backdrop-filter: blur(0.5px);
}

.num {
  margin: 0.35rem 0 0;
  color: var(--faint);
  letter-spacing: 0.14em;
}

h2 {
  margin: 0 0 1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.chapter p {
  max-width: 38rem;
  color: var(--dim);
}

.close {
  padding: 7rem 6vw 5.5rem;
  border-top: 1px solid var(--line);
}

.close__line {
  margin: 0 0 1.85rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  line-height: 1.05;
  max-width: 16ch;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 6vw 2rem;
  color: var(--faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  border-top: 1px solid var(--line);
}

footer a { text-decoration: none; }

@media (max-width: 820px) {
  .bar__nav a:not(.bar__go) { display: none; }
}

@media (max-width: 720px) {
  .sky__core { right: -34vw; top: -10vh; width: 95vw; height: 95vw; }
  .sky__jet--a { top: 16vh; left: 30vw; }
  .sky__jet--b { top: 22vh; left: 40vw; }
  .sky__ring--outer { right: -28vw; top: 2vh; width: 88vw; height: 32vw; }
  .sky__ring--inner { right: -18vw; top: 8vh; width: 62vw; height: 22vw; }
  .hero { min-height: auto; padding-top: 20vh; padding-bottom: 8vh; }
  h1 { font-size: 3.05rem; }
  .chapter { grid-template-columns: 1fr; gap: 0.4rem; padding-top: 3rem; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .sky__ring--outer { animation: drift 34s linear infinite; }
  .sky__ring--inner { animation: drift-rev 22s linear infinite; }
  .sky__core { animation: breathe 7.5s ease-in-out infinite; }
  .sky__jet--a { animation: pulse-jet 5.5s ease-in-out infinite; }
  .sky__jet--b { animation: pulse-jet 7s ease-in-out infinite 0.8s; }
  .hero, .chapter, .close {
    animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .chapter:nth-of-type(2) { animation-delay: 40ms; }
  .chapter:nth-of-type(3) { animation-delay: 80ms; }
  .chapter:nth-of-type(4) { animation-delay: 120ms; }
  .chapter:nth-of-type(5) { animation-delay: 160ms; }
}

@keyframes drift {
  from { transform: rotate(-18deg); }
  to { transform: rotate(342deg); }
}

@keyframes drift-rev {
  from { transform: rotate(-18deg); }
  to { transform: rotate(-378deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.86; transform: scale(1.03); }
}

@keyframes pulse-jet {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
