/* ========================================================================
   Suby Marketing Site
   Single shared stylesheet — design tokens, base, components
   ======================================================================== */

/* ---------- Fonts (Outfit variable, served from one woff2) ---------- */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/outfit/Outfit-Variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/outfit/Outfit-Variable-LatinExt.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --ink: var(--suby-primary);
  --bg: var(--suby-bg);
  --surface: var(--suby-surface);
  --border: var(--suby-divider);
  --muted: var(--suby-secondary-text);
  --on-ink: var(--suby-bg);

  --container-width: var(--suby-container-width);
  --gutter: var(--suby-gutter);
  --section-y: var(--suby-section-gap-y);
  --radius: var(--suby-radius-base);
  --radius-lg: var(--suby-radius-lg);

  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --transition: var(--suby-duration-base) var(--suby-ease-standard);
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* scroll-behavior: smooth removed — it fights with browser scroll
     restoration on refresh, causing progressive scroll-down bug.
     Anchor navigation still works (instant jump). */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.7; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; }

strong { font-weight: 600; }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--surface {
  background: var(--surface);
}

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

.header__inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}

/* Brand: icon + wordmark */
.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.header__brand:hover { opacity: 1; }

.header__brand img,
.header__brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Mask-based logo follows the active theme via background-color. */
.header__brand-icon {
  background-color: var(--ink);
  -webkit-mask: url("/assets/img/logo-mono.svg") no-repeat center / contain;
          mask: url("/assets/img/logo-mono.svg") no-repeat center / contain;
  transition: background-color var(--transition);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: background var(--transition), border-color var(--transition), transform 200ms cubic-bezier(0.2, 0, 0, 1);
}
.theme-toggle:hover {
  background: var(--surface);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}
.theme-toggle [data-icon] { display: none; }
:root[data-theme="light"] .theme-toggle [data-icon="sun"] { display: block; }
:root[data-theme="dark"]  .theme-toggle [data-icon="moon"] { display: block; }
:root:not([data-theme]) .theme-toggle [data-icon="auto"] { display: block; }

.header__wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* Nav: centered links with animated underline */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1);
}

.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }

/* CTA button in header */
.header__cta {
  flex-shrink: 0;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 999px;
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), background 200ms ease;
  white-space: nowrap;
}

.header__cta:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--ink) 85%, transparent);
}

.header__cta:active {
  transform: scale(0.97);
}

/* Responsive header */
@media (max-width: 768px) {
  .header__inner { gap: 16px; }
  .nav { gap: 16px; font-size: 13px; }
  .header__cta { display: none; }
  .header__wordmark { font-size: 18px; }
}

@media (max-width: 480px) {
  .nav a:nth-child(n+3) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { opacity: 1; transform: translateY(-1px); }

.btn--primary {
  background: var(--ink);
  color: var(--on-ink);
}
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 85%, transparent); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--disabled {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--border);
  cursor: not-allowed;
}
.btn--disabled:hover { transform: none; }

/* Ghost button for use on the dark CTA strip (border + text use on-ink) */
.cta-strip .btn--cta-ghost {
  background: transparent;
  color: var(--on-ink);
  border-color: color-mix(in srgb, var(--on-ink) 45%, transparent);
}
.cta-strip .btn--cta-ghost:hover {
  background: color-mix(in srgb, var(--on-ink) 12%, transparent);
  border-color: var(--on-ink);
}

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.store-badges--centered {
  justify-content: center;
}

/* Both badges match HEIGHT (industry standard from Apple/Google brand
   guidelines). Widths differ naturally based on each badge's design. */
.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 10px;
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1);
}

.store-badge img {
  display: block;
  height: 52px;
  width: auto;
}

/* Google badge PNG has been trimmed of internal padding.
   No special sizing needed — both badges at height: 52px. */

.store-badge:hover {
  transform: translateY(-2px) scale(1.02);
  opacity: 1;
}

.store-badge--soon {
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}

