/* ============================================
   TAMRIEL UNBOUND — JOIN THE ADVENTURE REDESIGN
   Cinematic hero + upgraded closing CTA.
   Loaded after style.css; nothing between the hero and #join is touched.
   ============================================ */

:root {
  --ember: #e8a24a;
  --ember-soft: rgba(232, 162, 74, 0.35);
  --mist: rgba(170, 182, 200, 0.16);
}

/* ---------- Hero: full-bleed scene ---------- */
.hero-cine {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: flex-start;
  text-align: left;
  isolation: isolate;
}

.hero-cine .hero-bg {
  background: #0b0b14;
  transform: scale(1.05);
}

.hero-cine .hero-bg picture,
.hero-cine .hero-bg img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-cine .hero-bg img {
  object-fit: cover;
  object-position: 70% 50%;
  animation: heroBreath 26s ease-in-out infinite alternate;
}

@keyframes heroBreath {
  from { transform: scale(1); }
  to   { transform: scale(1.045); }
}

/* Left text-safe zone over the dark sky/harbour, vignette, and soft fade into About */
.hero-cine .hero-overlay {
  background:
    linear-gradient(90deg, rgba(6,6,12,0.88) 0%, rgba(6,6,12,0.62) 32%, rgba(6,6,12,0.12) 62%, rgba(6,6,12,0) 100%),
    radial-gradient(ellipse 120% 90% at 60% 45%, transparent 55%, rgba(4,4,9,0.7) 100%),
    linear-gradient(to bottom, rgba(8,8,15,0.35) 0%, rgba(8,8,15,0) 22%, rgba(8,8,15,0) 70%, rgba(8,8,15,0.85) 92%, var(--bg-deep) 100%);
}

/* Drifting mist bands */
.hero-mist {
  position: absolute;
  left: -25%;
  width: 150%;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 30% 55% at 20% 50%, var(--mist), transparent 70%),
    radial-gradient(ellipse 25% 45% at 55% 60%, var(--mist), transparent 70%),
    radial-gradient(ellipse 28% 50% at 85% 45%, var(--mist), transparent 70%);
  filter: blur(18px);
}
.hero-mist-a { bottom: 4%;  height: 34%; animation: mistDrift 70s linear infinite alternate; }
.hero-mist-b { bottom: 22%; height: 26%; opacity: 0.6; animation: mistDrift 95s linear infinite alternate-reverse; }

@keyframes mistDrift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}

/* ---------- Hero copy ---------- */
.hero-cine .hero-content {
  max-width: 760px;
  padding: 7rem 2rem 6rem clamp(1.5rem, 7vw, 7.5rem);
  animation: heroRise 1.1s 0.25s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero-cine .hero-eyebrow {
  color: var(--gold);
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-cine .hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  letter-spacing: 0.04em;
  line-height: 1.06;
  margin-bottom: 1.4rem;
  text-shadow: 0 0 50px rgba(200,168,75,0.18), 0 4px 24px rgba(0,0,0,0.85);
}

.hero-cine .hero-title span {
  display: block;
  margin-top: 0.35em;
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-glow);
}

