/* ============================================
   History Vibes - Premium Landing Page
   Complete Design System v2.0
   ============================================ */

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

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Common Design Tokens */
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-editorial: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Syncopate', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --learned: #10B981;
  --knew: #3B82F6;

  /* Default Light Theme */
  --color-bg: #f4f4f0;
  --color-surface: #ffffff;
  --color-primary: #000000;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --accent: #000000;
  --accent-glow: #000000;
  --accent-dark: #666666;

  --border: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  --card-hover-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);

  --glass-bg: rgba(244, 244, 240, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);

  --hero-bg: #f4f4f0;
  --hero-text: #1a1a1a;
  --hero-muted: #666666;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   Scroll Animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children>* {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.stagger-children.visible>*:nth-child(1) {
  transition-delay: 0.05s;
}

.stagger-children.visible>*:nth-child(2) {
  transition-delay: 0.12s;
}

.stagger-children.visible>*:nth-child(3) {
  transition-delay: 0.19s;
}

.stagger-children.visible>*:nth-child(4) {
  transition-delay: 0.26s;
}

.stagger-children.visible>*:nth-child(5) {
  transition-delay: 0.33s;
}

.stagger-children.visible>*:nth-child(6) {
  transition-delay: 0.40s;
}

.stagger-children.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Utility
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-desc {
  font-family: var(--font-editorial);
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--color-text-muted);
  max-width: 600px;
  font-style: italic;
  line-height: 1.6;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 0;
  transition: all 0.4s ease;
}

.site-header.scrolled {
  background: var(--color-bg);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--color-text);
  transition: color 0.4s ease;
}

.site-header.scrolled .nav-brand-name {
  color: var(--color-text);
}

.nav-brand-sub {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.site-header.scrolled .nav-link {
  color: var(--color-text-muted);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-cta {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 149, 59, 0.3);
}

@media (max-width: 640px) {
  .nav-link {
    display: none;
  }
}

/* ============================================
   HERO SECTION (Dark Immersive)
   ============================================ */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  overflow: hidden;
  padding: 120px 0 60px;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/hero_bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

/* Floating Particles */
.particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 8s infinite ease-in-out;
}

.particle:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.particle:nth-child(2) {
  left: 25%;
  top: 60%;
  animation-delay: 1s;
  animation-duration: 9s;
}

.particle:nth-child(3) {
  left: 45%;
  top: 30%;
  animation-delay: 2s;
  animation-duration: 6s;
}

.particle:nth-child(4) {
  left: 65%;
  top: 70%;
  animation-delay: 3s;
  animation-duration: 8s;
}

.particle:nth-child(5) {
  left: 80%;
  top: 15%;
  animation-delay: 0.5s;
  animation-duration: 10s;
}

.particle:nth-child(6) {
  left: 90%;
  top: 50%;
  animation-delay: 2.5s;
  animation-duration: 7s;
}

.particle:nth-child(7) {
  left: 15%;
  top: 80%;
  animation-delay: 4s;
  animation-duration: 9s;
}

.particle:nth-child(8) {
  left: 55%;
  top: 10%;
  animation-delay: 1.5s;
  animation-duration: 6s;
}

@keyframes floatParticle {

  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }

  10% {
    opacity: 0.7;
  }

  50% {
    opacity: 0.4;
    transform: translateY(-80px) scale(1.5);
  }

  90% {
    opacity: 0;
  }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }
}

/* Hero Content */
.hero-eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--accent);
}

@media (max-width: 968px) {
  .hero-eyebrow::before {
    display: none;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-editorial);
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 24px;
  font-style: italic;
}

@media (max-width: 968px) {
  .hero-subtitle {
    margin: 0 auto 40px;
  }
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 968px) {
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
}

/* Theme Toggle Switch */


/* --- HERO VISUAL (CSS PHONE MOCKUP) --- */
.hero-social-proof {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 968px) {
  .hero-social-proof {
    justify-content: center;
  }
}

.hero-content {
  align-self: flex-start;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Showcase Container — holds the sliced images */
.showcase-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 9 / 17;
  /* Make phone wider and less tall */
  margin: 0 auto;
  z-index: 2;
  animation: heroFloat 6s ease-in-out infinite;

  /* Phone Mockup styles */
  background: #fff;
  border: 12px solid #1a1a1a;
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #333;
  overflow: hidden;
}

