/* ═══════════════════════════════════════════════════════════
   Atlas Conquest — Landing Page
   Dark fantasy strategy aesthetic with hex-grid motifs
   ═══════════════════════════════════════════════════════════ */

/* ─── Typography ───────────────────────────────────────── */

.landing-hero-title,
.landing-section-title,
.landing-footer-brand {
  font-family: 'Cinzel', serif;
}

/* ─── Scroll Reveal ────────────────────────────────────── */

.landing-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

.landing-hero {
  position: relative;
  padding: 8rem 0 6rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Hero background art */
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-art-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14, 17, 23, 0.55) 0%, rgba(14, 17, 23, 0.7) 40%, rgba(14, 17, 23, 0.92) 75%, var(--bg) 100%),
    linear-gradient(to right, rgba(14, 17, 23, 0.6) 0%, transparent 30%, transparent 70%, rgba(14, 17, 23, 0.6) 100%);
}

/* Hex grid pattern via inline SVG */
.hero-hex-grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  color: var(--text);
}

.hero-hex-grid svg {
  width: 100%;
  height: 100%;
}

/* Atmospheric glow effects */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: var(--skaal);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--archaeon);
  top: -100px;
  right: -50px;
  animation-delay: -3s;
}

.hero-glow-3 {
  width: 350px;
  height: 350px;
  background: var(--grenalia);
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -5s;
  opacity: 0.2;
}

@keyframes glowPulse {
  from { opacity: 0.2; transform: scale(1); }
  to { opacity: 0.4; transform: scale(1.15); }
}

.hero-glow-3 {
  animation-name: glowPulse3;
}

@keyframes glowPulse3 {
  from { opacity: 0.15; transform: translateX(-50%) scale(1); }
  to { opacity: 0.3; transform: translateX(-50%) scale(1.1); }
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lucia);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 1.5rem;
  animation: fadeDown 0.6s ease both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-hero-title {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
  animation: titleReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.landing-hero-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  animation: fadeUp 0.7s ease 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.45s both;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.75rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--lucia);
  color: #111;
  box-shadow: 0 0 20px rgba(232, 182, 48, 0.15);
}

.btn-primary:hover {
  background: #f0c640;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232, 182, 48, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* ─── Stats Row ────────────────────────────────────────── */

.landing-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  animation: fadeUp 0.7s ease 0.6s both;
}

.landing-stat {
  text-align: center;
}

.landing-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.landing-stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.landing-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Tighter section spacing for landing page */
.landing-section.section {
  padding: 3rem 0;
}

/* ─── Section Titles ───────────────────────────────────── */

.landing-section-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-align: center;
}

.landing-section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.6;
  text-align: center;
}

/* ─── Hex Cluster Illustration ─────────────────────────── */

.hex-cluster {
  position: relative;
  width: 180px;
  height: 160px;
  margin: 0.5rem auto 1rem;
}

.hex {
  position: absolute;
  width: 52px;
  height: 52px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: all 0.4s ease;
}

.hex-center {
  background: rgba(232, 182, 48, 0.25);
  border: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(232, 182, 48, 0.1);
}

/* Top */
.hex-1 {
  background: rgba(0, 114, 178, 0.15);
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 44px));
}

/* Top-right */
.hex-2 {
  background: rgba(213, 94, 0, 0.15);
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 38px), calc(-50% - 22px));
}

/* Bottom-right */
.hex-3 {
  background: rgba(0, 158, 115, 0.12);
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 38px), calc(-50% + 22px));
}

/* Bottom */
.hex-4 {
  background: rgba(123, 123, 142, 0.12);
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 44px));
}

/* Bottom-left */
.hex-5 {
  background: rgba(168, 144, 120, 0.1);
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% - 38px), calc(-50% + 22px));
}

/* Top-left */
.hex-6 {
  background: rgba(0, 158, 115, 0.1);
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% - 38px), calc(-50% - 22px));
}

/* ─── How It Works ─────────────────────────────────────── */

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.how-step {
  text-align: center;
  padding: 2rem 1.5rem;
}

.how-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lucia);
  margin: 0 auto 1.25rem;
  transition: all 0.3s ease;
}

.how-step:hover .how-step-icon {
  border-color: var(--lucia);
  box-shadow: 0 0 20px rgba(232, 182, 48, 0.15);
}

.how-step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.625rem;
}

.how-step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Commander Showcase ───────────────────────────────── */

.commander-showcase-section {
  padding-bottom: 2rem;
}

.commander-scroll-track {
  overflow: hidden;
  margin-top: 1rem;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.commander-scroll {
  display: flex;
  gap: 1.25rem;
  animation: scrollCommanders 40s linear infinite;
  width: max-content;
}

@keyframes scrollCommanders {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.commander-scroll:hover {
  animation-play-state: paused;
}

.commander-showcase-card {
  flex-shrink: 0;
  width: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}

.commander-showcase-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--text-muted);
}

.commander-showcase-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.commander-showcase-card:hover img {
  transform: scale(1.05);
}

