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

:root {
  --blue: #007aff;
  --blue-soft: #e8f2ff;
  --grey: #f2f2f7;
  --border: #e3e7ed;
  --text: #1a1a1c;
  --muted: #636366;
  --white: #fff;
  --purple: #5856d6;
  --purple-soft: #f3f0ff;
  --pricing-gradient: linear-gradient(180deg, #f5f9ff 0%, #eef4fc 50%, #f8fbff 100%);
  --max: 1280px;
  --device-radius: 2.75rem;
  --device-hero: min(420px, 88vw);
  --device-showcase: min(340px, 78vw);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ── Nav ── */
.nav {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(calc(100% - 2rem), 860px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a:not(.btn) {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
  background: var(--grey);
}

.nav-download {
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

@media (max-width: 767px) {
  .nav {
    width: calc(100% - 1rem);
    padding: 0.45rem 0.45rem 0.45rem 0.75rem;
  }

  .nav-brand {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    gap: 0.45rem;
  }

  .nav-brand img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .nav-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.35rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
  }

  .nav-download {
    margin-left: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: var(--grey);
    outline: none;
  }

  .nav-toggle-bar {
    display: block;
    width: 1.125rem;
    height: 2px;
    border-radius: 1px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

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

  .nav-links a:not(.btn) {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border-radius: 0.65rem;
    text-align: left;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--blue);
  color: var(--white);
  transition: opacity 0.15s, transform 0.15s;
}

.btn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
}

.app-store {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.app-store:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

.app-store img {
  height: 54px;
  width: auto;
}

.hero-actions .app-store img {
  height: 54px;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 4.75rem 0 2.5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 40%, rgba(0, 122, 255, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0, 122, 255, 0.06), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.eyebrow,
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.85rem;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 6.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 12ch;
  margin-bottom: 1rem;
}

.hero-copy h1 .dot {
  color: var(--blue);
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--muted);
  max-width: 30rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.hero-visual {
  will-change: transform;
}

.hero-slider {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
}

@media (min-width: 900px) {
  .hero-slider {
    margin-inline: 0 0 0 auto;
    max-width: none;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

/* legacy device styles for legal pages if needed */
.device {
  width: var(--device-hero);
  border-radius: var(--device-radius);
  overflow: hidden;
  background: var(--white);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 40px 100px -20px rgba(0, 0, 0, 0.24),
    0 12px 32px -8px rgba(0, 122, 255, 0.18);
  animation: float 5s ease-in-out infinite;
}

@media (min-width: 1200px) {
  .device:not(.device--sm) {
    width: min(460px, 42vw);
  }
}

.device img {
  width: 100%;
  vertical-align: top;
}

.device--sm {
  width: var(--device-showcase);
  max-width: 100%;
  margin-inline: auto;
  animation: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 24px 64px -16px rgba(0, 0, 0, 0.16);
}

@media (min-width: 768px) {
  .device--sm {
    width: 100%;
    max-width: var(--device-showcase);
  }
}

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

/* ── Steps ── */
.steps {
  padding: 5rem 0 6rem;
  background: var(--white);
}

.steps-track {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .steps-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.step-card {
  position: relative;
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--grey);
  border-radius: 1.25rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.step-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.step-card:nth-child(2) {
  transition-delay: 0.1s;
}

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

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
}

.step-art {
  margin: 0 auto 1.25rem;
  max-width: 220px;
}

.step-art img {
  width: 100%;
  height: auto;
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Screens ── */
.screens {
  padding: 5rem 0 6rem;
  background: var(--grey);
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.section-sub {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

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

.screens-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.screen-shot:nth-child(3):last-child {
  grid-column: 1 / -1;
  width: calc(50% - 0.5rem);
  justify-self: center;
}

@media (min-width: 900px) {
  .screens-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 75%;
    margin-inline: auto;
  }

  .screen-shot:nth-child(3):last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}

.screen-shot {
  margin: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.screen-shot.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.screen-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Pricing ── */
.pricing {
  padding: 5rem 0 6rem;
  background: var(--pricing-gradient);
}

.pricing-board {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

.pricing-block {
  min-width: 0;
}

.pricing-group-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pricing-group-label::before,
.pricing-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #d4e3f5;
}

.pricing-cards {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .pricing-block--subs .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 900px) {
  .pricing-board {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    row-gap: 1rem;
    align-items: start;
  }

  .pricing-block--subs,
  .pricing-block--credits {
    display: contents;
  }

  .pricing-block--subs .pricing-group-label {
    grid-column: 1 / 3;
    grid-row: 1;
    margin-bottom: 0;
  }

  .pricing-block--credits .pricing-group-label {
    grid-column: 3;
    grid-row: 1;
    margin-bottom: 0;
  }

  .pricing-block--subs .pricing-cards,
  .pricing-block--credits .pricing-cards {
    display: contents;
  }

  .pricing-block--subs .plan-wrap:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .pricing-block--subs .plan-wrap:last-child {
    grid-column: 2;
    grid-row: 2;
  }

  .pricing-block--credits .plan-wrap {
    grid-column: 3;
    grid-row: 2;
  }
}

.plan-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.plan {
  background: var(--white);
  border: 1px solid #d4e3f5;
  border-radius: 1.25rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 60, 120, 0.06);
  height: 100%;
}

.plan--sub,
.plan--credits {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
}

.plan--best {
  border: 2px solid var(--blue);
  position: relative;
  padding-top: 2.5rem;
}

.plan-tag {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.plan-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.plan-price span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.plan-features-panel {
  background: var(--blue-soft);
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.plan-features {
  list-style: none;
  margin: 0;
}

.plan-features li {
  font-size: 0.9375rem;
  color: var(--text);
  padding-left: 1.35rem;
  position: relative;
  line-height: 1.65;
}

.plan-features li + li {
  margin-top: 0.35rem;
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

.plan-options {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  background: var(--purple-soft);
  border-radius: 0.875rem;
  overflow: hidden;
}

.plan-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.plan-option + .plan-option {
  border-top: 1px solid rgba(88, 86, 214, 0.12);
}

.plan-option:has(input:checked) {
  background: rgba(255, 255, 255, 0.72);
}

.plan-option input {
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border: 2px solid #c5c5cc;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan-option input:checked {
  border-color: var(--blue);
  border-width: 5px;
}

.plan-option-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  font-size: 0.9375rem;
}

.plan-option-name {
  color: var(--text);
  font-weight: 500;
}

.plan-option-price {
  color: var(--text);
  font-weight: 700;
}

.plan-cta {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s;
}

.plan-cta:hover {
  opacity: 0.92;
}

.plan-cta--primary {
  background: var(--blue);
  color: var(--white);
}

.plan-cta--purple {
  background: var(--purple);
  color: var(--white);
}

.plan-footnote {
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.pricing-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.pricing-secure svg {
  flex-shrink: 0;
  color: var(--muted);
}

/* ── CTA bar ── */
.cta-bar {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--blue-soft) 0%, #f5f9ff 100%);
}

.cta-bar-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-bar-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.cta-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.cta-copy p {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-bottom: 1.25rem;
}

.cta-art {
  margin: 0;
  max-width: 360px;
  margin-inline: auto;
}

.cta-art img {
  width: 100%;
  height: auto;
}

.cta-bar .app-store img {
  height: 54px;
}

@media (max-width: 767px) {
  .hero-actions {
    display: flex;
    justify-content: center;
  }

  .hero-actions .app-store img,
  .cta-bar .app-store img {
    height: 64px;
  }

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

  .cta-bar .app-store {
    display: inline-block;
  }
}

/* ── Footer ── */
.footer {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

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

.footer-line {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.footer-line a {
  color: var(--muted);
  transition: color 0.15s;
}

.footer-line a:hover {
  color: var(--blue);
}

.footer-sep {
  margin: 0 0.45rem;
  color: #c7c7cc;
}

/* ── Legal pages ── */
.legal-page {
  padding: 7rem 0 4rem;
}

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

.legal-notice {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.legal-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.legal-intro {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.legal-content p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.legal-content a {
  color: var(--blue);
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-back {
  margin-top: 2.5rem;
  font-size: 0.875rem;
}

.legal-back a {
  color: var(--blue);
  font-weight: 500;
}

.legal-back a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-visual,
  .step-card,
  .screen-shot {
    transform: none !important;
    opacity: 1 !important;
  }
}
