/* ===== CUSTOM PROPERTIES ===== */
:root {
  --color-bg: #1A1A1D;
  --color-surface: #2C2C32;
  --color-primary: #E63946;
  --color-secondary: #457B9D;
  --color-accent: #F1FAEE;
  --color-text: #F1FAEE;
  --color-text-dim: #A8A8A8;
  --color-border: #3E3E42;
  --color-success: #2A9D8F;
  --color-danger: #E63946;
  --color-gold: #FFD700;

  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.15);
  --glass-highlight: rgba(255,255,255,0.25);
  --glass-surface: rgba(44,44,50,0.65);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-dim);
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

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

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 24px rgba(230, 57, 70, 0.35);
}
.btn--primary:hover { box-shadow: 0 6px 32px rgba(230, 57, 70, 0.5); }

.btn--glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--glass:hover { background: var(--glass-highlight); }

.btn--lg { padding: 18px 36px; font-size: 1.125rem; }

/* ===== SCROLL ANIMATIONS ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.nav.is-scrolled {
  background: rgba(26, 26, 29, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--glass-border);
  padding: var(--spacing-sm) 0;
}

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

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.nav__wordmark {
  font-weight: 700;
  font-size: 1.125rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-dim);
  transition: color 0.2s;
}

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

.nav__cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero__glow {
  position: absolute;
  top: 40%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, rgba(69, 123, 157, 0.08) 50%, transparent 70%);
  pointer-events: none;
}

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

.hero__text { max-width: 540px; }

.hero__wordmark {
  max-width: 320px;
  margin-bottom: var(--spacing-lg);
}

.hero__title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

.hero__desc {
  font-size: 1.2rem;
  color: var(--color-text-dim);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.hero__stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.store-badge {
  display: block;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.9;
}

.store-badge svg {
  height: 44px;
  width: auto;
}

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

.hero__trust {
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

/* Hero Devices */
.hero__devices {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  perspective: 1200px;
}

.device {
  background: #111;
  border-radius: 32px;
  padding: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
}

.device__notch {
  width: 80px;
  height: 20px;
  background: #111;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.device__screen {
  background: var(--color-bg);
  border-radius: 22px;
  overflow: hidden;
}

.device__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device--hero-phone {
  width: 260px;
  z-index: 2;
  transform: rotateY(-6deg) rotateX(2deg);
}

.device--hero-tablet {
  width: 400px;
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%) rotateY(8deg) rotateX(2deg);
  z-index: 1;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1), 0 0 0 1px rgba(255,255,255,0.1);
}

/* ===== FEATURES ===== */
.features {
  padding: 100px 0;
}

.features__group { margin-bottom: 80px; }
.features__group:last-child { margin-bottom: 0; }

.features__grid {
  display: grid;
  gap: var(--spacing-lg);
}

.features__grid--3 { grid-template-columns: repeat(3, 1fr); }
.features__grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 800px; margin: 0 auto; }

.feature-card {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.feature-card__screenshot {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--color-surface);
  position: relative;
}

.feature-card__screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Placeholder state: show a subtle pattern when image is missing */
.feature-card__screenshot img[src$=".png"]:not([src=""]) {
  /* no special handling when image exists */
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xs);
}

.feature-card p {
  color: var(--color-text-dim);
  font-size: 0.9375rem;
  line-height: 1.5;
  padding: 0 var(--spacing-lg) var(--spacing-lg);
}

/* ===== HOW IT WORKS ===== */
.steps {
  padding: 100px 0;
}

.steps__list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.steps__item {
  position: relative;
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
  padding-bottom: 48px;
}

.steps__item:last-child { padding-bottom: 0; }

.steps__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  position: relative;
  z-index: 2;
}

.steps__connector {
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  border-left: 2px dashed var(--glass-border);
}

.steps__card {
  flex: 1;
  padding: var(--spacing-xl);
}

.steps__card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.steps__card p {
  color: var(--color-text-dim);
  line-height: 1.6;
}

.steps__link {
  display: inline-block;
  margin-top: var(--spacing-sm);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.steps__link:hover { color: #ff4d5a; }

/* ===== INSTALL ===== */
.install {
  padding: 100px 0;
}

.install__methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  max-width: 960px;
  margin: 0 auto;
}

.install__card {
  padding: var(--spacing-xl);
  position: relative;
}

.install__card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.install__step-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--spacing-md);
}

.install__steps {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: var(--spacing-lg);
}