.hero-cine .hero-divider {
  margin: 0 0 1.6rem;
  width: 110px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.hero-cine .hero-subtitle {
  margin: 0 0 2.6rem;
  max-width: 540px;
  color: var(--parchment);
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

/* ---------- The Gate: CTA embedded in the scene ---------- */
.gate {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* firelight pool behind the button */
.gate-light {
  position: absolute;
  left: -60px; top: -50px;
  width: 460px; height: 200px;
  background: radial-gradient(ellipse at 40% 50%, rgba(232,162,74,0.42) 0%, rgba(200,120,40,0.16) 42%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
  animation: torchFlicker 5.5s ease-in-out infinite;
}

/* ground fog curling around the base of the button */
.gate-fog {
  position: absolute;
  left: -90px; top: 38px;
  width: 560px; height: 90px;
  background:
    radial-gradient(ellipse 40% 60% at 25% 50%, rgba(190,198,214,0.22), transparent 70%),
    radial-gradient(ellipse 35% 50% at 65% 55%, rgba(190,198,214,0.18), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 2;
  animation: fogCurl 14s ease-in-out infinite alternate;
}

@keyframes torchFlicker {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  45%      { opacity: 1;   transform: scale(1.04); }
  60%      { opacity: 0.8; transform: scale(0.99); }
}
@keyframes fogCurl {
  from { transform: translateX(-18px); opacity: 0.85; }
  to   { transform: translateX(22px);  opacity: 1; }
}

.gate-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: 1.25rem 2.6rem 1.25rem 2.8rem;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.95rem, 1.3vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1206;
  background:
    linear-gradient(180deg, rgba(255,236,190,0.35) 0%, transparent 45%),
    linear-gradient(180deg, #e2bf68 0%, #c8a84b 48%, #9c7c2f 100%);
  border: 1px solid #f0d995;
  outline: 1px solid rgba(200,168,75,0.45);
  outline-offset: 5px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6) inset,
    0 0 34px rgba(232,162,74,0.45),
    0 12px 40px rgba(0,0,0,0.6);
  text-shadow: 0 1px 0 rgba(255,240,200,0.45);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, outline-offset .35s ease, filter .35s ease;
}

/* light sweep */
.gate-cta::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,250,230,0.55), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
}

.gate-corner {
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid #1a1206;
  transform: rotate(45deg);
  background: #f3dc9c;
}
.gate-corner.tl { top: -5px;    left: -5px; }
.gate-corner.tr { top: -5px;    right: -5px; }
.gate-corner.bl { bottom: -5px; left: -5px; }
.gate-corner.br { bottom: -5px; right: -5px; }

.gate-arrow {
  font-family: 'EB Garamond', serif;
  font-size: 1.5em;
  line-height: 1;
  transition: transform .35s ease;
}

.gate-cta:hover,
.gate-cta:focus-visible {
  color: #120c03;
  transform: translateY(-2px);
  outline-offset: 8px;
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6) inset,
    0 0 60px rgba(232,162,74,0.7),
    0 16px 48px rgba(0,0,0,0.65);
}
.gate-cta:hover::after,
.gate-cta:focus-visible::after { left: 120%; }
.gate-cta:hover .gate-arrow,
.gate-cta:focus-visible .gate-arrow { transform: translateX(6px); }
.gate-cta:active { transform: translateY(0) scale(0.99); }
.gate-cta:focus-visible { outline: 2px solid #fff3cf; }

.gate-hook {
  position: relative;
  z-index: 3;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment);
  text-shadow: 0 2px 10px rgba(0,0,0,0.95);
  max-width: 460px;
  line-height: 1.5;
}
.gate-hook strong { color: var(--gold-glow); font-weight: 600; }
.join-hook { margin: 1.6rem auto 0; text-align: center; }

/* bottom "Join the Adventure" button: same gate button as the hero, centred */
.gate-bottom { display: flex; align-items: center; margin: 0 auto 1.4rem; }
.gate-bottom .gate-light { left: 50%; margin-left: -230px; }
.gate-bottom .gate-fog { left: 50%; margin-left: -280px; }
.gate-heading { margin: 0; font-size: inherit; line-height: 1; }

/* falling snow over the top hero (drawn by script.js) */
#hero-snow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* canvas for the embers on the original hero (second page); same rules as #hero-particles in style.css */
.hero-particles-extra {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-secondary {
  display: table;
  margin-top: 1.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  border-bottom: 1px solid rgba(212,197,169,0.25);
  padding-bottom: 3px;
}
.hero-secondary:hover,
.hero-secondary:focus-visible { color: var(--parchment); border-color: var(--gold); }

/* scroll cue */
.hero-scroll {
  position: absolute;
  left: 50%; bottom: 1.6rem;
  z-index: 4;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 1px solid rgba(200,168,75,0.45);
  border-radius: 14px;
}
.hero-scroll span {
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollCue 2.2s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Concept B: "Into the Mists" (?concept=mists) ---------- */
.concept-mists .hero-cine .hero-overlay {
  background:
    linear-gradient(to top, rgba(6,8,14,0.92) 0%, rgba(10,14,22,0.55) 45%, rgba(10,14,22,0.35) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 50%, rgba(4,6,10,0.8) 100%);
}
.concept-mists .hero-cine { justify-content: center; text-align: center; }
.concept-mists .hero-cine .hero-content { padding-left: 2rem; margin: 0 auto; }
.concept-mists .hero-cine .hero-divider { margin: 0 auto 1.6rem; background: linear-gradient(to right, transparent, var(--gold), transparent); }
.concept-mists .hero-cine .hero-subtitle { margin: 0 auto 2.6rem; }
.concept-mists .gate { align-items: center; }
.concept-mists .hero-secondary { margin-left: auto; margin-right: auto; }
.concept-mists .gate-light { left: 50%; margin-left: -230px; background: radial-gradient(ellipse at 50% 50%, rgba(150,180,220,0.22) 0%, transparent 70%); }
.concept-mists .gate-fog { left: 50%; margin-left: -280px; }
.concept-mists .hero-mist { --mist: rgba(190,200,215,0.28); }
.concept-mists .hero-mist-b { bottom: 38%; opacity: 0.8; }

/* keyboard focus for the other buttons and links */
.btn:focus-visible,
.nav-links a:focus-visible,
.footer-links a:focus-visible { outline: 2px solid var(--gold-glow); outline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-cine .hero-overlay {
    background:
      linear-gradient(90deg, rgba(6,6,12,0.9) 0%, rgba(6,6,12,0.7) 45%, rgba(6,6,12,0.25) 80%),
      linear-gradient(to bottom, rgba(8,8,15,0.35) 0%, transparent 25%, transparent 70%, var(--bg-deep) 100%);
  }
}

@media (max-width: 700px) {
  .hero-cine { align-items: flex-end; text-align: center; }
  .hero-cine .hero-bg img { object-position: 50% 30%; }
  .hero-cine .hero-overlay {
    background: linear-gradient(to bottom, rgba(8,8,15,0.3) 0%, rgba(8,8,15,0) 18%, rgba(8,8,15,0.25) 38%, rgba(8,8,15,0.8) 58%, rgba(8,8,15,0.95) 80%, var(--bg-deep) 100%);
  }
  .hero-cine .hero-content { padding: 6rem 1.25rem 3.5rem; width: 100%; }
  .hero-cine .hero-title span { font-size: 0.56em; }
  .hero-cine .hero-eyebrow { font-size: 0.66rem; letter-spacing: 0.22em; }
  .hero-cine .hero-title { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .hero-cine .hero-divider { margin: 0 auto 1.3rem; background: linear-gradient(to right, transparent, var(--gold), transparent); }
  .hero-cine .hero-subtitle { margin: 0 auto 2rem; font-size: 1.05rem; }
  .hero-secondary { margin-left: auto; margin-right: auto; }
  .gate { display: flex; align-items: center; width: 100%; }
  .gate-cta { width: 100%; max-width: 360px; justify-content: center; padding: 1.15rem 1.2rem; letter-spacing: 0.16em; }
  .gate-light { left: 50%; margin-left: -200px; width: 400px; }
  .gate-fog { left: 50%; margin-left: -230px; width: 460px; }
  .gate-hook { text-align: center; font-size: 1rem; }
  .hero-scroll { display: none; }
}

@media (max-height: 720px) and (min-width: 701px) {
  .hero-cine .hero-content { padding-top: 5.5rem; padding-bottom: 4rem; }
  .hero-cine .hero-title { font-size: clamp(2rem, 4.4vw, 3.6rem); margin-bottom: 1rem; }
  .hero-cine .hero-subtitle { margin-bottom: 1.8rem; }
  .hero-scroll { display: none; }
}

/* ---------- Reduced motion: same layout, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-cine .hero-bg img,
  .hero-mist,
  .gate-light,
  .gate-fog,
  .hero-cine .hero-content,
  .hero-scroll span { animation: none !important; }
  .gate-cta, .gate-cta::after, .gate-arrow { transition: none !important; }
  #hero-snow, .hero-particles-extra { display: none; }
}
