/* ==========================================================================
   Public site — light, lively, Apple-inspired
   ========================================================================== */
:root {
  --accent: #0a84ff;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ---------------------------------------------------------------- type */
.display {
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 18px;
  background: linear-gradient(100deg, var(--text) 10%, var(--accent) 55%, #ff375f 80%, #ff9f0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.title {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 700;
  margin: 0 0 12px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -.012em;
  color: var(--text-2);
  margin: 0 0 28px;
  max-width: 40em;
  text-wrap: pretty;
}
.eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent);
  margin: 0 0 14px;
}
.eyebrow.warn { color: #c93400; }

/* ---------------------------------------------------------------- nav (translucent material) */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 253, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 200ms ease;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(0, 0, 0, .04); }
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 22px;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -.01em; font-size: 1.0625rem; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: conic-gradient(from 200deg, var(--accent), #bf5af2, #ff375f, #ff9f0a, #30d158, var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--text); opacity: .8; font-size: .9375rem; padding: 7px 12px; border-radius: 999px;
  transition: background-color 160ms ease, opacity 160ms ease;
}
.nav-links a[aria-current="page"] { opacity: 1; background: rgba(0, 0, 0, .05); font-weight: 550; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px; width: 40px; height: 40px;
    border: 0; background: none; border-radius: 10px; cursor: pointer; margin-right: -8px;
  }
  .nav-toggle span { display: block; width: 18px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform 220ms var(--ease-out); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 56px;
    flex-direction: column; gap: 0; padding: 8px 14px 18px;
    background: rgba(251, 251, 253, .985);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
    max-height: calc(100vh - 56px); overflow-y: auto; overscroll-behavior: contain;
    transform-origin: top; transform: translateY(-6px); opacity: 0; visibility: hidden;
    transition: transform 220ms var(--ease-out), opacity 180ms ease, visibility 0s 220ms;
  }
  .nav.open .nav-links { transform: none; opacity: 1; visibility: visible; transition: transform 220ms var(--ease-out), opacity 180ms ease; }
  .nav-links a { font-size: 1.125rem; padding: 12px 10px; border-radius: 12px; }
}

/* ---------------------------------------------------------------- nav dropdowns */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .9375rem; color: var(--text); opacity: .8; padding: 7px 8px; border-radius: 999px;
  transition: background-color 160ms ease, opacity 160ms ease;
}
.nav-dd-title { padding: 7px 10px 7px 12px; }
.nav-dd-link + .nav-dd-btn { margin-left: -6px; padding: 7px 7px; }
.nav-dd-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.nav-dd.open > .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd.has-current > .nav-dd-title, .nav-dd.has-current > .nav-dd-link { opacity: 1; font-weight: 550; }
.nav-dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 230px; max-width: 320px;
  display: flex; flex-direction: column; padding: 6px; border-radius: 16px;
  background: rgba(255, 255, 255, .97); box-shadow: 0 14px 40px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05);
  opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.98); transform-origin: top left;
  transition: opacity 140ms ease, transform 180ms var(--ease-out), visibility 0s 180ms;
}
.nav-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* hover bridge */
.nav-links .nav-dd-panel a { display: block; opacity: 1; padding: 9px 12px; border-radius: 10px; font-size: .9375rem; line-height: 1.3; }
.nav-dd.open > .nav-dd-panel { opacity: 1; visibility: visible; transform: none; transition: opacity 140ms ease, transform 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) and (min-width: 721px) {
  .nav-dd:hover > .nav-dd-panel { opacity: 1; visibility: visible; transform: none; transition: opacity 140ms ease, transform 180ms var(--ease-out); }
  .nav-dd:hover > .nav-dd-btn svg { transform: rotate(180deg); }
  .nav-dd-btn:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
}
@media (max-width: 720px) {
  .nav-dd { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .nav-dd-title { grid-column: 1 / -1; justify-content: space-between; font-size: 1.125rem; padding: 12px 10px; border-radius: 12px; text-align: left; }
  .nav-dd-link + .nav-dd-btn { margin: 0; width: 44px; height: 44px; justify-content: center; }
  .nav-dd-btn svg { width: 14px; height: 14px; }
  .nav-dd-panel {
    grid-column: 1 / -1; position: static; min-width: 0; max-width: none; padding: 0 0 6px 12px; margin-left: 10px;
    border-left: 2px solid var(--line); border-radius: 0; background: none; box-shadow: none;
    display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav-dd.open > .nav-dd-panel { display: flex; }
  .nav-links .nav-dd-panel a { font-size: 1rem; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .nav-dd-panel, .nav-dd-btn svg { transition: none !important; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -.01em;
  border: 0; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, transparent); }
.btn-light { background: rgba(255, 255, 255, .9); color: var(--text); }
.btn-app { background: var(--app); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--app) 38%, transparent); height: 50px; padding: 0 28px; font-size: 1.0625rem; }
.btn-disabled { background: rgba(0, 0, 0, .06); color: var(--text-3); cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover, .btn-app:hover { filter: brightness(1.06); }
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 11vw, 140px) 0 clamp(48px, 7vw, 88px); }
.hero-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; }
.hero-glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.hero-glow i:nth-child(1) { width: 420px; height: 420px; background: var(--accent); left: -120px; top: -80px; opacity: .22; }
.hero-glow i:nth-child(2) { width: 380px; height: 380px; background: #ff375f; right: -100px; top: 40px; opacity: .16; }
.hero-glow i:nth-child(3) { width: 360px; height: 360px; background: #ffd60a; left: 40%; bottom: -220px; opacity: .2; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.hero-stat { color: var(--text-2); font-size: .9375rem; }
.hero-stat strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- sections */
.section { padding: 32px 22px 72px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); letter-spacing: -.024em; line-height: 1.12; margin: 0 0 6px; }
.section-head p { color: var(--text-2); margin: 0; }
.page-head { padding-top: clamp(48px, 7vw, 88px); padding-bottom: 8px; }
.empty { padding: 48px; text-align: center; color: var(--text-2); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- feature card */
.feature {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px;
  border-radius: 30px; overflow: hidden; color: #fff; padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--app) 40%, #fff) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--app) 92%, #fff), color-mix(in srgb, var(--app) 82%, #000));
  box-shadow: 0 20px 50px color-mix(in srgb, var(--app) 30%, transparent);
  transition: transform 260ms var(--ease-out);
  margin-bottom: 40px;
}
.feature:active { transform: scale(.99); }
.feature .eyebrow { color: rgba(255, 255, 255, .85); }
.feature h2 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 10px; }
.feature p { font-size: 1.1875rem; opacity: .9; margin: 0 0 24px; max-width: 28em; }
.feature-art { display: flex; justify-content: center; }
.feature-art img, .feature-art .app-initial {
  width: min(240px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: 22%;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .25);
  transform: rotate(-4deg);
}
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; text-align: left; } .feature-art { justify-content: flex-start; order: -1; } .feature-art img, .feature-art .app-initial { width: 110px; } }

