*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white: #f5f4f0;
  --black: #000;
  --muted: #6b6b66;
  --border: rgba(245, 244, 240, 0.12);
  --blue: rgb(0, 110, 225);
  --pad: 4rem;
}

/* anchor scrolling is animated in main.js so it can't be clipped by the
   browser cancelling a native smooth-scroll mid-flight */
html { scroll-behavior: auto; }

body {
  background: var(--black);
  color: var(--white);
  font-family: "Zalando Sans SemiExpanded", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- NAV ---------- */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--pad);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 22px; height: auto; }
.brand span { font-size: 12px; font-weight: 600; letter-spacing: 0.22em; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245, 244, 240, 0.5); transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ---------- HERO ---------- */
header {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: 0 var(--pad) 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
/* the DOM video is the WebGL backdrop's texture source; once the canvas is
   live it is hidden and the scene draws the footage instead */
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.4;
}
body.webgl .hero-video { opacity: 0; }
body.no-webgl .hero-video { opacity: 0.4; }

#glass {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; pointer-events: none;
}
body.no-webgl #glass { display: none; }

header::after {
  content: ''; position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, #000 2%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.5));
}
.hero-inner { position: relative; z-index: 2; max-width: 640px; }

/* ERA wordmark */
.wordmark {
  font-size: clamp(5rem, 17vw, 15rem);
  font-weight: 800; line-height: 0.82; letter-spacing: -0.055em;
  background: linear-gradient(168deg, #fff 8%, #cfe3ff 34%, #7fb0ff 52%, #f2f6ff 78%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 38px rgba(0, 110, 225, 0.4));
}

.hero-hint {
  position: absolute; z-index: 2;
  right: var(--pad); bottom: 2.2rem;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(245, 244, 240, 0.32);
}
body.no-webgl .hero-hint { display: none; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1.6rem;
}
h1 {
  font-size: clamp(2.8rem, 9vw, 8rem);
  font-weight: 700; line-height: 0.9; letter-spacing: -0.04em;
}
.dim { color: rgba(245, 244, 240, 0.35); }
.lede {
  max-width: 460px; margin-top: 1.8rem;
  font-size: 14px; line-height: 1.8; color: rgba(245, 244, 240, 0.6);
}
.row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.5rem; }

.btn {
  display: inline-block; padding: 0.85rem 1.7rem;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--white);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: var(--white); border-color: var(--white); }

/* ---------- SECTIONS ---------- */
section {
  padding: 6rem var(--pad);
  border-bottom: 1px solid var(--border);
}
.idx {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2.5rem;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1; letter-spacing: -0.03em;
}
.blue { color: var(--blue); }
.section-note {
  max-width: 520px; margin-top: 1.5rem;
  font-size: 13px; line-height: 1.8; color: rgba(245, 244, 240, 0.5);
}

.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; }
.body-copy p {
  font-size: 14px; line-height: 1.9;
  color: rgba(245, 244, 240, 0.65); margin-bottom: 1.2rem;
}
.body-copy p:last-child { margin-bottom: 0; }

/* ---------- EVENT ---------- */
.event-head {
  display: flex; justify-content: space-between;
  align-items: flex-end; flex-wrap: wrap; gap: 2rem;
}
.tag-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.tag {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.35rem 0.8rem; border: 1px solid;
}
.tag.open { border-color: rgba(127, 255, 127, 0.4); color: #7fff7f; }
.tag-muted { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }
.event-sub {
  margin-top: 0.7rem; font-size: 15px;
  color: var(--blue); letter-spacing: 0.04em;
}
/* Hosted by — PSME.
   The mark is a black-to-red gradient built for light backgrounds, so it sits on
   a white plaque rather than being recoloured to suit this dark theme. */
.hosted-by {
  display: flex; align-items: center; gap: 0.9rem;
  flex-wrap: wrap; margin-top: 1.6rem;
}
.hosted-label {
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.psme {
  display: inline-flex; align-items: center;
  background: #fff; border-radius: 3px;
  padding: 0.55rem 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.psme:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
}
.psme img { height: 24px; width: auto; display: block; }
.psme-fallback { display: none; }
.psme.psme-textonly img { display: none; }
.psme.psme-textonly .psme-fallback {
  display: block;
  font-size: 15px; font-weight: 800; letter-spacing: 0.06em;
  color: #8b0f0f;
}

.countdown { border-left: 1px solid var(--border); padding-left: 1.6rem; }
.countdown-label {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.countdown-value {
  margin-top: 0.5rem; font-size: 22px;
  font-weight: 500; font-variant-numeric: tabular-nums;
}

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); margin-top: 3.5rem;
}
.fact { background: var(--black); padding: 1.8rem 1.5rem; }
.fact span {
  display: block; font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem;
}
.fact strong { font-size: 14px; font-weight: 400; line-height: 1.6; }

.schedule {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 2rem; font-size: 13px; color: rgba(245, 244, 240, 0.55);
}
.sch b {
  color: var(--white); font-weight: 500;
  font-variant-numeric: tabular-nums; margin-right: 0.6rem;
}

/* ---------- CARDS ---------- */
.group-label {
  margin: 3.5rem 0 1.2rem;
  font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
}
.grid, .contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.contact-grid { margin-top: 3rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--black); padding: 2rem 1.7rem;
  min-height: 210px; transition: background 0.2s;
}
.card:hover { background: #0b0b0b; }
.card:hover .card-foot { color: var(--blue); }
.card.accent { background: rgba(0, 110, 225, 0.08); }
.card.accent:hover { background: rgba(0, 110, 225, 0.16); }
.kind {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1.2rem;
}
.card-title {
  font-size: 19px; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 0.8rem;
}
.card-desc {
  font-size: 12.5px; line-height: 1.7;
  color: rgba(245, 244, 240, 0.45);
}
.card-foot {
  margin-top: auto; padding-top: 1.5rem;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(245, 244, 240, 0.6);
  transition: color 0.2s;
}

/* ---------- REASONS ---------- */
.reasons { list-style: none; counter-reset: r; margin-top: 3rem; }
.reasons li {
  counter-increment: r;
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 1.4rem 0; border-top: 1px solid var(--border);
  font-size: 15px; color: rgba(245, 244, 240, 0.8);
}
.reasons li::before {
  content: '0' counter(r);
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--blue); flex: 0 0 auto;
}

