@import url('variables.css');

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-lg) 0;
}

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

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto var(--space-md);
}

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

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.site-logo:hover {
  color: var(--text);
}

.site-logo svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: none;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  display: none;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: var(--space-md);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: var(--space-sm) 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-nav .btn {
  margin-top: var(--space-md);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--bg-alt);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--border);
  color: var(--text);
}

.btn--outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn--dark {
  background: var(--text);
  color: #fff;
}

.btn--dark:hover {
  background: #000;
  color: #fff;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* ========== HERO ========== */
.hero {
  padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-lg);
  text-align: center;
  overflow: hidden;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.375rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  animation: fadeInDown 0.6s ease;
}

.hero__badge svg {
  width: 16px;
  height: 16px;
}

.hero__title {
  max-width: 800px;
  margin: 0 auto var(--space-sm);
  animation: fadeInUp 0.6s ease;
}

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

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-md);
  line-height: 1.6;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero__cameras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-light);
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero__cameras span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  font-weight: 500;
}

/* ========== HERO VISUAL ========== */
.hero__visual {
  max-width: 900px;
  margin: var(--space-lg) auto 0;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero__mockup {
  position: relative;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero__mockup::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__mockup-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.hero__mockup-video {
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero__mockup-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}

.hero__play-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero__play-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
  margin-left: 3px;
}

.hero__mockup-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero__track {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
}

.hero__track-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-light);
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}

.hero__track-bar {
  flex: 1;
  height: 100%;
  background: var(--bg);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.hero__track-bar::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 4px;
}

.hero__track--photos .hero__track-bar::before {
  left: 15%;
  width: 12%;
  background: var(--primary);
  box-shadow: 50px 0 0 0 var(--primary), 110px 0 0 0 var(--primary);
}

.hero__track--titles .hero__track-bar::before {
  left: 10%;
  width: 20%;
  background: var(--secondary);
  box-shadow: 80px 0 0 30px transparent, 120px 0 0 0 var(--secondary);
}

.hero__track--voice .hero__track-bar::before {
  left: 5%;
  width: 70%;
  background: var(--success);
  opacity: 0.7;
}

.hero__track--effects .hero__track-bar::before {
  left: 14%;
  width: 8%;
  background: #AF52DE;
  box-shadow: 60px 0 0 0 #AF52DE, 130px 0 0 0 #AF52DE;
}

.hero__playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 35%;
  width: 2px;
  background: #FF3B30;
  z-index: 2;
}

.hero__playhead::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  background: #FF3B30;
  border-radius: 50%;
}

/* ========== HOW IT WORKS STEPS ========== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: var(--space-md);
}

.step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step-card__title {
  margin-bottom: var(--space-xs);
}

.step-card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

.step-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card__icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

/* Step connector arrows */
.steps-connector {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--border);
}

.steps-connector svg {
  width: 24px;
  height: 24px;
}

/* ========== FEATURES GRID ========== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.feature-card {
  padding: var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
}

.feature-card__title {
  margin-bottom: var(--space-xs);
}

.feature-card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ========== HOW IT WORKS ========== */
.how-it-works__diagram {
  max-width: 900px;
  margin: 0 auto;
}

/* ========== STATS / SOCIAL PROOF ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

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

.stat-item__number {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-item__label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========== CAMERA SHOWCASE ========== */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