.commander-showcase-name {
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Commander faction color badges */
.commander-showcase-card[data-faction]  { border-bottom: 3px solid transparent; }
.commander-showcase-card[data-faction="skaal"]    { border-bottom-color: var(--skaal); }
.commander-showcase-card[data-faction="grenalia"]  { border-bottom-color: var(--grenalia); }
.commander-showcase-card[data-faction="lucia"]     { border-bottom-color: var(--lucia); }
.commander-showcase-card[data-faction="shadis"]    { border-bottom-color: var(--shadis); }
.commander-showcase-card[data-faction="archaeon"]  { border-bottom-color: var(--archaeon); }
.commander-showcase-card[data-faction="neutral"]   { border-bottom-color: var(--neutral); }

/* ─── Faction Grid ─────────────────────────────────────── */

.faction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.faction-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.faction-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fc, var(--border));
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.faction-card[data-faction="skaal"]::before { background: var(--skaal); }
.faction-card[data-faction="grenalia"]::before { background: var(--grenalia); }
.faction-card[data-faction="lucia"]::before { background: var(--lucia); }
.faction-card[data-faction="shadis"]::before { background: var(--shadis); }
.faction-card[data-faction="archaeon"]::before { background: var(--archaeon); }
.faction-card[data-faction="neutral"]::before { background: var(--neutral); }

.faction-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--text-muted);
}

.faction-card:hover::before {
  opacity: 1;
}

.faction-card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.faction-card-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.faction-card:hover .faction-card-icon {
  transform: scale(1.1);
  filter: brightness(1.15);
}

.faction-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.faction-card-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.faction-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ─── Starter Decks ────────────────────────────────────── */

.starter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.starter-grid .starter-card {
  flex: 0 0 calc(33.33% - 0.84rem);
  min-width: 0;
}

.starter-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.starter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--text-muted);
}

.starter-card-art-wrap {
  position: relative;
  overflow: hidden;
}

.starter-card-art {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.starter-card:hover .starter-card-art {
  transform: scale(1.05);
}

.starter-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

.starter-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.starter-card-faction {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.625rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fc, var(--text-secondary));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.starter-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.starter-card-commander {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.starter-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ─── CTA Section ──────────────────────────────────────── */

.landing-cta-section {
  padding-bottom: 3rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cta-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--text-muted);
}

.cta-card-primary {
  background: linear-gradient(135deg, rgba(232, 182, 48, 0.08), rgba(232, 182, 48, 0.02));
  border-color: rgba(232, 182, 48, 0.2);
}

.cta-card-primary:hover {
  border-color: rgba(232, 182, 48, 0.4);
  box-shadow: 0 8px 32px rgba(232, 182, 48, 0.1);
}

.cta-icon {
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.cta-card:hover .cta-icon {
  color: var(--text-secondary);
}

.cta-card-primary .cta-icon {
  color: var(--lucia);
}

.cta-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.cta-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.landing-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.landing-footer-inner {
  text-align: center;
}

.landing-footer-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

.landing-footer-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.landing-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.landing-footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.landing-footer-links a:hover {
  color: var(--text);
}

.landing-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

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

@media (max-width: 768px) {
  .landing-hero {
    padding: 5rem 0 4rem;
  }

  .landing-hero-title {
    font-size: 3.25rem;
  }

  .landing-hero-tagline {
    font-size: 1.0625rem;
  }

  .landing-stats {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .landing-stat-divider {
    display: none;
  }

  .landing-section-title {
    font-size: 1.75rem;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .how-step {
    padding: 1.25rem 1rem;
  }

  .faction-grid {
    grid-template-columns: 1fr 1fr;
  }

  .starter-grid .starter-card {
    flex: 0 0 calc(50% - 0.625rem);
  }

  .hex-cluster {
    width: 140px;
    height: 130px;
  }

  .hex {
    width: 42px;
    height: 42px;
  }

  .hex-1 { transform: translate(-50%, calc(-50% - 36px)); }
  .hex-2 { transform: translate(calc(-50% + 31px), calc(-50% - 18px)); }
  .hex-3 { transform: translate(calc(-50% + 31px), calc(-50% + 18px)); }
  .hex-4 { transform: translate(-50%, calc(-50% + 36px)); }
  .hex-5 { transform: translate(calc(-50% - 31px), calc(-50% + 18px)); }
  .hex-6 { transform: translate(calc(-50% - 31px), calc(-50% - 18px)); }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .commander-showcase-card {
    width: 140px;
  }
}

@media (max-width: 480px) {
  .landing-hero {
    padding: 4rem 0 3rem;
  }

  .landing-hero-title {
    font-size: 2.5rem;
  }

  .landing-stats {
    gap: 1rem;
  }

  .landing-stat-value {
    font-size: 1.375rem;
  }

  .faction-grid {
    grid-template-columns: 1fr;
  }

  .starter-grid .starter-card {
    flex: 0 0 100%;
    max-width: 400px;
  }

  .starter-grid {
    flex-direction: column;
    align-items: center;
  }

  .hex-cluster {
    width: 120px;
    height: 110px;
  }

  .hex {
    width: 36px;
    height: 36px;
  }

  .hex-1 { transform: translate(-50%, calc(-50% - 30px)); }
  .hex-2 { transform: translate(calc(-50% + 26px), calc(-50% - 15px)); }
  .hex-3 { transform: translate(calc(-50% + 26px), calc(-50% + 15px)); }
  .hex-4 { transform: translate(-50%, calc(-50% + 30px)); }
  .hex-5 { transform: translate(calc(-50% - 26px), calc(-50% + 15px)); }
  .hex-6 { transform: translate(calc(-50% - 26px), calc(-50% - 15px)); }

  .hero-glow {
    display: none;
  }
}