/* ---------- FOOTER ---------- */
footer {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding: 1.6rem var(--pad);
  font-size: 11px; letter-spacing: 0.15em;
}
.credit { color: var(--muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  :root { --pad: 1.5rem; }
  #glass { opacity: 0.5; }   /* mark recedes behind the copy on narrow screens */
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .countdown { border-left: none; padding-left: 0; }
  section { padding: 4rem var(--pad); }
}
@media (max-width: 560px) {
  .nav-links { gap: 1.1rem; }
  .hero-hint { display: none; }
  .facts { grid-template-columns: 1fr; }
  header { padding-bottom: 3.5rem; }
}

.countdown-value.past { color: var(--muted); font-size: 18px; }

/* ============ WEBGL BACKGROUND ============ */
/* bg.js paints the aurora + liquid + fluted-glass field behind everything.
   --section-dim is written live by the settings panel. */
:root { --section-dim: 0.36; }

#bgfx {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block; z-index: 0;
  pointer-events: none;
}

/* real content sits above the background field */
nav, header, section, footer { position: relative; z-index: 1; }
section { background: rgba(0, 0, 0, var(--section-dim)); }
footer  { background: rgba(0, 0, 0, calc(var(--section-dim) + 0.15)); }
/* the hero keeps its own video + glass, so it stays fully opaque */
body.has-bgfx header { background: #000; }

/* ============ SCROLL REVEAL ============ */
/* Gated on .js-reveal (set by an inline script in <head>) so that if JS never
   runs, the content is simply visible rather than stuck at opacity 0. */
.js-reveal [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(.22,.7,.3,1),
              transform 0.7s cubic-bezier(.22,.7,.3,1);
}
.js-reveal [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .orb { animation: none; }
}

/* ============ CARD SPOTLIGHT ============ */
/* --mx/--my are written by main.js from the pointer position */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0, 130, 255, 0.16), transparent 62%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* a hairline that lights up along the top edge on hover */
.card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent,
              rgba(0, 130, 255, 0.9) var(--mx, 50%), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover::after { opacity: 1; }

/* ============ LUMA ============ */
.luma { margin-top: 3rem; border: 1px solid var(--border); }
.luma-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.2rem;
  padding: 1.6rem 1.8rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 110, 225, 0.05);
}
.luma-kicker {
  font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 0.5rem;
}
.luma-title {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 600; letter-spacing: -0.02em;
}
.luma-frame { line-height: 0; }
.luma-frame iframe {
  width: 100%; height: 480px; border: none; display: block;
}
@media (max-width: 600px) { .luma-frame iframe { height: 560px; } }

/* anchors clear the fixed nav */
section, header { scroll-margin-top: 64px; }

/* ============ BACKGROUND SETTINGS PANEL ============ */
/* Hidden for normal visitors. Open with ?bg=1, #bg, or Shift+B. */
.bgpanel {
  position: fixed; top: 70px; right: 16px; z-index: 200;
  width: 268px; max-height: calc(100vh - 90px);
  display: none; flex-direction: column;
  background: rgba(8, 8, 10, 0.94);
  border: 1px solid var(--border-mid, rgba(245,244,240,0.2));
  backdrop-filter: blur(16px);
  font-family: inherit;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.bgpanel.open { display: flex; }

.bgpanel-head, .bgpanel-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.bgpanel-foot { border-bottom: none; border-top: 1px solid var(--border); gap: 0.5rem; }
.bgpanel-head span {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--white);
}
.bgpanel button {
  font: inherit; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,244,240,0.65); background: none;
  border: 1px solid var(--border); padding: 0.42rem 0.7rem;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.bgpanel button:hover { color: var(--white); border-color: var(--blue); }
.bgpanel-head button { border: none; font-size: 16px; padding: 0 0.2rem; line-height: 1; }
.bgpanel-foot button { flex: 1; }

.bgpanel-body { overflow-y: auto; padding: 0.3rem 0.9rem 0.6rem; }
.bgpanel-group { padding: 0.7rem 0; border-bottom: 1px solid rgba(245,244,240,0.07); }
.bgpanel-group:last-child { border-bottom: none; }
.bgpanel-gtitle {
  font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 0.6rem;
}
.bgpanel-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 0.5rem; margin-bottom: 0.42rem;
}
.bgpanel-row:has(input[type="range"]) { grid-template-columns: 74px 1fr 34px; }
.bgpanel-row span { font-size: 10.5px; color: rgba(245,244,240,0.62); }
.bgpanel-row output {
  font-size: 9.5px; color: var(--white);
  font-variant-numeric: tabular-nums; text-align: right;
}
.bgpanel-row input[type="color"] {
  width: 34px; height: 20px; padding: 0;
  background: none; border: 1px solid var(--border); cursor: pointer;
}
.bgpanel-row input[type="range"] {
  width: 100%; height: 2px; -webkit-appearance: none; appearance: none;
  background: rgba(245,244,240,0.18); cursor: pointer;
}
.bgpanel-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
}
.bgpanel-row input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
}

@media (max-width: 640px) {
  .bgpanel { right: 8px; left: 8px; width: auto; }
}
