:root {
  --accent: #5D28FF;
  --accent-hover: #4A1FE0;
  --accent-soft: rgba(93, 40, 255, 0.12);
  --bg: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --text: #1C1C1E;
  --text-secondary: #636366;
  --text-tertiary: #8E8E93;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.08);
  --frame-bg: #1C1C1E;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;
    --bg-elevated: #1C1C1E;
    --text: #F5F5F7;
    --text-secondary: #AEAEB2;
    --text-tertiary: #636366;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    --frame-bg: #000000;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

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

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

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.125rem;
  background: var(--accent, #5D28FF);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.header-cta:hover {
  opacity: 0.9;
  text-decoration: none;
}

.header-cta:active {
  transform: scale(0.97);
}

.header-cta--soon {
  background: var(--accent-soft);
  color: var(--text-tertiary);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  cursor: default;
  opacity: 0.85;
}

.header-cta--soon:hover {
  opacity: 0.85;
}

/* Hero */
.hero {
  padding-block: 4rem 3rem;
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin-inline: auto;
  border-radius: 22%;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-tagline {
  margin: 0 auto;
  max-width: 32rem;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-sub {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  font-size: 1rem;
  color: var(--text-tertiary);
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* App Store badge */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem 0.625rem 0.875rem;
  background: #000;
  color: #fff;
  border-radius: 10px;
  border: none;
  cursor: not-allowed;
  opacity: 0.55;
  font-family: inherit;
  text-align: left;
  transition: opacity 0.2s;
}

.app-store-badge:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}

.app-store-badge:not(:disabled):hover {
  opacity: 0.85;
  text-decoration: none;
}

.app-store-badge svg {
  flex-shrink: 0;
}

.badge-label {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.2;
  opacity: 0.85;
}

.badge-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
}

.coming-soon-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Feature sections */
.features {
  padding-block: 2rem 4rem;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-block: 3.5rem;
}

.feature:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.feature.reverse .feature-copy {
  order: 2;
}

.feature.reverse .feature-visual {
  order: 1;
}

.feature-number {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.feature h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feature p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 28rem;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* iPhone frame */
.phone-frame {
  position: relative;
  width: min(100%, 320px);
  margin-inline: auto;
  padding: 12px;
  background: var(--frame-bg);
  border-radius: 44px;
  box-shadow: var(--shadow);
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: var(--frame-bg);
  border-radius: 20px;
  z-index: 2;
}

.phone-screen {
  border-radius: 34px;
  overflow: hidden;
  background: #E8E8ED;
  aspect-ratio: 390 / 844;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.footer-item {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-item:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-sep {
  color: var(--text-tertiary);
  user-select: none;
}

.footer-copy {
  color: var(--text-tertiary);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-social svg {
  flex-shrink: 0;
}

/* Legal pages */
.legal-page {
  padding-block: 3rem 4rem;
}

.legal-content {
  max-width: 42rem;
}

.legal-content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
}

.legal-lead {
  margin: 0 0 2.5rem;
  color: var(--text-secondary);
}

.legal-content section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.legal-content h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.legal-content p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-back {
  margin-top: 3rem !important;
}

/* Mobile sticky CTA */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  text-align: center;
}

.mobile-cta .app-store-badge {
  width: 100%;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-row {
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  .hero {
    padding-block: 3rem 2rem;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.5rem;
  }

  .feature.reverse .feature-copy,
  .feature.reverse .feature-visual {
    order: unset;
  }

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

  .feature p {
    margin-inline: auto;
  }

  .feature-list {
    display: inline-block;
    text-align: left;
  }

  .phone-frame {
    width: min(100%, 280px);
  }

  .mobile-cta {
    display: block;
  }

  .site-footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}