.camera-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.camera-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.camera-card__icon {
  width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.camera-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.camera-card__name {
  font-weight: 600;
  font-size: 0.875rem;
}

.camera-card__desc {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========== PRICING ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.pricing-card--featured {
  border-color: var(--primary);
  position: relative;
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pricing-card__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.pricing-card__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-card__note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
}

.pricing-card__features {
  margin-bottom: var(--space-md);
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.pricing-card__features li::before {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--success);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  margin-top: 2px;
}

.pricing-card__features li.disabled::before {
  background: var(--border);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pricing-card__features li.disabled {
  color: var(--text-light);
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.pricing-toggle__label {
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.pricing-toggle__label.active {
  color: var(--text);
}

.pricing-toggle__switch {
  position: relative;
  width: 48px;
  height: 28px;
  background: var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.pricing-toggle__switch.active {
  background: var(--primary);
}

.pricing-toggle__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.pricing-toggle__switch.active::after {
  transform: translateX(20px);
}

.pricing-save {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--success);
}

/* ========== CTA ========== */
.cta-section {
  text-align: center;
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.cta-section p {
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto var(--space-md);
  font-size: 1.125rem;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.footer-brand p {
  color: var(--text-light);
  font-size: 0.9375rem;
  margin-top: var(--space-xs);
  max-width: 300px;
}

.footer-col h4 {
  color: var(--text-on-dark);
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  padding: 0.25rem 0;
  color: var(--text-light);
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.footer-bottom a {
  color: var(--text-light);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ========== FAQ / ACCORDION ========== */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-sm) 0;
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.faq-item.is-open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-answer__inner {
  padding: 0 0 var(--space-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

/* ========== SCROLL ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ========== UTILITIES ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .mobile-menu-btn {
    display: none;
  }

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

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

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  .steps-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .steps-connector {
    display: flex;
    padding-top: var(--space-lg);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
  }

  .hero__mockup-inner {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
  }

  .camera-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 800px;
  }
}

/* ========== EMAIL SIGNUP FORMS ========== */

/* -- Shared form wrapper -- */
.signup-form-wrap {
  position: relative;
}

.signup-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition-fast);
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.signup-form input[type="email"]::placeholder {
  color: var(--text-light);
}

.signup-form .btn {
  flex-shrink: 0;
}

/* States */
.signup-form-wrap .signup-message {
  display: none;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.signup-form-wrap .signup-success {
  color: var(--success);
}

.signup-form-wrap .signup-error {
  color: #FF3B30;
}

.signup-form-wrap.is-success .signup-success { display: flex; align-items: center; gap: 0.375rem; }
.signup-form-wrap.is-error .signup-error { display: block; }
.signup-form-wrap.is-success .signup-form { display: none; }

/* Loading spinner on button */
.signup-form-wrap.is-loading .btn {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.signup-form-wrap.is-loading .btn::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: signupSpin 0.6s linear infinite;
}

@keyframes signupSpin {
  to { transform: rotate(360deg); }
}

/* Error state on input */
.signup-form-wrap.is-error input[type="email"] {
  border-color: #FF3B30;
}

/* -- Hero signup -- */
.hero-signup {
  margin-top: var(--space-md);
  animation: fadeInUp 0.6s ease 0.25s both;
}

.hero-signup .signup-form {
  margin: 0 auto;
}

.hero-signup__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* -- Footer signup -- */
.footer-signup {
  margin-top: var(--space-sm);
}

.footer-signup .signup-form {
  max-width: 360px;
}

.footer-signup .signup-form input[type="email"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-on-dark);
}

.footer-signup .signup-form input[type="email"]::placeholder {
  color: var(--text-light);
}

.footer-signup .signup-form input[type="email"]:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.15);
}

.footer-signup .signup-success {
  color: var(--primary-light);
}

.footer-signup .signup-error {
  color: #FF6B6B;
}

.footer-signup__label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* -- Exit-intent popup -- */
.exit-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}

.exit-popup.is-visible {
  display: flex;
}

.exit-popup__card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeInUp 0.3s ease;
}

.exit-popup__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.exit-popup__close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.exit-popup__close svg {
  width: 20px;
  height: 20px;
}

.exit-popup__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.exit-popup__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.exit-popup .signup-form {
  margin: 0 auto;
}

/* Mobile: bottom banner style */
@media (pointer: coarse) {
  .exit-popup {
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.4);
  }

  .exit-popup__card {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    padding: var(--space-md);
    animation: slideUp 0.3s ease;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -- Blog hero image (the OG SVG injected into each post header) --
   The OG cards are 1200×630 — designed for social previews, not article
   heroes. Cap the rendered height so they don't dominate the page, while
   keeping their aspect ratio. !important overrides the legacy inline
   width:100%; height:auto on the <img> tags in older blog posts. */
.blog-hero-img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 280px;
  display: block;
  margin: var(--space-md) auto;
  border-radius: 12px;
  object-fit: contain;
}

/* -- Blog inline CTA -- */
.blog-cta {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  margin: var(--space-md) 0;
}

.blog-cta__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.blog-cta__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.blog-cta .signup-form {
  margin: 0 auto;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ========== PHONE-FRAMED SCREENSHOTS ========== */
.device-frame {
  display: block;
  margin: 0 auto;
  max-width: 280px;
  width: 100%;
  border: 10px solid #1c1c1e;
  border-radius: 38px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  background: #1c1c1e;
}
.device-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
}

/* Hero screenshot tweak — a touch larger, subtle float */
.hero__shot {
  margin-top: var(--space-lg);
}

/* ========== VISUAL WALKTHROUGH ========== */
.walkthrough {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}
.walkthrough__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
}
.walkthrough__copy { max-width: 460px; }
.walkthrough__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}
.walkthrough__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
}
.walkthrough__desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .walkthrough__row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  .walkthrough__row:nth-child(even) .walkthrough__shot { order: 2; }
  .walkthrough__row:nth-child(even) .walkthrough__copy { order: 1; }
  .walkthrough__copy { justify-self: center; }
}

/* ========== BETA BANNER ========== */
.beta-banner {
  background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #007AFF 100%);
  color: #fff;
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9375rem;
  font-weight: 500;
}
.beta-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
}

/* ========== BETA JOIN STEPS ========== */
.beta-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .beta-steps { grid-template-columns: repeat(3, 1fr); }
}
.beta-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
}
.beta-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}
.beta-step__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.beta-step__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}
