/* ============================================
   Letter Run — Landing Page Styles
   https://letterrun.askquip.com
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors — derived from Letter Run's jungle/dark theme */
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0bc;
  --text-muted: #6c6c8a;
  --accent-green: #4ade80;
  --accent-green-glow: rgba(74, 222, 128, 0.3);
  --accent-gold: #fbbf24;
  --accent-gold-glow: rgba(251, 191, 36, 0.3);
  --accent-blue: #60a5fa;
  --accent-purple: #a78bfa;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  --gradient-accent: linear-gradient(135deg, #4ade80, #60a5fa);
  --gradient-gold: linear-gradient(135deg, #fbbf24, #f59e0b);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-green: 0 0 30px var(--accent-green-glow);
  --shadow-glow-gold: 0 0 30px var(--accent-gold-glow);
}

/* --- Reset / Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-green);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-4xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: var(--space-md) auto 0;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: var(--space-sm);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: var(--space-4xl) var(--space-lg);
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(2px);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 15, 30, 0.4) 0%,
    rgba(15, 15, 30, 0.7) 50%,
    var(--bg-primary) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow-green);
  margin: 0 auto var(--space-xl);
  animation: float 4s ease-in-out infinite;
  border: 3px solid var(--glass-border);
}

.hero h1 {
  margin-bottom: var(--space-md);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.badge-icon {
  font-size: 1rem;
}

/* --- Google Play Button --- */
.play-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.play-button:hover {
  background: var(--surface-hover);
  border-color: var(--accent-green);
  box-shadow: var(--shadow-glow-green);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.play-button svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.play-button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.play-button-label {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.play-button-store {
  font-size: 1.15rem;
  font-weight: 700;
}

/* --- Features Section --- */
.features {
  background: var(--bg-secondary);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent-green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-emoji {
  font-size: 2.2rem;
  margin-bottom: var(--space-md);
  display: block;
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

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

/* --- How to Play Section --- */
.how-to-play {
  background: var(--bg-primary);
}

.how-to-play-content {
  max-width: 750px;
  margin: 0 auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(12px);
  text-align: center;
}

.how-to-play-content .play-emoji {
  font-size: 3.5rem;
  margin-bottom: var(--space-lg);
  display: block;
}

.how-to-play-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.how-to-play-content p + p {
  margin-top: var(--space-md);
}

/* --- Screenshots Section --- */
.screenshots {
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.screenshots::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.screenshots-scroll {
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  padding: var(--space-lg) var(--space-lg) var(--space-2xl);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-frame {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: center;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  background: #000;
}

.screenshot-frame:hover {
  transform: scale(1.03);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-lg), var(--shadow-glow-gold);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshots-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-md);
}

/* --- CTA Section --- */
.cta {
  background: var(--bg-primary);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-green-glow) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.cta h2 {
  position: relative;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-2xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta .play-button {
  position: relative;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-green);
}

.footer-copyright {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for feature cards */
.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }
.feature-card:nth-child(5) { transition-delay: 0.25s; }
.feature-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Privacy Policy Page --- */
.privacy-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.privacy-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-lg) 0;
}

.privacy-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.privacy-header-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.privacy-header-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.privacy-back {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.privacy-back:hover {
  color: var(--accent-green);
}

.privacy-content {
  flex: 1;
  padding: var(--space-3xl) 0;
}

.privacy-content .container {
  max-width: 780px;
}

.privacy-content h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: var(--space-xs);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.privacy-content .updated-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-2xl);
}

.privacy-content h2 {
  font-size: 1.3rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--accent-green);
}

.privacy-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.privacy-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-md);
}

.privacy-content ul li {
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
  line-height: 1.6;
}

.privacy-content ul li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  top: 0.6rem;
}

.privacy-content strong {
  color: var(--text-primary);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: var(--space-3xl) var(--space-md);
  }

  .hero-icon {
    width: 90px;
    height: 90px;
  }

  section {
    padding: var(--space-3xl) 0;
  }

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

  .screenshot-frame {
    width: 200px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 75vh;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
  }

  .play-button {
    padding: var(--space-sm) var(--space-lg);
  }

  .how-to-play-content {
    padding: var(--space-lg);
  }

  .screenshot-frame {
    width: 180px;
  }
}
