/*
 * Aetherscale Press — splash page styles.
 * Plain CSS, no build step: Cloudflare Pages serves this folder as-is.
 *
 * Palette source: AetherscaleLogo.webp. The hex values below were sampled
 * from the artwork with an ffmpeg palette quantize, not eyeballed, so the
 * page and the logo share the same gold, charcoal and aether blue. If the
 * logo changes, re-sample (see README) and update the tokens here.
 */

/* ---- Design tokens -------------------------------------------------------
 * Kept in one place so a rebrand is a handful of edits, not a hunt.
 * Grouped by the role each color plays in the logo. */
:root {
  /* Charcoal: the logo's textured backdrop. */
  --void: #0b0a0f;            /* page base, darkest logo shadow */
  --charcoal: #1a191d;        /* card fill: the logo's backdrop tone */
  --slate: #252a36;           /* raised/hover fill: the backdrop's blue tint */
  --backdrop: #26262a;        /* the logo image's own edge color (sampled), page top */

  /* Gold: the dragon's wing and the wordmark, highlight to shadow. */
  --gold-bright: #f6dc96;     /* specular highlight on the lettering */
  --gold: #e3a947;            /* main gold: headings, borders, icons */
  --bronze: #ad671d;          /* shadow end of the foil gradient */
  --gold-dim: #8c7153;        /* hairlines and quiet borders */

  /* Aether: the glowing orbs and the starfield inside the emblem. */
  --aether: #1383d9;          /* orb blue: interactive glow, focus */
  --aether-glow: #38b6ff;     /* cyan core of the orbs: brightest accents */
  --aether-deep: #0970a2;     /* emblem's inner sky: nebula wash */

  /* Text: warm off-white like the lettering's specular highlight, plus a
   * cool silver from the dragon's scales for secondary text. */
  --ink: #efe8d6;
  --silver: #aab6bc;

  /* Foil gradient used by the wordmark-style headings, matching the
   * top-lit gold of the logo's own lettering. */
  --foil: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 50%, var(--bronze) 100%);

  --radius: 14px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
}

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

html {
  /* Explicit background so overscroll on mobile never flashes white. */
  background: var(--void);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  /* Layers, top to bottom:
   *  1. an aether-blue nebula behind the hero (the emblem's inner sky),
   *  2. a faint bronze warmth at the bottom (the gold catching light),
   *  3. the charcoal base, starting at the logo image's exact edge color so its
   *     square backdrop blends in instead of reading as a box.
   * The stars live on body::before so they can drift independently. */
  background:
    radial-gradient(ellipse 70% 45% at 50% 8%, rgba(9, 112, 162, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(173, 103, 29, 0.10), transparent 70%),
    linear-gradient(180deg, var(--backdrop) 0%, var(--charcoal) 28%, var(--void) 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---- Starfield -----------------------------------------------------------
 * Pure CSS: tiny radial gradients tiled at different sizes. Co-prime-ish
 * tile sizes (173/251/347px) stop the pattern looking like a grid. The mix
 * of white, gold and aether-blue points echoes the logo's floating orbs.
 * No JS and no image request, so it costs nothing on a slow phone. */
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 60px 140px, var(--gold-bright), transparent),
    radial-gradient(1.5px 1.5px at 150px 160px, var(--aether-glow), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 200px 220px, rgba(56, 182, 255, 0.85), transparent),
    radial-gradient(1px 1px at 30px 300px, rgba(246, 220, 150, 0.7), transparent);
  background-size: 173px 173px, 251px 251px, 347px 347px, 251px 251px, 173px 173px, 347px 347px, 251px 251px;
  opacity: 0.7;
  animation: drift 240s linear infinite;
}

@keyframes drift {
  to {
    transform: translate3d(-173px, -347px, 0);
  }
}

/* Respect users who ask for less motion: keep the stars, stop the drift. */
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

/* ---- Layout -------------------------------------------------------------- */
.page {
  max-width: 64rem;
  margin: 0 auto;
  /* 16px gutter minimum on phones; grows with the viewport. */
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 3rem;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  text-align: center;
  margin-bottom: clamp(3rem, 9vw, 5.5rem);
}

.logo-heading {
  margin: 0 0 0.5rem;
  line-height: 0; /* stops the inline image adding a text-line gap below */
}

.logo {
  width: min(78vw, 440px);
  height: auto;
  /* The logo art sits on a square charcoal background. A radial mask
   * fades that square's edges to transparent, so the emblem melts into
   * the page instead of sitting in a visible box. The 68% stop keeps the
   * dragon and the full wordmark opaque; tighter cut into the "A". */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 68%, transparent 84%);
  mask-image: radial-gradient(circle at 50% 50%, #000 68%, transparent 84%);
  /* A slow aether "breath" behind the emblem, like the orbs' glow. */
  filter: drop-shadow(0 0 28px rgba(19, 131, 217, 0.18));
}

/* Foil text: shared by the 404 title and section headings, so they read
 * as the same metal as the logo's lettering. The solid color is a fallback
 * for browsers without background-clip: text. */
.wordmark,
.section h2 {
  color: var(--gold);
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 8vw, 4.25rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin: 1.25rem 0 0.5rem;
}

.tagline {
  font-style: italic;
  color: var(--silver);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  margin: 0 auto;
  max-width: 32rem;
}

/* Ornamental divider: gold hairlines either side of a small glowing aether
 * orb, the same motif as the orbs orbiting the logo. */
.rule {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 22rem;
  margin: 2rem auto 0;
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  /* Off-centre highlight + gold rim mimics the logo's glass orbs. */
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--aether-glow) 22%, var(--aether) 55%, #062a4a 100%);
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 12px rgba(56, 182, 255, 0.6);
}

