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

:root {
  --bg-start: #0a0a1a;
  --bg-end: #121228;
  --accent: #ff6b35;
  --accent-hover: #ff8c5a;
  --text: #ffffff;
  --text-muted: #a0a0b8;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.09);
  --nav-height: 64px;
  --section-padding: 120px 0;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-start);
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* === Nav === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.3s, backdrop-filter 0.3s, -webkit-backdrop-filter 0.3s;
}

#nav.scrolled {
  background: rgba(10, 10, 26, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--card-border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.lang-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  max-width: 520px;
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.appstore-badge {
  display: inline-block;
  transition: transform 0.2s, opacity 0.2s;
}

.appstore-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

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

.badge-small .badge-svg {
  width: 140px;
}

.hero-image {
  flex: 1;
  max-width: 640px;
}

/* Mac window frame */
.mac-frame {
  background: #1e1e2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: heroFloat 6s ease-in-out infinite;
}

.mac-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* === Sections Common === */
.section {
  padding: var(--section-padding);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.section-inner h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* === Space Lens Section === */
.color-scale {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.scale-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.scale-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

.scale-item:nth-child(2) .scale-dot { animation-delay: 0.3s; }
.scale-item:nth-child(3) .scale-dot { animation-delay: 0.6s; }
.scale-item:nth-child(4) .scale-dot { animation-delay: 0.9s; }

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.spacelens-screenshot img,
.how-screenshot img {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  margin: 0 auto;
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: left;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

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

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === How It Works === */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
}

.step {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 36px 28px;
  flex: 1;
  max-width: 280px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  margin: 0 auto 16px;
}

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

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-arrow {
  font-size: 24px;
  color: var(--text-muted);
  margin-top: 52px;
}

.how-screenshot {
  margin-top: 20px;
}

/* === Pricing === */
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  margin: 48px auto 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.price-amount {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), #ff9a5c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.price-type {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 28px;
}

.price-list {
  list-style: none;
  margin-bottom: 28px;
  text-align: left;
  display: inline-block;
}

.price-list li {
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-muted);
}

.price-list li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.price-req {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 24px;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.8;
}

/* === Scroll Animations === */
.anim-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anim-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children in grids */
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.5s; }

.steps .step:nth-child(3) { transition-delay: 0.1s; }
.steps .step:nth-child(5) { transition-delay: 0.2s; }

/* === Responsive === */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-height) + 40px);
    gap: 32px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-image {
    max-width: 90%;
    margin: 0 auto;
  }

  .mac-frame {
    animation: none;
  }

  .spacelens-screenshot img,
  .how-screenshot img {
    max-width: 100%;
  }

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

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

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin: 0;
  }

  .step {
    max-width: 100%;
    width: 100%;
  }

  .color-scale {
    gap: 16px;
  }

  .price-card {
    padding: 36px 24px;
  }

  .nav-cta {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hero-image {
    max-width: 100%;
  }

  .mac-titlebar {
    padding: 8px 12px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .section-inner h2 {
    font-size: 28px;
  }

  .section-desc {
    font-size: 16px;
  }
}
