/* Exile Companion Website Styles */
/* Design: Refined Dark Fantasy - Atmospheric & Immersive */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #0A0A0C;
  --bg-secondary: #151517;
  --bg-card: #151517;
  --border-color: #2A2A2E;
  --accent: #4AA5FF;
  --accent-hover: #5DB5FF;
  --accent-glow: rgba(74, 165, 255, 0.35);
  --text-primary: #FFFFFF;
  --text-secondary: #AAAAAA;
  --text-muted: #666666;
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;

  /* Glow effects */
  --glow-sm: 0 0 10px var(--accent-glow);
  --glow-md: 0 0 20px var(--accent-glow);
  --glow-lg: 0 0 30px var(--accent-glow), 0 0 60px rgba(74, 165, 255, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Header */
header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.logo:hover {
  transform: translateX(2px);
}

.logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--glow-sm);
  transition: box-shadow 0.3s ease;
}

.logo:hover img {
  box-shadow: var(--glow-md);
}

.logo span {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  transition: all 0.25s ease;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s ease;
}

nav a:hover {
  color: var(--text-primary);
}

nav a:hover::after {
  width: 24px;
}

/* Main content */
main {
  flex: 1;
  padding: 0;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Hero background subtle glow */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(74, 165, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 140px;
  height: 140px;
  margin-bottom: 32px;
  filter: drop-shadow(0 0 20px rgba(74, 165, 255, 0.5)) drop-shadow(0 0 40px rgba(74, 165, 255, 0.3));
  animation: floatSubtle 4s ease-in-out infinite;
  will-change: transform;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.hero .tagline {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 500;
  text-shadow: 0 0 30px var(--accent-glow);
}

.hero .description {
  max-width: 500px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.75;
  font-weight: 300;
}

/* App store buttons */
.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1a1a1c 0%, #0d0d0f 100%);
  border: 1px solid #3a3a40;
  border-radius: 14px;
  padding: 16px 32px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.store-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 165, 255, 0.08) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.store-button:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(74, 165, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.store-button:hover::before {
  opacity: 1;
}

.store-button svg {
  opacity: 0.85;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 0 transparent);
}

.store-button:hover svg {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(74, 165, 255, 0.5));
}

.store-button .store-text {
  text-align: left;
}

.store-button .store-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.store-button .store-text strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Features */
.features-section {
  padding: 70px 24px;
  position: relative;
}

.features-section h2 {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 44px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.feature {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.feature:hover {
  border-color: rgba(74, 165, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  background-color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(74, 165, 255, 0.25);
  transition: all 0.3s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(74, 165, 255, 0.4);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  color: var(--bg-primary);
}

.feature h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  font-weight: 300;
}

/* Content pages (Privacy, Guides) */
.content-page {
  padding: 56px 0;
  position: relative;
}

.content-page h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.content-page .subtitle {
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 400;
}

.content-page h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 18px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.content-page h3 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.content-page p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-weight: 300;
}

.content-page ul, .content-page ol {
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding-left: 24px;
  font-weight: 300;
}

.content-page li {
  margin-bottom: 10px;
}

.content-page a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.content-page a:hover {
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.content-page strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Info boxes */
.info-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}

.info-box.warning {
  border-color: var(--warning);
  background-color: rgba(255, 152, 0, 0.1);
}

.info-box.success {
  border-color: var(--success);
  background-color: rgba(76, 175, 80, 0.1);
}

.info-box p {
  margin: 0;
  color: var(--text-primary);
  font-weight: 400;
}

/* Steps (for guides) */
.steps {
  counter-reset: step;
}

.step {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 24px;
  background-color: var(--accent);
  color: var(--bg-primary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 15px rgba(74, 165, 255, 0.3);
}

.step h3 {
  font-family: 'Cinzel', serif;
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.step p {
  margin-bottom: 14px;
}

.step p:last-child {
  margin-bottom: 0;
}

.step img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 14px;
  border: 1px solid var(--border-color);
}

/* Code */
code {
  background-color: var(--bg-card);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border-color);
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 0;
  margin-top: auto;
}

footer .container-wide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
  font-weight: 400;
}

footer nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.25s ease;
  font-weight: 500;
}

footer nav a:hover {
  color: var(--text-secondary);
  background-color: rgba(74, 165, 255, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 70px 20px 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .tagline {
    font-size: 1.15rem;
  }

  .hero .description {
    font-size: 1rem;
  }

  .hero-logo {
    width: 110px;
    height: 110px;
  }

  .store-buttons {
    flex-direction: column;
    align-items: center;
  }

  .store-button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .features-section {
    padding: 50px 16px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature {
    padding: 28px 24px;
  }

  header .container-wide {
    padding: 0 16px;
  }

  .logo span {
    font-size: 1.1rem;
  }

  footer .container-wide {
    flex-direction: column;
    height: auto;
    padding: 24px 16px;
    gap: 14px;
    text-align: center;
  }

  .content-page h1 {
    font-size: 1.8rem;
  }

  .content-page h2 {
    font-size: 1.3rem;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