/* Phone notch */
.showcase-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 25px;
  background: #1a1a1a;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* Showcase slides inside the phone frame */
.showcase-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Prevents status bar from shifting/cropping */
  opacity: 0;
  transform: translateX(100%);
  z-index: 1;
  transition: opacity 0.8s ease-in-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.showcase-slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.showcase-slide.previous {
  opacity: 0;
  transform: translateX(-50%);
  z-index: 1;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 28px;
  width: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 4px 15px rgba(106, 90, 205, 0.6), 0 0 0 0 rgba(106, 90, 205, 0.5);
  }

  50% {
    box-shadow: 0 4px 25px rgba(0, 191, 255, 0.8), 0 0 0 12px rgba(0, 191, 255, 0);
  }

  100% {
    box-shadow: 0 4px 15px rgba(106, 90, 205, 0.6), 0 0 0 0 rgba(106, 90, 205, 0);
  }
}

.theme-toggle-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.theme-toggle-btn:hover {
  transform: translateX(-50%) scale(1.08);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  animation: none;
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Dark theme toggled state */
.showcase-container.dark-theme {
  background: #000;
  border-color: #1a1a1a;
}

.showcase-container.dark-theme .theme-toggle-btn {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  animation: glowPulseDark 2s infinite;
}

@keyframes glowPulseDark {
  0% {
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.6), 0 0 0 0 rgba(162, 89, 255, 0.5);
  }

  50% {
    box-shadow: 0 4px 25px rgba(23, 116, 255, 0.8), 0 0 0 12px rgba(23, 116, 255, 0);
  }

  100% {
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.6), 0 0 0 0 rgba(162, 89, 255, 0);
  }
}

.showcase-container.dark-theme .theme-toggle-btn:hover {
  background: #1a1a1a;
}

.showcase-container.dark-theme .icon-moon {
  display: none;
}

.showcase-container.dark-theme .icon-sun {
  display: block !important;
}

@media (max-width: 968px) {
  .showcase-container {
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .showcase-container {
    max-width: 100%;
  }

  .hero-visual {
    margin-top: 10px;
  }
}

/* Play Store Badge */
.playstore-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.playstore-link:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.playstore-badge {
  height: 85px;
  width: auto;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-section {
  padding: 45px 0;
}

.how-header {
  text-align: center;
  margin-bottom: 24px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 968px) {
  .how-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

.how-step {
  text-align: center;
  padding: 24px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.how-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
}

.how-step:hover::before {
  transform: scaleX(1);
}

.how-step:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
  border-color: transparent;
}

.how-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--border);
  margin-bottom: 12px;
  line-height: 1;
}

.how-step:hover .how-number {
  color: var(--accent);
  transition: color 0.4s ease;
}

.how-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.how-step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.how-step p {
  font-size: 14.5px;
  color: var(--color-text-muted);
  line-height: 1.65;
}



/* ============================================
   FEATURES GRID
   ============================================ */
.features-section {
  padding: 45px 0;
}

.features-header {
  text-align: center;
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, rgba(201, 149, 59, 0.05), transparent);
  transition: height 0.5s var(--ease-out-expo);
}

.feature-card:hover::after {
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--card-hover-shadow);
}

.feature-emoji {
  font-size: 32px;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}



/* ============================================
   TESTIMONIAL STRIP
   ============================================ */
.testimonial-section {
  padding: 35px 0;
  text-align: center;
  position: relative;
}

.testimonial-quote {
  font-family: var(--font-editorial);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto 16px;
  color: var(--color-text);
}

.testimonial-attribution {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-section {
  padding: 50px 0;
  text-align: center;
  background: var(--color-bg);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}

.cta-section .hero-bg-image {
  opacity: 0.15;
}

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

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}

.cta-desc {
  font-family: var(--font-editorial);
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto 24px;
  font-style: italic;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 24px 0 16px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .stagger-children>* {
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-phone-wrapper,
  .particle,
  .ticker-track {
    animation: none !important;
  }
}