/* ──────────────────────────────────────────────────────────────────
   The Last Light — landing page
   Brand palette pulled directly from the icon SVG so the page reads
   as the same artifact: void blue field, ember focal warmth, ice
   linework, near-black engraved glyphs.
   ────────────────────────────────────────────────────────────────── */

:root {
  /* Cool void */
  --void:         #0E1A35;
  --void-deep:    #06101F;
  --void-tinted:  #15264B;

  /* Ice linework / typography */
  --ice:          #D4E8F8;
  --ice-muted:    #94B5D8;
  --ice-faint:    #6A85AB;

  /* Ember warmth */
  --ember:        #C5582A;
  --fire:         #F4934A;
  --pupil:        #FFEDC0;
  --hot:          #FFFCEC;

  /* Engraved glyph */
  --glyph:        #1F3358;

  /* Type */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --content:      720px;
  --container:    1200px;
}

/* ── Base ─────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  /* Larger base so rem-sized type scales up everywhere. 18px reads
     comfortably for older eyes without losing the cinematic rhythm. */
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ice);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--ice); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--fire); }

img { display: block; max-width: 100%; height: auto; }

/* ── Ambient corner glyphs ───────────────────────────────────── */

.corner-glyph {
  position: fixed;
  color: var(--glyph);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}
.corner-tl { top: 32px; left: 32px; }
.corner-tr { top: 32px; right: 32px; transform: rotate(90deg); }
.corner-bl { bottom: 32px; left: 32px; transform: rotate(-90deg); }
.corner-br { bottom: 32px; right: 32px; transform: rotate(180deg); }

/* ── Hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 160px;
}

/* Soft ember glow centered behind the hero icon — the page IS the dying universe */
.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 1400px; height: 1400px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%,
      rgba(244, 147, 74, 0.18) 0%,
      rgba(197, 88, 42, 0.10) 18%,
      rgba(14, 26, 53, 0)     55%);
  pointer-events: none;
  z-index: 0;
  animation: emberPulse 8s ease-in-out infinite;
}

@keyframes emberPulse {
  0%, 100% { opacity: 1.0; }
  50%      { opacity: 0.78; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
}

.hero-mark {
  margin-bottom: 40px;
  filter: drop-shadow(0 24px 48px rgba(244, 147, 74, 0.20));
  animation: heroFloat 12s ease-in-out infinite;
}

.hero-kicker {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice-faint);
  margin: 0 0 20px;
}
.hero-mark img { margin: 0 auto; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
  color: var(--ice);
  text-transform: uppercase;
}

.hero-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  letter-spacing: 0.04em;
  color: var(--ice-muted);
  margin: 0 0 56px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #E07A2A 0%, #C5582A 100%);
  color: var(--hot);
  box-shadow: 0 0 0 0 rgba(244, 147, 74, 0);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #F4934A 0%, #E07A2A 100%);
  color: var(--hot);
  box-shadow: 0 0 28px rgba(244, 147, 74, 0.40);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ice);
  border: 1px solid var(--ice-muted);
}
.btn-secondary:hover {
  background: rgba(212, 232, 248, 0.06);
  color: var(--ice);
  border-color: var(--ice);
}

/* ── Hero scroll cue ──────────────────────────────────────────── */

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--ice-faint);
  border-radius: 12px;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.hero-scroll:hover {
  opacity: 1;
  border-color: var(--ice);
}
.hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 2px;
  height: 6px;
  background: var(--ice-muted);
  transform: translateX(-50%);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  60%      { transform: translate(-50%, 12px); opacity: 0; }
  61%      { transform: translate(-50%, 0); opacity: 0; }
}

/* ── Section: premise ────────────────────────────────────────── */

.premise {
  padding: 160px 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%,
      var(--void-tinted) 0%,
      var(--void) 70%);
}

.premise-content {
  max-width: var(--content);
  margin: 0 auto;
  text-align: center;
}

.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--ice);
  margin: 0 0 48px;
  text-transform: uppercase;
}

.premise-content p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ice-muted);
  margin: 0 0 24px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.aside {
  margin-top: 48px !important;
  padding-top: 32px;
  border-top: 1px solid rgba(148, 181, 216, 0.18);
  font-style: italic;
  color: var(--ice-faint) !important;
  font-size: 1rem !important;
  letter-spacing: 0.02em;
}

/* ── Section: pillars ─────────────────────────────────────────── */

.pillars {
  padding: 120px 24px 160px;
  background: var(--void);
  position: relative;
  overflow: hidden;
}

/* Single faint orbital arc behind the pillars */
.pillars::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1400px; height: 380px;
  transform: translate(-50%, -50%) rotate(-8deg);
  border: 1px solid rgba(148, 181, 216, 0.10);
  border-radius: 50%;
  pointer-events: none;
}

.pillars-grid {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pillar {
  padding: 48px 32px;
  background: rgba(21, 38, 75, 0.45);
  border: 1px solid rgba(148, 181, 216, 0.14);
  text-align: left;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.pillar:hover {
  border-color: rgba(244, 147, 74, 0.45);
  background: rgba(21, 38, 75, 0.65);
  transform: translateY(-4px);
}

.pillar-mark {
  color: var(--fire);
  margin-bottom: 24px;
}

.pillar h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice);
  margin: 0 0 16px;
}