.store-badge--soon img {
  filter: grayscale(0.4);
  opacity: 0.55;
}

.store-badge__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 10px;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .store-badge--soon img {
    opacity: 0.45;
  }
}

/* In the dark CTA strip, give the overlay a brighter scrim for contrast */
.cta-strip .store-badge__overlay {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1100px 520px at 26% -120px, var(--surface), transparent 62%);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  margin-bottom: 24px;
}

.hero p.lead {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__phone {
  position: relative;
  max-width: 360px;
  margin-inline: auto;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.22);
}

@media (max-width: 768px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__phone { max-width: 280px; }
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  display: block;
  color: inherit;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  opacity: 1;
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.22);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.feature-card__icon svg {
  width: 20px;
  height: 20px;
}

.feature-card:hover .feature-card__icon {
  border-color: var(--ink);
  background: var(--surface);
  transform: translateY(-1px);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 16px;
}

.feature-card__link,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
}

.feature-card__link-icon,
.inline-link__icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.feature-card:hover .feature-card__link-icon,
.inline-link:hover .inline-link__icon {
  transform: translateX(2px);
}

.feature-card__link-icon svg,
.inline-link__icon svg,
.hero__launch-pill-arrow svg {
  width: 100%;
  height: 100%;
}

.eyebrow {
  text-align: center;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section h2 {
  font-size: clamp(32px, 5vw, 56px);
  text-align: center;
  margin-bottom: 64px;
}

/* ---------- Screenshots gallery ----------
   Six App Store template slides shown side-by-side so the multi-phone
   continuous design (slides 1-3) flows visually. Tight gap on desktop
   to preserve the connection; horizontal scroll on mobile.
*/
.screenshots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.screenshots img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  height: auto;
}

@media (max-width: 1024px) {
  .screenshots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 24px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .screenshots img {
    flex: 0 0 60%;
    scroll-snap-align: center;
  }
}

@media (max-width: 600px) {
  .screenshots img {
    flex: 0 0 78%;
  }
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin-inline: auto;
}

.pricing-card {
  padding: 40px 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pricing-card--featured {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }

.pricing-card .price {
  font-size: 48px;
  font-weight: 700;
  margin-block: 16px 24px;
  letter-spacing: -0.03em;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pricing-card li::before {
  content: "✓";
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 800px;
  margin-inline: auto;
}

.faq details {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.faq summary {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-size: 28px;
  font-weight: 400;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details > *:not(summary) {
  margin-top: 16px;
  color: var(--muted);
}

.faq__more {
  text-align: center;
  margin-top: 40px;
}

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--on-ink);
  text-align: center;
  padding-block: clamp(64px, 8vw, 96px);
}

.cta-strip .eyebrow {
  color: color-mix(in srgb, var(--on-ink) 60%, transparent);
}

.cta-strip h2 {
  color: var(--on-ink);
  margin-bottom: 32px;
}

.cta-strip .btn--primary {
  background: var(--on-ink);
  color: var(--ink);
}

.cta-strip__buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer__inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}

.footer__col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer__col a:hover { color: var(--ink); opacity: 1; }

.footer__credit {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Feature pages ---------- */
.feature-index-hero,
.feature-detail-hero {
  padding-top: clamp(72px, 10vw, 132px);
}

.feature-index-copy,
.feature-detail-copy {
  max-width: 760px;
}

.feature-index-copy {
  margin-inline: auto;
  text-align: center;
}

.feature-index-copy h1,
.feature-detail-copy h1 {
  font-size: clamp(42px, 7vw, 78px);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.feature-index-copy .lead,
.feature-detail-copy .lead {
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
}

.feature-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-index-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feature-index-card:hover {
  opacity: 1;
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.22);
}

.feature-index-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.feature-index-card p {
  flex: 1;
  color: var(--muted);
  font-size: 16px;
}

.feature-detail-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.feature-detail-copy .eyebrow {
  text-align: left;
}

.feature-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.feature-detail-shot {
  width: min(100%, 360px);
  margin-inline: auto;
  border-radius: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.22);
}

.feature-detail-body {
  max-width: 900px;
}

.feature-detail-body h2 {
  text-align: left;
  margin-bottom: 32px;
}

.feature-bullets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-left: 0;
  list-style: none;
}

