/* =============================================
   ImaginingAI — Landing Page Styles
   Dark theme, mobile-first, standalone
   ============================================= */

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

:root {
  --accent: #A855F7;
  --accent-dark: #7C3AED;
  --accent-secondary: #EC4899;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --bg: #0A0A0F;
  --bg-alt: #0E0E16;
  --surface: #16161F;
  --surface-hover: #1E1E2A;
  --text-primary: #F0F0F5;
  --text-secondary: #8B8B9E;
  --border-subtle: rgba(139, 139, 158, 0.12);
  --card-radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --container-max: 1100px;
  --section-py: 96px;
  --header-h: 64px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* --- Container --- */
.landing-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.landing-header.scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(10, 10, 15, 0.95);
}

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

.landing-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.landing-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.landing-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.landing-header-cta:active {
  transform: scale(0.97);
}

/* =============================================
   HERO
   ============================================= */
.landing-hero {
  position: relative;
  padding: calc(var(--header-h) + 60px) 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(168, 85, 247, 0.12) 0%,
    rgba(236, 72, 153, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.landing-hero .landing-container {
  position: relative;
  z-index: 1;
}

.landing-hero-title {
  font-size: clamp(34px, 7vw, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

.landing-hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Hero free-tier badge */
.landing-hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.10));
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.12), 0 0 60px rgba(168, 85, 247, 0.05);
  overflow: hidden;
  animation: badgeFadeUp 0.6s ease-out both;
  animation-delay: 0.3s;
}

.hero-badge-icon {
  color: #D8B4FE;
  flex-shrink: 0;
  animation: badgeSpin 4s ease-in-out infinite;
}

.hero-badge-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2px;
  line-height: 1;
}

.hero-badge-text strong {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #E9D5FF, #C084FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer sweep */
.hero-badge-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(168, 85, 247, 0.15) 40%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(168, 85, 247, 0.15) 60%,
    transparent 100%
  );
  animation: shimmerSweep 3s ease-in-out infinite;
  animation-delay: 1s;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0%   { left: -100%; }
  100% { left: 100%; }
}

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

@keyframes badgeSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25%      { transform: rotate(-8deg) scale(1.1); }
  50%      { transform: rotate(0deg) scale(1); }
  75%      { transform: rotate(8deg) scale(1.1); }
}

/* Legacy hint fallback */
.landing-hero-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* =============================================
   CTA BUTTONS
   ============================================= */
.landing-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.landing-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45);
}

.landing-cta-btn:active {
  transform: scale(0.97);
}

.landing-cta-btn-large {
  padding: 18px 42px;
  font-size: 18px;
  border-radius: 16px;
}

.telegram-icon {
  flex-shrink: 0;
}

/* =============================================
   SECTIONS — Shared
   ============================================= */
.landing-section {
  padding: var(--section-py) 0;
}

.landing-section-alt {
  background: var(--surface);
}

.landing-section-title {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.landing-section-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
}

/* =============================================
   BEFORE / AFTER GALLERY
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  text-align: center;
}

.before-after-pair {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ba-card {
  position: relative;
  flex: 1;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 4;
}

.ba-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ba-before {
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.8);
}

.ba-after {
  background: rgba(168, 85, 247, 0.7);
  color: #fff;
}

.gallery-style-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Image placeholder for when user hasn't added images yet */
.ba-card img[src=""],
.ba-card img:not([src]) {
  display: none;
}

.ba-card:has(img[src=""]),
.ba-card:has(img:not([src])) {
  background: linear-gradient(135deg, var(--surface), var(--surface-hover));
}

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

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(168, 85, 247, 0.2);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* =============================================
   HOW IT WORKS — STEPS
   ============================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

/* Connecting line between steps */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--accent));
  opacity: 0.25;
  z-index: 0;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.step-icon {
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

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

.step-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

/* =============================================
   STYLES SHOWCASE
   ============================================= */
.styles-showcase {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.style-showcase-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}

.style-showcase-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.style-showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.style-showcase-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* =============================================
   FINAL CTA SECTION
   ============================================= */
.landing-cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(168, 85, 247, 0.1) 0%,
    rgba(236, 72, 153, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.landing-cta-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
}

.landing-cta-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 36px;
  position: relative;
}

.landing-cta-subtitle strong {
  color: #E9D5FF;
  font-weight: 700;
}

.landing-cta-section .landing-cta-btn {
  position: relative;
}

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

.landing-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-brand-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-email {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  display: inline-block;
}
.footer-email:hover { color: #fff; }

.footer-copy {
  font-size: 13px;
  color: var(--text-secondary);
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.gallery-grid [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.gallery-grid [data-reveal]:nth-child(3) { transition-delay: 0.2s; }

.features-grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.features-grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.features-grid [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

.steps-grid [data-reveal]:nth-child(2) { transition-delay: 0.12s; }
.steps-grid [data-reveal]:nth-child(3) { transition-delay: 0.24s; }

.styles-showcase [data-reveal]:nth-child(2) { transition-delay: 0.06s; }
.styles-showcase [data-reveal]:nth-child(3) { transition-delay: 0.12s; }
.styles-showcase [data-reveal]:nth-child(4) { transition-delay: 0.18s; }
.styles-showcase [data-reveal]:nth-child(5) { transition-delay: 0.24s; }
.styles-showcase [data-reveal]:nth-child(6) { transition-delay: 0.3s; }

/* =============================================
   RESPONSIVE — Tablet (max 768px)
   ============================================= */
@media (max-width: 768px) {
  :root {
    --section-py: 72px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-grid::before {
    display: none;
  }

  .styles-showcase {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .landing-footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* =============================================
   RESPONSIVE — Mobile (max 480px)
   ============================================= */
@media (max-width: 480px) {
  :root {
    --section-py: 56px;
    --header-h: 56px;
  }

  .landing-container {
    padding: 0 16px;
  }

  .landing-hero {
    padding: calc(var(--header-h) + 40px) 0 60px;
  }

  .landing-brand {
    font-size: 16px;
  }

  .landing-header-cta {
    padding: 7px 16px;
    font-size: 13px;
  }

  .landing-cta-btn {
    padding: 14px 28px;
    font-size: 15px;
    width: 100%;
    justify-content: center;
  }

  .landing-cta-btn-large {
    padding: 16px 32px;
    font-size: 16px;
  }

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

  .feature-card {
    padding: 24px 20px;
  }

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

  .before-after-pair {
    gap: 6px;
  }

  .landing-section-subtitle {
    margin-bottom: 36px;
  }

  .landing-hero-badge {
    padding: 8px 16px;
    gap: 6px;
  }

  .hero-badge-text {
    font-size: 13px;
  }

  .hero-badge-icon {
    width: 14px;
    height: 14px;
  }
}
