:root {
  --bg: #050505;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --lime: #c8f542;
  --lime-dim: rgba(200, 245, 66, 0.15);
  --purple-glow: rgba(139, 92, 246, 0.32);
  --max: 1120px;
  --legal-max: 760px;
  --page-pad: max(16px, env(safe-area-inset-left, 16px));
  --page-bg:
    radial-gradient(55% 55% at 12% 8%, var(--purple-glow), transparent 60%),
    radial-gradient(65% 65% at 88% 92%, rgba(200, 245, 66, 0.08), transparent 60%),
    linear-gradient(180deg, #050505 0%, #0a0a0a 50%, #0f0f0f 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  min-height: 100%;
  background-color: var(--bg);
}

/* Oversized fixed layer so gradient continues during iOS rubber-band overscroll */
html::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: 0;
  right: 0;
  top: -120vh;
  bottom: -120vh;
  background: var(--page-bg);
  pointer-events: none;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: transparent;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: var(--lime);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 5, 5, 0.88);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.site-header-inner,
.site-footer-inner,
.site-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d4ff55, var(--lime));
  color: #0a0a0a;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.site-cta--sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.site-cta:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.app-store-btn {
  min-height: 48px;
}

.app-store-icon {
  flex-shrink: 0;
}

.site-main {
  padding: 32px 0 56px;
}

.site-section {
  margin-bottom: 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 max(32px, env(safe-area-inset-bottom));
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

/* Marketing home */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 8px 0 48px;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lime-dim);
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 span {
  color: var(--lime);
}

.hero-lead {
  margin: 0 0 24px;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.08rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-phone {
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.hero-glow {
  position: absolute;
  inset: 10% -8% -8% -8%;
  background: radial-gradient(circle, rgba(200, 245, 66, 0.18), transparent 65%);
  z-index: -1;
  pointer-events: none;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--lime-dim);
  color: var(--lime);
  font-size: 1rem;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4.5vw, 1.8rem);
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 40rem;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* Horizontal scroll gallery — works well on iPhone */
.screenshots-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  padding: 4px 2px 12px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshots-scroll img {
  flex: 0 0 auto;
  width: min(72vw, 260px);
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  scroll-snap-align: start;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trust-card {
  padding: 22px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.trust-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.trust-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.cta-band {
  padding: 28px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(200, 245, 66, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-band h2 {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Legal pages */
.legal-page .site-main {
  padding-top: 24px;
}

.legal-card {
  width: min(var(--legal-max), 100%);
  margin: 0 auto;
  padding: 28px 22px 36px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.legal-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.legal-updated {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-card h2 {
  margin: 24px 0 8px;
  font-size: 1.1rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.legal-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.legal-card li + li {
  margin-top: 8px;
}

@media (min-width: 901px) {
  html::before {
    background-attachment: fixed;
  }

  .screenshots-scroll {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin: 0;
  }

  .screenshots-scroll img {
    width: 100%;
    scroll-snap-align: unset;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
    padding-bottom: 36px;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .hero-lead,
  .section-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .cta-band {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cta-band .site-cta {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .site-header-inner,
  .site-footer-inner,
  .site-main {
    width: min(var(--max), calc(100% - 24px));
  }

  .site-header-inner {
    padding: 12px 0;
  }

  .site-brand {
    font-size: 1rem;
    gap: 8px;
  }

  .site-brand img {
    width: 30px;
    height: 30px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav a:not(.site-cta) {
    font-size: 0.82rem;
  }

  .site-main {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .hero {
    padding-top: 4px;
    padding-bottom: 28px;
  }

  .hero-phone {
    width: min(68vw, 240px);
    border-radius: 22px;
  }

  .hero-actions .app-store-btn {
    width: 100%;
    font-size: 0.88rem;
    padding: 12px 16px;
  }

  .site-section {
    margin-bottom: 36px;
  }

  .feature-card,
  .trust-card {
    padding: 18px;
  }

  .legal-card {
    padding: 20px 16px 28px;
    border-radius: 16px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .site-nav a[href="/#features"] {
    display: none;
  }
}
