/* EVENT HORIZON post: a demo's night screen. Near-black void, the torus's
   plasma orange and blue as the only accents, a chrome title. Applied to the
   Org HTML export (html5-fancy markup) by scripts/export-event-horizon.el.
   Dark by design: the footage and renders are lit screens. */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --void: #05050a;
  --void-2: #0c0c16;
  --panel: #12121f;
  --ink: #e9e7f2;
  --ink-2: #b9b6cc;
  --ink-3: #807d96;
  --rule: #24233a;
  --orange: #ff7a3d;
  --blue: #4a6bff;
  --violet: #9b6bff;
  --chrome: linear-gradient(180deg, #ffffff 0%, #c9cbe0 38%, #6f7190 52%, #e8d3c4 70%, #ff9a63 100%);
  --display: "Unbounded", "Futura", "Avenir Next", system-ui, sans-serif;
  --body: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 64ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(60rem 40rem at 50% -10rem, rgba(74, 107, 255, .16), transparent 70%),
    radial-gradient(40rem 30rem at 85% 30rem, rgba(255, 122, 61, .08), transparent 70%),
    var(--void);
  color: var(--ink);
  font: 400 1.18rem/1.68 var(--body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

#preamble nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.1rem 1rem;
  font: 600 .78rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
#preamble a { color: var(--ink-3); text-decoration: none; }
#preamble a:hover, #preamble a:focus-visible { color: var(--ink); }

#content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem 6rem;
}

/* Title: chrome lettering over a ring, like the round panel. */
#content > header {
  position: relative;
  text-align: center;
  padding: 4.5rem 0 2.5rem;
}
#content > header::before {
  content: "";
  position: absolute;
  inset: 1.5rem 50% auto auto;
  width: min(30rem, 88vw);
  aspect-ratio: 1;
  transform: translateX(50%);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 54%, rgba(74, 107, 255, .22) 62%, rgba(255, 122, 61, .14) 68%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.title {
  margin: 0;
  font: 800 clamp(2.3rem, 9vw, 4.6rem)/1 var(--display);
  letter-spacing: .02em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(74, 107, 255, .35));
}
.subtitle {
  margin: 1.1rem 0 0;
  font: 500 .82rem/1.4 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

#content > header + p {
  text-align: center;
  font: 400 .85rem/1 var(--mono);
  letter-spacing: .08em;
  color: var(--ink-3);
  margin: 0 0 2.5rem;
}

a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

p { margin: 0 0 1.15rem; }
strong, b { font-weight: 500; color: #fff; }
code { font: .86em var(--mono); color: var(--orange); }

h2 {
  margin: 4.5rem 0 1.5rem;
  font: 700 clamp(1.35rem, 4.6vw, 1.85rem)/1.15 var(--display);
  letter-spacing: .01em;
  color: #fff;
}
h2::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-bottom: 1.1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange), var(--blue));
}

/* The opening's two title lines. */
.org-center {
  margin: 2rem 0;
  text-align: center;
  font: 700 clamp(1.1rem, 4.5vw, 1.5rem)/1.5 var(--mono);
  letter-spacing: .14em;
}
.org-center p { margin: 0; }
.org-center strong { color: #fff; text-shadow: 0 0 18px rgba(74, 107, 255, .7); }

/* Tags on every caption say what the picture is. */
.eh-tag {
  display: inline-block;
  margin-right: .55rem;
  padding: .18rem .45rem .14rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font: 600 .66rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  vertical-align: .12em;
}
.eh-tag--badge { border-color: rgba(255, 122, 61, .6); color: var(--orange); }

figure { margin: 2.5rem 0; }
figure img, figure video { display: block; max-width: 100%; height: auto; }
figcaption {
  margin-top: .8rem;
  font: 400 .92rem/1.5 var(--body);
  font-style: italic;
  color: var(--ink-2);
}
.figure-number { display: none; }

/* Org figures (host renders): break out a little wider than the text. */
figure[id^="org"] {
  margin-inline: calc(50% - min(50vw - 1rem, 26rem));
}
figure[id^="org"] img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 60px -25px rgba(0, 0, 0, .9);
}
figure[id^="org"] figcaption { max-width: var(--measure); margin-inline: auto; padding: 0 1rem; }

/* Hero: the badge itself, glowing. */
.eh-hero {
  display: grid;
  justify-items: center;
  margin: 0 0 1.6rem;
}
.eh-hero video {
  width: min(100%, 22rem);
  aspect-ratio: 570 / 810;
  border-radius: 18px;
  background: var(--void-2);
  box-shadow:
    0 0 0 1px var(--rule),
    0 0 80px -10px rgba(74, 107, 255, .45),
    0 30px 80px -30px rgba(255, 122, 61, .45);
}
.eh-hero figcaption { text-align: center; max-width: 26rem; }

.eh-menu-clip { display: grid; justify-items: center; }
.eh-menu-clip video {
  width: min(100%, 25rem);
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--void-2);
}
.eh-menu-clip figcaption { max-width: 30rem; text-align: center; }

figure img[src$="two-core-bands.svg"] {
  width: min(100%, 30rem);
  margin-inline: auto;
}

/* NFO strip: the production in four numbers. */
.eh-nfo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 3rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--rule);
  font-family: var(--mono);
}
.eh-nfo div { background: var(--panel); padding: .85rem .9rem; }
.eh-nfo dt { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.eh-nfo dd { margin: .3rem 0 0; font-size: .82rem; line-height: 1.35; color: var(--ink); }
@media (max-width: 40rem) { .eh-nfo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Scene strip: four frames off the badge, wider than the text column. */
.eh-gallery { margin-inline: calc(50% - min(50vw - 1rem, 30rem)); }
.eh-gallery ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: scene;
}
.eh-gallery li { counter-increment: scene; }
.eh-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rule), 0 14px 40px -18px rgba(74, 107, 255, .7);
}
.eh-gallery li span {
  display: block;
  margin-top: .7rem;
  text-align: center;
  font: 600 .7rem/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eh-gallery li span::before { content: "0" counter(scene) " · "; color: var(--orange); }
.eh-gallery figcaption { text-align: center; padding: 0 1rem; }
@media (max-width: 40rem) { .eh-gallery ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* End title on the glass. */
.eh-title-shot { display: grid; justify-items: center; margin: 3rem 0 1rem; }
.eh-title-shot img {
  width: min(100%, 20rem);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--rule), 0 0 90px -15px rgba(74, 107, 255, .65);
}
.eh-title-shot figcaption { text-align: center; }
