.portrait-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  align-items: start;
}
.portrait-item .section-subtitle { margin-top: 0; }
.portrait-item .section-subtitle + .compare { margin-top: 12px; }
:root {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel-2: #0d0d0d;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --brand: #000000;
  --brand-2: #1f1f1f;
  --accent: #f59e0b;
  --card: #0d0d0d;
  --border: #262626;
  --success: #34d399;
  --error: #f87171;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: radial-gradient(1200px 600px at 10% -10%, rgba(255,255,255,0.06), transparent),
              radial-gradient(900px 500px at 100% 10%, rgba(255,255,255,0.04), transparent),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(11,18,32,0.8), rgba(11,18,32,0.3));
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.logo img { height: 200px; display: block; }
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-menu {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav-menu a:hover { color: #fff; }
.nav-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 5px 16px rgba(0,0,0,0.35);
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid var(--border);
}

.btn-large { height: 56px; padding: 0 22px; font-size: 18px; }
.btn .apple-icon { font-size: 22px; line-height: 1; }

/* Store badge */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 56px; width: auto; display: block; border: 1px solid #ffffff; border-radius: 12px; }

.section {
  padding: 72px 0;
}
.hero { padding-top: 48px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #e5e5e5;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.05;
}
.lead {
  color: var(--muted);
  font-size: 18px;
}
.cta-group { display: flex; gap: 12px; margin: 18px 0 10px; flex-wrap: wrap; }
.social-proof { color: var(--muted); font-size: 14px; }
.stars { color: #fbbf24; font-size: 16px; letter-spacing: 2px; }

.hero-visual { position: relative; }

/* Hero fader replacing phone mock and slider */
.image-fader {
  width: min(360px, 90%);
  aspect-ratio: 9/19.5;
  background: #000;
  border-radius: 36px;
  margin: 0 0 0 auto;
  border: 10px solid #0c0c10;
  box-shadow: inset 0 0 0 2px #1f2937, 0 20px 80px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.fade-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; }
.fade-img.img-1 { background-image: radial-gradient(600px 300px at 30% 20%, rgba(255,255,255,0.08), transparent), url('jumping.jpg'); animation: crossfadeA 8s linear infinite; }
.fade-img.img-2 { background-image: radial-gradient(600px 300px at 70% 20%, rgba(255,255,255,0.08), transparent), url('jumping2.png'); animation: crossfadeB 8s linear infinite; }

@keyframes crossfadeA {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes crossfadeB {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.floating-card {
  position: absolute;
  right: 10%;
  bottom: -12px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--muted);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.floating-card .chip {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #e5e5e5;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.card-2 { right: auto; left: -6%; bottom: 18%; }

.section-title { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 6px; }
.section-subtitle { margin: 0 0 18px; color: var(--muted); }
/* Center titles/subtitles inside features section */
.features .section-title,
.features .section-subtitle { text-align: center; }
/* Extra spacing for feature subtitles and sliders */
.features h3.section-subtitle { margin-top: 28px; }
.features .section-subtitle + .compare { margin-top: 18px; }
/* More space before a subtitle that follows a slider */
.features .compare + .section-subtitle { margin-top: 40px; }
/* More space between the first (wide) slider and the portrait grid */
.features .compare + .portrait-grid { margin-top: 48px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.feature .icon { font-size: 24px; }
.feature h3 { margin: 10px 0 6px; }
.feature p { color: var(--muted); }

/* Comparison slider section */
.compare { margin-top: 12px; }
.before-after { position: relative; width: 100%; height: 100%; }
.before-after .ba-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.before-after .ba-after { clip-path: inset(0 50% 0 0); }
.before-after.wide { position: relative; width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.before-after.wide .ba-img { background-size: cover; background-position: center; pointer-events: none; }
.before-after.wide .ba-after { clip-path: inset(0 50% 0 0); }
.before-after.wide .ba-slider { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-appearance: none; appearance: none; background: transparent; cursor: col-resize; }
.before-after.wide .ba-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 3px; height: 100%; background: #ffffff; border-radius: 2px; box-shadow: 0 0 0 6px rgba(255,255,255,0.15); cursor: col-resize; }
.before-after.wide .ba-slider::-webkit-slider-runnable-track { background: transparent; height: 100%; }
.before-after.wide .ba-slider::-moz-range-thumb { width: 3px; height: 100%; background: #ffffff; border: none; border-radius: 2px; box-shadow: 0 0 0 6px rgba(255,255,255,0.15); cursor: col-resize; }
.before-after.wide .ba-slider::-moz-range-track { background: transparent; height: 100%; }

/* Portrait/vertical variant */
.before-after.tall { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.before-after.tall .ba-img { background-size: cover; background-position: center; pointer-events: none; }
.before-after.tall .ba-after { clip-path: inset(0 50% 0 0); }
.before-after.tall .ba-slider { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-appearance: none; appearance: none; background: transparent; cursor: col-resize; }
.before-after.tall .ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: rgba(0,0,0,0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.before-after.tall .ba-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 3px; height: 100%; background: #ffffff; border-radius: 2px; box-shadow: 0 0 0 6px rgba(255,255,255,0.15); cursor: col-resize; }
.before-after.tall .ba-slider::-webkit-slider-runnable-track { background: transparent; height: 100%; }
.before-after.tall .ba-slider::-moz-range-thumb { width: 3px; height: 100%; background: #ffffff; border: none; border-radius: 2px; box-shadow: 0 0 0 6px rgba(255,255,255,0.15); cursor: col-resize; }
.before-after.tall .ba-slider::-moz-range-track { background: transparent; height: 100%; }

/* Overlay handle with arrows */
.before-after.wide .ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: rgba(0,0,0,0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Carousel */
.carousel { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.carousel-track { position: relative; overflow: hidden; }
.carousel-track::before, .carousel-track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 20px; z-index: 2; pointer-events: none; }
.carousel-slide { width: 100%; inset: 0; opacity: 0; transform: translateX(20px); transition: opacity 300ms ease, transform 300ms ease; position: absolute; pointer-events: none; z-index: 0; }
.carousel-slide.is-active { opacity: 1; transform: translateX(0); position: relative; pointer-events: auto; z-index: 1; }
.carousel-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: #fff; cursor: pointer; }
.carousel-btn:hover { background: rgba(255,255,255,0.08); }
.carousel-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; grid-column: 1 / -1; }
.carousel-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.3); border: 1px solid var(--border); cursor: pointer; }
.carousel-dot[aria-selected="true"] { background: #fff; }
.before-after.wide .ba-handle::before,
.before-after.wide .ba-handle::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}
.before-after.wide .ba-handle::before { transform: rotate(225deg); }
.before-after.wide .ba-handle::after { transform: rotate(45deg); }

/* Arrows for tall variant */
.before-after.tall .ba-handle::before,
.before-after.tall .ba-handle::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}
.before-after.tall .ba-handle::before { transform: rotate(225deg); }
.before-after.tall .ba-handle::after { transform: rotate(45deg); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.how-step {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
}
.step-num {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #e5e5e5; font-weight: 800; margin-bottom: 10px;
}

.testimonials { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.testimonial {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--card);
}
.testimonial blockquote { margin: 0 0 8px; font-size: 16px; }
.testimonial figcaption { color: var(--muted); font-size: 14px; }

.faq .faq-list { display: grid; gap: 10px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: #fff;
}
.faq p { color: var(--muted); margin: 8px 0 0; }

.download { text-align: center; }
.download-inner { display: grid; gap: 10px; justify-items: center; }
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: #fff; text-decoration: none;
}
.store-btn .store-logo { font-size: 18px; line-height: 1; }
.store-btn.ios { box-shadow: 0 8px 26px rgba(255,255,255,0.05); }
.store-btn.android { box-shadow: 0 8px 26px rgba(34,197,94,0.15); }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.fine-print { color: var(--muted); font-size: 12px; }

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .phone-frame { margin: 10px auto 0; }
  .card-2 { left: 6%; bottom: 6%; }
  .nav-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); }
  .nav-toggle .bar { width: 18px; height: 2px; background: #fff; display: block; margin: 2px 0; }
  .nav-menu { position: absolute; top: 64px; right: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: none; flex-direction: column; min-width: 180px; max-height: calc(100vh - 80px); overflow: auto; }
  .nav-menu.open { display: flex; }
}

@media (max-width: 780px) {
  .features-grid, .how-grid, .testimonials-grid { grid-template-columns: 1fr; }
}

/* iPhone / small phone optimizations */
@media (max-width: 480px) {
  .header-inner { height: 64px; }
  .logo img { height: 28px; width: auto; max-width: 70vw; }
  .store-badge img { height: 48px; }
  .lead { font-size: 16px; }
  .image-fader { width: min(320px, 92%); border-width: 8px; border-radius: 30px; }
  .floating-card { font-size: 12px; padding: 10px 12px; right: 6%; }
  .card-2 { left: -2%; bottom: 20%; }
  .section { padding: 56px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  /* Bigger carousel & compare on phones */
  .before-after.wide { max-width: 100%; aspect-ratio: 4/5; }
  .before-after.tall { max-width: 100%; aspect-ratio: 9/16; }
  .before-after.wide .ba-handle { width: 48px; height: 48px; }
  .before-after.wide .ba-slider::-webkit-slider-thumb { width: 4px; box-shadow: 0 0 0 8px rgba(255,255,255,0.15); }
  .before-after.wide .ba-slider::-moz-range-thumb { width: 4px; box-shadow: 0 0 0 8px rgba(255,255,255,0.15); }
  .carousel-btn { width: 48px; height: 48px; }
  .carousel-track::before, .carousel-track::after { width: 28px; }
  /* Larger gap before second subtitle on phones */
  .features .compare + .section-subtitle { margin-top: 40px; }
  /* Larger gap between the wide slider and portrait grid on phones */
  .features .compare + .portrait-grid { margin-top: 56px; }
  .portrait-grid { grid-template-columns: 1fr; gap: 28px; }
  /* Align mobile dropdown with default header height */
  .nav-menu { top: 64px; }
}

/* Respect iOS safe areas */
@supports (padding: max(0px)) {
  body { padding-left: max(env(safe-area-inset-left), 0px); padding-right: max(env(safe-area-inset-right), 0px); }
  .site-header { padding-top: max(env(safe-area-inset-top), 0px); }
  .site-footer { padding-bottom: calc(24px + max(env(safe-area-inset-bottom), 0px)); }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --panel: #ffffffcc;
    --panel-2: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --card: #ffffff;
    --border: #e5e7eb;
  }
  body { background: radial-gradient(1200px 600px at 10% -10%, rgba(0,0,0,0.04), transparent), radial-gradient(900px 500px at 100% 10%, rgba(0,0,0,0.03), transparent), var(--bg); }
}


