:root {
  --bg: #f8f9fa;
  --white: #ffffff;
  --ink: #000000;
  --muted: #6b7280;
  --blue: #0057FF;
  --blue-soft: rgba(0, 87, 255, 0.05);
  --border: rgba(0, 0, 0, 0.05);
  --border-bold: rgba(0, 0, 0, 0.1);
  --font-main: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* --- Layout Containers --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(248, 249, 250, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 900;
  font-size: 16px;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
}

/* --- Download Popup --- */
.download-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border-bold);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
  width: 200px;
  animation: popupFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header .download-popup {
  bottom: auto;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  transform: none;
  width: 320px;
}

.download-popup.active {
  display: block;
}

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

.qr-box {
  width: 100%;
  aspect-ratio: 1;
  background: #f1f5f9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
}

.qr-single span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.relative-container {
  position: relative;
  display: inline-block;
}

.popup-close-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.popup-close-overlay.active {
  display: block;
}

/* Update header-cta for relative positioning */
.header-cta-container {
  position: relative;
}

/* --- Typography --- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 24px;
  display: block;
}

h1 {
  font-size: clamp(64px, 10vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 800;
  margin-bottom: 40px;
}

h1 span {
  display: block;
  font-size: 0.5em;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: 16px;
}

.hero-text {
  max-width: 520px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: -0.01em;
  font-weight: 450;
  margin-bottom: 48px;
}

/* --- Hero Section --- */
.hero {
  padding-top: 200px;
  padding-bottom: 120px;
  text-align: left;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: end;
}

.hero-text {
  max-width: 520px;
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 48px;
}

.download-actions {
  display: flex;
  gap: 16px;
}

.store-button {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  height: 80px;
}

.store-button img {
  height: 100%;
  width: auto;
  display: block;
}

.store-button:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
}

.visual-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visual-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, var(--blue-soft) 0%, transparent 70%);
}

.visual-placeholder img {
  width: 80%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  z-index: 1;
}

/* --- Bento Grid (Icon-based) --- */
.section {
  padding: 120px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.bento-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  grid-column: span 4;
}

.bento-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 87, 255, 0.04);
}

.card-icon-box {
  width: 56px;
  height: 56px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.bento-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.bento-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.feature-list-alt {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 80px;
}

.feature-alt-item {
  border-top: 1px solid var(--border-bold);
  padding-top: 24px;
}

.feature-alt-item strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.feature-alt-item span {
  font-size: 14px;
  color: var(--muted);
}

/* --- Footer --- */
.site-footer {
  padding: 120px 0 60px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.footer-links {
  display: flex;
  gap: 48px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text {
    margin: 0 auto 48px;
  }
  .download-actions {
    justify-content: center;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card {
    grid-column: span 1;
  }
  .feature-list-alt {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 24px;
  }
  .hero {
    padding-top: 160px;
  }
  h1 {
    font-size: 48px;
  }
  .feature-list-alt {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
  }
}