/* ---------------------------------------------------------------- app cards */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--surface); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease-out), box-shadow 220ms ease;
  animation: rise 520ms var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
}
.app-card:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .app-card:hover:active { transform: scale(.98); }
}
.app-icon {
  flex: none; width: 68px; height: 68px; border-radius: 22.5%; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--app) 70%, #fff), var(--app));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08), 0 4px 12px color-mix(in srgb, var(--app) 25%, transparent);
  display: grid; place-items: center;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-initial { color: #fff; font-weight: 700; font-size: 1.875rem; letter-spacing: -.02em; display: grid; place-items: center; }
.app-initial.big {
  font-size: 5rem; width: 100%; height: 100%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--app) 65%, #fff), var(--app));
}
.app-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.app-title { font-weight: 650; letter-spacing: -.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tagline { color: var(--text-2); font-size: .9375rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-meta { display: flex; gap: 10px; color: var(--text-3); font-size: .8125rem; margin-top: 4px; align-items: center; }
.app-count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.app-get {
  flex: none; padding: 6px 18px; border-radius: 999px; font-size: .9375rem; font-weight: 650;
  color: var(--app); background: color-mix(in srgb, var(--app) 12%, #fff);
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- app page */
.app-hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 6vw, 64px); }
.app-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--app) 22%, transparent), transparent 70%),
    radial-gradient(50% 70% at 100% 20%, color-mix(in srgb, var(--app) 12%, transparent), transparent 70%);
}
.app-hero-inner { position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.app-hero-icon {
  width: clamp(120px, 18vw, 200px); aspect-ratio: 1; border-radius: 22.5%; overflow: hidden;
  box-shadow: 0 20px 50px color-mix(in srgb, var(--app) 30%, transparent), inset 0 0 0 .5px rgba(0, 0, 0, .1);
  animation: pop 600ms var(--ease-out) both;
}
.app-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-hero-text .eyebrow { color: var(--app); }
.download-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 28px; }
.counter { display: flex; flex-direction: column; line-height: 1.1; }
.counter strong { font-size: 1.625rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: inline-block; transition: transform 300ms var(--ease-out), color 300ms ease; }
.counter strong.bump { transform: translateY(-3px); color: var(--app); }
.counter span { color: var(--text-3); font-size: .8125rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 24px 0 0; margin-right: 24px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 1.0625rem; }
@media (max-width: 640px) {
  .app-hero-inner { grid-template-columns: 1fr; }
  .facts div { padding-right: 16px; margin-right: 16px; }
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(6px); } }

/* ---------------------------------------------------------------- prose (CMS content) */
.prose-wrap { padding-top: 16px; padding-bottom: 56px; }
.prose { max-width: 720px; font-size: 1.125rem; line-height: 1.65; }
.prose h1, .prose h2, .prose h3 { letter-spacing: -.022em; line-height: 1.15; margin: 1.6em 0 .5em; }
.prose h1 { font-size: 2.25rem; } .prose h2 { font-size: 1.75rem; } .prose h3 { font-size: 1.3rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin: 1.4em 0; box-shadow: var(--shadow-sm); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose code { background: rgba(0, 0, 0, .05); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: #f5f5f7; padding: 16px; border-radius: var(--radius-sm); overflow: auto; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }

/* ---------------------------------------------------------------- search */
.search {
  display: flex; align-items: center; gap: 8px; max-width: 420px; margin-top: 8px;
  height: 44px; padding: 0 14px; background: rgba(0, 0, 0, .05); border-radius: 12px; color: var(--text-3);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.search:focus-within { background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.search input { border: 0; background: none; font: inherit; flex: 1; outline: 0; color: var(--text); }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--text-3); font-size: .875rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--text-2); }
@media (hover: hover) { .footer a:hover { color: var(--text); } }

/* ---------------------------------------------------------------- accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .nav-links { background: #fbfbfd; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --text-2: #3a3a3c; --text-3: #48484a; --line: rgba(0, 0, 0, .3); }
  .app-card { box-shadow: 0 0 0 1px var(--line); }
}