.install__steps li {
  color: var(--color-text-dim);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.install__steps li strong {
  color: var(--color-text);
}

.install__steps a {
  color: var(--color-primary);
  font-weight: 600;
  transition: color 0.2s;
}

.install__steps a:hover {
  color: #ff4d5a;
}

.install__url-box {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  overflow: hidden;
}

.install__url-box code {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--color-accent);
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.install__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.install__copy-btn:hover {
  background: var(--glass-highlight);
  transform: translateY(-1px);
}

.install__copy-btn svg {
  width: 16px;
  height: 16px;
}

.install__paths {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.install__paths p {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.install__paths code {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

/* ===== SUBSCRIBE (Patreon CTA) ===== */
.subscribe {
  padding: 100px 0;
}

.subscribe__card {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px;
  text-align: center;
}

.subscribe__card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
}

.subscribe__card > p {
  color: var(--color-text-dim);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: var(--spacing-xl);
}

.subscribe__perks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: 400px;
  margin: 0 auto var(--spacing-xl);
}

.subscribe__perk {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-dim);
  font-size: 0.9375rem;
}

.subscribe__perk svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-success);
}

/* ===== FAQ ===== */
.faq {
  padding: 100px 0;
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--glass-border);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  transition: color 0.2s;
}

.faq__question:hover { color: var(--color-primary); }

.faq__question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--color-text-dim);
}

.faq__question[aria-expanded="true"] svg { transform: rotate(180deg); }

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq__answer p {
  padding-bottom: 20px;
  color: var(--color-text-dim);
  line-height: 1.7;
}

/* ===== FINAL CTA ===== */
.cta-banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.08) 0%, rgba(69, 123, 157, 0.06) 100%);
}

.cta-banner__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner__inner { position: relative; z-index: 1; }

.cta-banner__icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  margin: 0 auto var(--spacing-lg);
}

.cta-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
}

.cta-banner p {
  color: var(--color-text-dim);
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xl);
}

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

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  padding-bottom: 48px;
}

.footer__brand { display: flex; flex-direction: column; gap: var(--spacing-sm); }

.footer__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.footer__name {
  font-weight: 700;
  font-size: 1.125rem;
}

.footer__tagline {
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

.footer__col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
  margin-bottom: var(--spacing-md);
}

.footer__col li { margin-bottom: var(--spacing-sm); }

.footer__col a {
  font-size: 0.9375rem;
  color: var(--color-text-dim);
  transition: color 0.2s;
}

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

.footer__bottom {
  border-top: 1px solid var(--glass-border);
  padding: var(--spacing-lg) 0;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-dim);
}

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

/* <= 1024px */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__text { max-width: 100%; margin: 0 auto; }
  .hero__wordmark { margin: 0 auto var(--spacing-lg); }
  .hero__ctas { justify-content: center; }
  .hero__stores { justify-content: center; }

  .hero__devices {
    min-height: 400px;
    margin-top: 32px;
  }

  .device--hero-phone { width: 220px; transform: rotateY(0) rotateX(0); }
  .device--hero-tablet {
    width: 340px;
    right: -20px;
    transform: translateY(-50%) rotateY(0) rotateX(0);
  }

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

/* <= 768px */
@media (max-width: 768px) {
  .nav__hamburger { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(26, 26, 29, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--spacing-lg);
    gap: 0;
    border-top: 1px solid var(--glass-border);
  }

  .nav__links.is-open { display: flex; }

  .nav__links li { width: 100%; }

  .nav__links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1rem;
  }

  .nav__cta {
    display: inline-block;
    text-align: center;
    margin-top: 8px;
    border-bottom: none !important;
  }

  .hero__title { font-size: 2.25rem; }
  .hero__desc { font-size: 1.0625rem; }
  .hero__wordmark { max-width: 260px; }

  .hero__devices { min-height: 350px; }
  .device--hero-phone { width: 190px; }
  .device--hero-tablet { width: 300px; right: -10px; }

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

  .subscribe__card { padding: 32px var(--spacing-lg); }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer__brand { grid-column: 1 / -1; }

  .section-title { font-size: 1.75rem; }
  .cta-banner h2 { font-size: 1.75rem; }

  .steps__item { flex-direction: column; align-items: center; text-align: center; }
  .steps__connector { display: none; }
  .steps__card { width: 100%; }
}

/* <= 480px */
@media (max-width: 480px) {
  .container { padding: 0 var(--spacing-md); }
  .hero__title { font-size: 1.875rem; }
  .hero { padding: 100px 0 60px; }
  .btn { padding: 12px 24px; font-size: 0.9375rem; }
  .btn--lg { padding: 14px 28px; font-size: 1rem; }

  .hero__devices { min-height: 300px; }
  .device--hero-phone { width: 160px; }
  .device--hero-tablet { width: 240px; right: -5px; }

  .features__grid--3 { grid-template-columns: 1fr; }

  .feature-card__screenshot { aspect-ratio: 9 / 14; }
}