/* ---- Sections ------------------------------------------------------------ */
.section {
  margin-bottom: clamp(3rem, 8vw, 4.5rem);
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 0.5rem;
}

.section .lede {
  text-align: center;
  color: var(--silver);
  max-width: 38rem;
  margin: 0 auto 2rem;
}

/* The World Studio teaser panel: charcoal plate with a gold rim, plus a
 * faint aether glow in one corner like the emblem's lit side. */
.feature {
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(19, 131, 217, 0.16), transparent 70%),
    linear-gradient(160deg, rgba(37, 42, 54, 0.92), rgba(26, 25, 29, 0.92));
  padding: clamp(1.5rem, 5vw, 2.5rem);
  max-width: 44rem;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--foil);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.9rem;
}

.feature h3 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin: 0 0 0.75rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.feature ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

/* Bullets in aether blue: the gold is already doing a lot of work. */
.feature li::marker {
  color: var(--aether-glow);
}

/* ---- Portal cards ---------------------------------------------------------
 * auto-fit + minmax gives two columns on desktop and one on phones without
 * a media query. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  max-width: 44rem;
  margin: 0 auto;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  background: rgba(26, 25, 29, 0.9);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

/* Hover/focus: gold rim brightens and the card picks up an aether glow,
 * like light from the orbs falling on it. */
.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: rgba(37, 42, 54, 0.95);
  box-shadow: 0 8px 28px -10px rgba(19, 131, 217, 0.55);
}

/* Visible focus ring for keyboard users; the hover lift alone isn't enough. */
.card:focus-visible {
  outline: 2px solid var(--aether-glow);
  outline-offset: 3px;
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--gold);
}

.card-title {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.card-desc {
  color: var(--silver);
  font-size: 0.98rem;
}

.card-go {
  margin-top: auto;
  padding-top: 0.6rem;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--silver);
  margin-top: 1.25rem;
}

/* ---- Footer -------------------------------------------------------------- */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--silver);
  border-top: 1px solid rgba(140, 113, 83, 0.35);
  padding-top: 1.5rem;
}

/* Links in notes and the footer. A class rule rather than inline style=""
 * because the CSP in _headers blocks inline styles. */
.note a,
.footer a {
  color: var(--gold);
}