.feature-bullets li {
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

@media (max-width: 860px) {
  .feature-detail-hero__inner {
    grid-template-columns: 1fr;
  }

  .feature-detail-copy,
  .feature-detail-copy .eyebrow {
    text-align: center;
  }

  .feature-detail-actions {
    justify-content: center;
  }

  .feature-detail-shot {
    width: min(100%, 280px);
  }

  .feature-bullets {
    grid-template-columns: 1fr;
  }
}

/* ---------- Legal pages (Privacy, Terms) ---------- */
.legal {
  max-width: 760px;
  margin-inline: auto;
}

.legal h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin-bottom: 16px;
}

.legal .updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 48px;
}

.legal h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal h3 {
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 8px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 24px;
  font-size: 14px;
}

.legal th, .legal td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal th { font-weight: 600; }

.legal a { text-decoration: underline; }

.legal__toc {
  background: var(--surface);
  padding: 24px 32px;
  border-radius: var(--radius);
  margin-bottom: 48px;
}

.legal__toc h2 {
  margin-top: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal__toc ol {
  margin: 0;
  padding-left: 20px;
}

.legal__toc li {
  margin-bottom: 6px;
  font-size: 15px;
}

/* ---------- Support page ---------- */
.support-hero {
  text-align: center;
  padding-block: clamp(64px, 8vw, 96px);
}

.support-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.support-email-card {
  max-width: 560px;
  margin: 48px auto 0;
  padding: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  text-align: center;
}

.support-email-card a {
  font-size: 24px;
  font-weight: 600;
  text-decoration: underline;
}

.support-tip {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 24px 32px;
  background: var(--surface);
  border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Press kit ---------- */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-block: 40px;
}

.press-asset {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.press-asset h4 { font-size: 16px; margin: 0; }

.press-asset .meta {
  font-size: 13px;
  color: var(--muted);
}

.press-asset a {
  margin-top: auto;
  font-weight: 600;
  text-decoration: underline;
}

.press-bio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  margin-top: 48px;
}

/* ---------- 404 ---------- */
.not-found {
  text-align: center;
  padding-block: clamp(96px, 16vw, 200px);
}

.not-found h1 {
  font-size: clamp(80px, 16vw, 200px);
  margin: 0;
  letter-spacing: -0.04em;
}

.not-found p {
  font-size: 24px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.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;
}

/* ========================================================================
   Animations & Transitions (subtle, respect reduced-motion)
   ======================================================================== */

/* Allow smooth height interpolation on <details> open/close */
:root { interpolate-size: allow-keywords; }

/* Smoother default for interactive elements */
.btn,
.feature-card,
.pricing-card,
.press-asset,
.screenshots img,
.faq summary {
  transition:
    transform 240ms cubic-bezier(0.2, 0, 0, 1),
    background 240ms cubic-bezier(0.2, 0, 0, 1),
    color 240ms cubic-bezier(0.2, 0, 0, 1),
    border-color 240ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 240ms cubic-bezier(0.2, 0, 0, 1),
    opacity 240ms cubic-bezier(0.2, 0, 0, 1);
}

/* FAQ marker rotates smoothly instead of swapping characters */
.faq summary::after {
  content: "+";
  display: inline-block;
  transform-origin: center;
  transition: transform 320ms cubic-bezier(0.2, 0, 0, 1);
}
.faq details[open] summary::after {
  content: "+";
  transform: rotate(45deg);
}

/* FAQ open/close: opacity-only fade (no translateY to avoid jumps) */
.faq details > *:not(summary) {
  opacity: 0;
  transition: opacity 280ms ease-out;
}
.faq details[open] > *:not(summary) {
  opacity: 1;
}

/* Card hover: lift + soft shadow instead of just translate */
.feature-card:hover,
.press-asset:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.18);
  border-color: var(--ink);
}