.pillar p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ice-muted);
}

/* ── Section: notify ─────────────────────────────────────────── */

.notify {
  padding: 140px 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%,
      var(--void-tinted) 0%,
      var(--void-deep) 70%);
  text-align: center;
}

.notify-content {
  max-width: 560px;
  margin: 0 auto;
}

.notify h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--ice);
}
.notify p {
  margin: 0 0 40px;
  color: var(--ice-faint);
  font-size: 1rem;
}

.notify-form {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.notify-form input {
  flex: 1 1 280px;
  padding: 14px 20px;
  background: rgba(14, 26, 53, 0.6);
  border: 1px solid var(--ice-faint);
  border-right: none;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s ease;
}
.notify-form input::placeholder { color: var(--ice-faint); }
.notify-form input:focus { border-color: var(--ice-muted); }

.notify-form button {
  padding: 14px 32px;
  background: linear-gradient(135deg, #E07A2A 0%, #C5582A 100%);
  color: var(--hot);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.notify-form button:hover {
  background: linear-gradient(135deg, #F4934A 0%, #E07A2A 100%);
  box-shadow: 0 0 24px rgba(244, 147, 74, 0.30);
}

/* ── Footer ──────────────────────────────────────────────────── */

.footer {
  padding: 56px 24px;
  text-align: center;
  background: var(--void-deep);
  color: var(--ice-faint);
  font-size: 0.875rem;
}
.studio-mark {
  display: inline-block;
  margin: 0 0 20px;
  border: none;
  opacity: 0.75;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.studio-mark:hover { opacity: 1; transform: translateY(-1px); border-color: transparent; }
.studio-mark img {
  display: block;
  width: 180px;
  height: auto;
}
.footer a {
  color: var(--ice-muted);
  border-bottom: 1px solid rgba(148, 181, 216, 0.30);
  padding-bottom: 1px;
}
.footer a:hover { color: var(--fire); border-color: var(--fire); }
.footer p { margin: 0 0 8px; }
.footer-fine { font-size: 0.75rem; opacity: 0.6; margin-top: 12px; }

/* ── Ambient background orreries ─────────────────────────────
   Other doors throughout the universe — each is a different
   alignment, different planets, drifting at its own slow rate.
   Pure cool palette so they don't compete with the hero ember. */

.bg-orrery {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  color: var(--ice-muted);
  opacity: 0.10;
}

.bg-orrery-svg {
  width: 100%;
  height: 100%;
  transform-origin: center;
  display: block;
}

/* Each orrery rotates at its own pace; some clockwise, some counter — */
.bg-orrery-1 .bg-orrery-svg { animation: orreryRotate 280s linear infinite; }
.bg-orrery-2 .bg-orrery-svg { animation: orreryRotate 200s linear infinite reverse; }
.bg-orrery-3 .bg-orrery-svg { animation: orreryRotate 320s linear infinite; }
.bg-orrery-4 .bg-orrery-svg { animation: orreryRotate 240s linear infinite reverse; }

@keyframes orreryRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hero: large orrery peeking from right edge, partially off-screen */
.bg-orrery-1 {
  width: 720px; height: 720px;
  top: 50%; right: -260px;
  margin-top: -360px;
  opacity: 0.09;
}

/* Premise: medium orrery peeking from left edge */
.bg-orrery-2 {
  width: 520px; height: 520px;
  top: 80px; left: -180px;
  opacity: 0.10;
}

/* Pillars: large orrery, dramatic tilt, lower-right */
.bg-orrery-3 {
  width: 640px; height: 640px;
  bottom: -180px; right: -180px;
  opacity: 0.08;
}

/* Notify: small orrery, almost edge-on, lower-left */
.bg-orrery-4 {
  width: 360px; height: 360px;
  bottom: 20px; left: 6%;
  opacity: 0.10;
}

/* Ensure section content sits above the orreries */
.hero-content,
.premise-content,
.pillars-grid,
.notify-content {
  position: relative;
  z-index: 2;
}

/* On small screens, ambient orreries shrink and pull in */
@media (max-width: 880px) {
  .bg-orrery-1 { width: 480px; height: 480px; right: -200px; margin-top: -240px; }
  .bg-orrery-2 { width: 360px; height: 360px; left: -160px; top: 40px; }
  .bg-orrery-3 { width: 420px; height: 420px; right: -160px; bottom: -120px; }
  .bg-orrery-4 { display: none; }
}

/* ── Reveal animation (scroll-triggered) ─────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero { padding: 96px 24px 120px; }
  .hero-mark img { width: 240px; height: 240px; }
  .pillars-grid { grid-template-columns: 1fr; gap: 24px; }
  .pillars { padding: 96px 24px 120px; }
  .premise { padding: 120px 24px; }
  .notify  { padding: 100px 24px; }
  .notify-form { flex-direction: column; gap: 12px; }
  .notify-form input { border-right: 1px solid var(--ice-faint); flex: 1 1 auto; }
  .corner-glyph { width: 32px; height: 32px; }
  .corner-tl, .corner-tr { top: 16px; }
  .corner-tl, .corner-bl { left: 16px; }
  .corner-tr, .corner-br { right: 16px; }
  .corner-bl, .corner-br { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
