/* ========================================
   TooniAI Marketing Website
   Dark theme matching the app
   ======================================== */

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

:root {
  --bg: #0F0F14;
  --surface: #1A1A24;
  --card: #242433;
  --card-hover: #2E2E3F;
  --text: #FAFAFA;
  --text-secondary: #A0A0B0;
  --text-muted: #6B6B7B;
  --accent: #7C3AED;
  --accent-light: #A78BFA;
  --accent-glow: rgba(124, 58, 237, 0.25);
  --success: #10B981;
  --error: #EF4444;
  --border: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --max-width: 1200px;
  --nav-height: 64px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ---------- Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #A78BFA, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border-radius: var(--radius-lg);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Apple App Store Badge */
.app-store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.app-store-badge:active {
  transform: translateY(0);
}

.app-store-badge img {
  height: 54px;
  width: auto;
}

/* ========================================
   NAV
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background-color: rgba(15, 15, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-cta {
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.hero-text {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-cta {
  margin-bottom: 24px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-stars {
  display: flex;
  gap: 2px;
}

.hero-stars svg {
  width: 18px;
  height: 18px;
  color: #F59E0B;
}

.hero-trust-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Phone mockup */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 380px;
  position: relative;
}

.phone-mockup {
  position: relative;
  z-index: 1;
  width: 280px;
  height: 570px;
  background: var(--card);
  border-radius: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(124, 58, 237, 0.15);
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--bg);
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   BEFORE / AFTER
   ======================================== */
.before-after {
  background: var(--surface);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
}

.ba-carousel {
  position: relative;
  overflow: hidden;
}

.ba-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 calc((100% - min(380px, 85vw)) / 2);
}

.ba-track::-webkit-scrollbar {
  display: none;
}

.ba-card {
  flex: 0 0 min(380px, 85vw);
  scroll-snap-align: center;
}

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 0.8;
  border-radius: 20px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: var(--card);
}

.ba-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-clip {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.ba-before-clip .ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  z-index: 3;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--bg);
}

.ba-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  z-index: 4;
}

.ba-label-before {
  left: 12px;
}

.ba-label-after {
  right: 12px;
}

.ba-style-name {
  text-align: center;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ba-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.ba-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--card);
  transition: width 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.ba-dot.active {
  width: 24px;
  background: var(--accent);
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.3);
}

.step-icon {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 100px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ========================================
   STYLE GALLERY
   ======================================== */
.styles {
  background: var(--surface);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.style-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 0.85;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.style-card:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

.style-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.style-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-name {
  font-size: 13px;
  font-weight: 600;
}

.style-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.style-badge.hot {
  background: var(--error);
  color: #fff;
}

.style-badge.new {
  background: var(--accent);
  color: #fff;
}

/* ========================================
   FEATURES
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 24px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   CTA
   ======================================== */
.cta {
  background: var(--surface);
  text-align: center;
}

.cta-content {
  max-width: 560px;
  margin: 0 auto;
}

.cta-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--accent);
}

.cta-title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cta-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.footer-name {
  font-size: 18px;
  font-weight: 800;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
}

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

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

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  .style-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    gap: 40px;
  }

  .hero-visual {
    max-width: 300px;
  }

  .phone-mockup {
    width: 240px;
    height: 490px;
  }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px;
    gap: 40px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    max-width: 280px;
  }

  .phone-mockup {
    width: 220px;
    height: 450px;
  }

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

  .step {
    max-width: 360px;
    width: 100%;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  .style-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .hero-title {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  .style-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .phone-mockup {
    width: 200px;
    height: 410px;
    border-radius: 32px;
  }

  .phone-mockup::before {
    width: 100px;
    height: 24px;
    border-radius: 0 0 16px 16px;
  }
}

/* ---------- Lottie Animations ---------- */

/* Sparkle burst above phone mockup */
.hero-lottie-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

.hero-lottie-wrap lottie-player {
  width: 100%;
  height: 100%;
}


/* AI logo in How It Works step 3 */
.step-icon-lottie {
  background: none;
  overflow: hidden;
}

.step-icon-lottie lottie-player {
  width: 88px;
  height: 88px;
}

/* Confetti overlay on CTA section */
.cta {
  position: relative;
  overflow: hidden;
}

.cta-confetti {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
  display: none;
}

.cta-confetti.active {
  display: block;
}

.cta-confetti lottie-player {
  width: 100%;
  height: 100%;
}