/* Pricing card hover */
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.15);
}

/* Screenshot hover (desktop only) */
@media (hover: hover) and (min-width: 769px) {
  .screenshots img {
    transition: transform 320ms cubic-bezier(0.2, 0, 0, 1),
                box-shadow 320ms cubic-bezier(0.2, 0, 0, 1);
  }
  .screenshots img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.25);
  }
}

/* Button press feedback */
.btn:active:not(.btn--disabled) {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

/* ---- Entry animations ---- */
@media (prefers-reduced-motion: no-preference) {

  /* Hero fades in with stagger — no translateY to avoid shifting layout
     and fighting with browser scroll restoration on refresh */
  @keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .hero h1 {
    animation: fade-in 600ms ease-out both;
  }
  .hero p.lead {
    animation: fade-in 600ms ease-out 100ms both;
  }
  .hero__buttons, .store-badges {
    animation: fade-in 600ms ease-out 200ms both;
  }
  .hero__phone {
    animation: fade-in 800ms ease-out 250ms both;
  }

}

/* ---- Scroll-driven section reveals (Chrome/Edge/Firefox) ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes reveal-up {
      from { opacity: 0; transform: translateY(40px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .section h2,
    .feature-card,
    .pricing-card,
    .screenshots img,
    .legal h2,
    .legal__toc,
    .support-email-card,
    .support-tip,
    .press-grid,
    .press-bio,
    .cta-strip h2,
    .cta-strip__buttons {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 25%;
    }

    /* Stagger feature cards and pricing cards by index */
    .feature-grid .feature-card:nth-child(1) { animation-delay: 0ms; }
    .feature-grid .feature-card:nth-child(2) { animation-delay: 60ms; }
    .feature-grid .feature-card:nth-child(3) { animation-delay: 120ms; }
    .feature-grid .feature-card:nth-child(4) { animation-delay: 180ms; }
    .feature-grid .feature-card:nth-child(5) { animation-delay: 240ms; }
    .feature-grid .feature-card:nth-child(6) { animation-delay: 300ms; }

    .screenshots img:nth-child(1) { animation-delay: 0ms; }
    .screenshots img:nth-child(2) { animation-delay: 60ms; }
    .screenshots img:nth-child(3) { animation-delay: 120ms; }
    .screenshots img:nth-child(4) { animation-delay: 180ms; }
    .screenshots img:nth-child(5) { animation-delay: 240ms; }
    .screenshots img:nth-child(6) { animation-delay: 300ms; }
  }
}

/* ---- Header background intensifies on scroll ---- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes header-condense {
      from { box-shadow: 0 0 0 transparent; }
      to   { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.25); }
    }
    .header {
      animation: header-condense linear both;
      animation-timeline: scroll(root);
      animation-range: 0 200px;
    }
  }
}

/* ---- Platform availability pill (hero, above H1) ---- */
.hero__launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.hero__launch-pill:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: var(--bg);
}
.hero__launch-pill-glyph {
  width: 13px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.9;
}
.hero__launch-pill-arrow {
  width: 15px;
  height: 15px;
  opacity: 0.7;
  transition: transform var(--transition), opacity var(--transition);
}
.hero__launch-pill:hover .hero__launch-pill-arrow {
  transform: translateX(2px);
  opacity: 1;
}

/* ---- Store badges: hover lift + subtle scale ---- */
.store-badge {
  display: inline-block;
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1),
              filter 240ms ease;
}
@media (hover: hover) {
  .store-badge:hover {
    transform: translateY(-2px) scale(1.025);
    filter: brightness(1.04);
  }
  .store-badge:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 80ms;
  }
}

