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

:root {
  --red: #CF2020;
  --red-light: #E63946;
  --red-dark: #B71C1C;
  --bg: #0A0A0F;
  --bg-card: #12121A;
  --bg-card-hover: #1A1A25;
  --bg-surface: #16161F;
  --text: #F0F0F5;
  --text-muted: #8A8A9A;
  --text-dim: #5A5A6A;
  --border: #2A2A35;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --font-body: 'Barlow', system-ui, sans-serif;
  --font-heading: 'Barlow Condensed', system-ui, sans-serif;
  --font-accent: 'Kaushan Script', cursive;
}

[data-theme="light"] {
  --bg: #F5F5F7;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0F0F3;
  --bg-surface: #EAEAEF;
  --text: #1A1A2E;
  --text-muted: #5A5A6E;
  --text-dim: #8A8A9A;
  --border: #D8D8E0;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.text-gradient {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-accent {
  font-family: var(--font-accent);
  color: var(--red-light);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* === Theme-aware images === */
.themed-img-light { display: none; }
.themed-img-dark { display: block; }
[data-theme="light"] .themed-img-light { display: block; }
[data-theme="light"] .themed-img-dark { display: none; }

/* For inline images in flex containers */
.nav-logo .themed-img-light,
.footer-logo .themed-img-light { display: none; }
.nav-logo .themed-img-dark,
.footer-logo .themed-img-dark { display: block; }
[data-theme="light"] .nav-logo .themed-img-light,
[data-theme="light"] .footer-logo .themed-img-light { display: block; }
[data-theme="light"] .nav-logo .themed-img-dark,
[data-theme="light"] .footer-logo .themed-img-dark { display: none; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(207, 32, 32, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(207, 32, 32, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--red-light);
  color: var(--red-light);
}

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { width: 20px; height: 20px; }

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); }

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-img { height: 80px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a:not(.btn) {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--text); }

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  color: var(--text-muted);
  font-size: 1rem;
}
.nav-mobile.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(207, 32, 32, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(230, 57, 70, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

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

.hero-accent {
  font-family: var(--font-accent);
  color: var(--red-light);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-ios {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
}

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }

.phone-mockup { perspective: 1000px; }

.phone-frame {
  width: 280px;
  height: 580px;
  background: var(--bg-card);
  border-radius: 36px;
  border: 3px solid var(--border);
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(207, 32, 32, 0.1);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.phone-frame:hover { transform: rotateY(0deg) rotateX(0deg); }

.phone-screen {
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-placeholder {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.phone-placeholder-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 16px;
  opacity: 0.6;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.hero-scroll a { color: var(--text-dim); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-badges { justify-content: center; }
  .hero-visual { margin-top: 20px; }
  .phone-frame { width: 240px; height: 500px; transform: none; }
}

/* === Features === */
.features {
  padding: 120px 0;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(207, 32, 32, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(183, 28, 28, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--red-light);
}

.feature-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

/* === Pricing === */
.pricing {
  padding: 120px 0;
  background: var(--bg-surface);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 800px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
}

.pricing-card-pro {
  border-color: var(--red);
  box-shadow: 0 0 60px rgba(207, 32, 32, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 20px;
  border-radius: 100px;
}

.pricing-header { margin-bottom: 28px; }

.pricing-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 3rem;
}

.pricing-period {
  color: var(--text-muted);
  font-size: 1rem;
}

.pricing-annual {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.pricing-save {
  color: var(--red-light);
  font-weight: 600;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2.5;
  margin-top: 1px;
}
.check.pro { stroke: var(--red-light); }

.pricing-features strong { color: var(--text); }

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

/* === Screenshots === */
.screenshots {
  padding: 120px 0;
}

.screenshots-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-track-wrapper {
  overflow: hidden;
  flex: 1;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 33.333%;
  padding: 0 8px;
}

.screenshot-placeholder {
  aspect-ratio: 9/19;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-label {
  color: var(--text-dim);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.carousel-btn:hover {
  border-color: var(--red-light);
  color: var(--red-light);
}
.carousel-btn svg { width: 20px; height: 20px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.carousel-dot.active {
  background: var(--red-light);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 900px) {
  .carousel-slide { flex: 0 0 50%; }
}
@media (max-width: 600px) {
  .carousel-slide { flex: 0 0 80%; }
  .carousel-btn { display: none; }
}

/* === CTA Section === */
.cta-section {
  padding: 80px 0 120px;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-light), var(--red-dark));
}

.cta-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* === Footer === */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-logo-img { height: 36px; width: auto; }

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--red-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}

/* === Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Theme Toggle === */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 8px;
}
.theme-toggle:hover {
  border-color: var(--red-light);
  color: var(--red-light);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* === Light Mode Overrides === */
[data-theme="light"] .nav {
  background: rgba(245, 245, 247, 0.85);
}

[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(207, 32, 32, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(230, 57, 70, 0.05) 0%, transparent 60%);
}

[data-theme="light"] .phone-frame {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.1),
    0 0 80px rgba(207, 32, 32, 0.05);
}

[data-theme="light"] .phone-screen {
  background: #e8e8f0;
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 20px rgba(207, 32, 32, 0.25);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 30px rgba(207, 32, 32, 0.35);
}

[data-theme="light"] .nav-toggle span {
  background: var(--text);
}

[data-theme="light"] .pricing-card-pro {
  box-shadow: 0 0 60px rgba(207, 32, 32, 0.08);
}

[data-theme="light"] .feature-icon {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(183, 28, 28, 0.06));
}

[data-theme="light"] .hero-ios svg {
  fill: var(--text-dim);
}