/* ---- Cursor spotlight (desktop only, monochrome, very subtle) ----
   Kotlin/JS updates --mx / --my as percentages on body.
   Pseudo-element renders a soft radial gradient that follows the cursor. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 600ms ease;
    background: radial-gradient(
      600px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--ink) 5%, transparent),
      transparent 50%
    );
  }
  body[data-cursor-active="true"]::before {
    opacity: 1;
  }
  /* Ensure layers above the spotlight stay above */
  body > * {
    position: relative;
    z-index: 1;
  }
}

/* ---- FAQ smooth open/close via grid trick ---- */
.faq details > *:not(summary) {
  /* override the simpler opacity-only fade above with a grid wrapper */
}
.faq details summary {
  list-style: none;
  cursor: pointer;
}
.faq details summary::-webkit-details-marker {
  display: none;
}

/* Modern: animate to intrinsic size when supported */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  .faq details::details-content {
    height: 0;
    overflow: hidden;
    transition: height 320ms cubic-bezier(0.2, 0, 0, 1),
                content-visibility 320ms allow-discrete;
  }
  .faq details[open]::details-content {
    height: auto;
  }
}

/* ---- Phone screenshot subtle parallax on scroll ---- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 769px) {
    @keyframes hero-phone-parallax {
      from { transform: translateY(0); }
      to   { transform: translateY(-40px); }
    }
    .hero__phone {
      animation: hero-phone-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 80vh;
    }
  }
}

/* ---- Reduced motion: kill all entry animations ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.catalog-lead {
  max-width: 720px;
}

.catalog-section {
  padding-top: 0;
}

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: var(--container-width);
  margin: 0 auto 32px;
}

.catalog-search {
  flex: 1 1 280px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-chip {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.catalog-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

.catalog-count {
  margin-bottom: 24px;
  font-size: clamp(28px, 4vw, 44px);
}

.catalog-hint {
  margin: -14px 0 28px;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

.catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 48px 0 8px;
}

.catalog-empty .btn {
  margin-top: 14px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.service-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform var(--transition), border-color var(--transition);
}

.service-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  opacity: 1;
}

.service-tile img,
.service-tile__logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.service-tile img {
  object-fit: contain;
}

.service-tile__logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.service-tile__name {
  font-weight: 600;
}

.service-tile__cat {
  color: var(--muted);
  font-size: 13px;
}

.service-detail-hero {
  padding-bottom: 48px;
}

.service-detail-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 880px;
}

.service-detail-logo {
  width: 96px;
  height: 96px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  object-fit: contain;
  padding: 14px;
}

.service-detail-logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 38px;
  font-weight: 800;
}

.service-detail-copy h1 {
  margin-bottom: 16px;
}

.service-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.service-detail-body {
  padding-top: 0;
}

.service-detail-panel {
  display: grid;
  gap: 28px;
}

.service-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-detail-meta > div {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.service-detail-meta p {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 650;
}

.service-detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-detail-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.service-detail-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-detail-topics .catalog-chip {
  cursor: default;
}

.service-detail-empty {
  max-width: 720px;
}

@media (max-width: 640px) {
  .service-detail-header {
    grid-template-columns: 1fr;
  }

  .service-detail-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
}

.blog-index-hero {
  padding-bottom: 48px;
}

.blog-index-copy,
.blog-article-header {
  max-width: 820px;
}

.blog-index-section,
.blog-article-section {
  padding-top: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform var(--transition), border-color var(--transition);
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  opacity: 1;
}

.blog-card__meta,
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card__meta span + span::before,
.blog-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--border);
}

.blog-card h2 {
  margin-top: 22px;
  font-size: clamp(24px, 3vw, 34px);
}

.blog-card p {
  color: var(--muted);
}

.blog-card__link {
  margin-top: auto;
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.blog-empty {
  max-width: 640px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.blog-article-hero {
  padding-bottom: 48px;
}

.blog-article-header h1 {
  max-width: 900px;
}

.blog-cover {
  width: 100%;
  max-height: 520px;
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.blog-article {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.prose {
  color: var(--ink);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3 {
  margin-top: 1.6em;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--ink);
  color: var(--ink);
}

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}
