@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  /* novella_sepia - matches app ReadingThemePreset.novellaSepia */
  --bg: #f4efe6;
  --surface: #fbf8f2;
  --text: #332c25;
  --text-muted: #524a42;
  --border: #938e88;
  --accent: #7a3f30;
  --accent-soft: rgba(122, 63, 48, 0.14);
  --on-accent: #fbf8f2;
  --success: #8f4a38;
  --shadow: 0 18px 48px rgba(51, 44, 37, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1080px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 860px;
  --bp-xl: 900px;
  --gutter: 1.5rem;
  --touch: 44px;
  --header-pad-top: env(safe-area-inset-top, 0px);
  --header-pad-block: 0.85rem;
}

@media (max-width: 767px) {
  :root {
    --hero-pad-top: 3rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080605;
    --surface: #1e1a17;
    --text: #e8e3db;
    --text-muted: #c4bdb4;
    --border: #7a7670;
    /* Softer than #e0a797: links/taglines, not full button fills */
    --accent: #c4a396;
    --accent-soft: rgba(196, 163, 150, 0.14);
    --on-accent: #1a120e;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  }

  .btn--primary,
  .store-btn {
    background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
    color: var(--text);
    border: 2px solid color-mix(in srgb, var(--accent) 38%, var(--border));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }

  .btn--primary:hover,
  .store-btn:hover {
    background: color-mix(in srgb, var(--surface) 75%, var(--accent) 25%);
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }

  .store-btn__icon {
    color: var(--accent);
  }

  .store-btn__text small {
    color: var(--text-muted);
  }

  .store-btn--soon {
    background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  }

  .step__num {
    background: color-mix(in srgb, var(--accent) 70%, var(--surface));
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
}

body.is-nav-open {
  overflow: hidden;
}

.site-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.site-page .site-footer {
  margin-top: auto;
}

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

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* FocusOnNavigate moves focus to main; never show a focus ring on the landmark */
main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--header-pad-top);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: var(--header-pad-block) 0;
}

@media (max-width: 767px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand toggle";
    align-items: center;
    gap: 0.5rem 0.65rem;
  }

  .site-header__inner > .brand {
    grid-area: brand;
    flex: none;
    min-width: 0;
  }

  .site-header__inner > .nav-toggle {
    grid-area: toggle;
  }

  .site-header__inner > .nav {
    display: contents;
  }

  .site-header__inner > .nav a:not(.btn) {
    display: none;
  }

  .site-header .btn--nav-cta {
    display: none;
  }

  .site-header.is-nav-open .site-header__inner > .nav {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.65rem 0 0.2rem;
    gap: 0.15rem;
  }

  .site-header.is-nav-open .site-header__inner > .nav a:not(.btn) {
    display: flex;
  }
}

@media (min-width: 768px) {
  .site-header__inner {
    flex-wrap: nowrap;
    gap: 1rem;
  }
}

.nav-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand__name,
.brand__tld {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__tld {
  font-weight: 600;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .brand {
    font-size: 1.2rem;
  }
}

.nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  width: 100%;
  padding: 0.5rem 0 0.15rem;
}

.site-header.is-nav-open .nav {
  display: flex;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
    padding: 0;
    gap: 0.35rem;
  }
}

.nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav a:not(.btn):hover {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (min-width: 768px) {
  .nav a:not(.btn) {
    display: inline-flex;
    min-height: auto;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    font-size: 0.88rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

@media (min-width: 768px) {
  .btn {
    width: auto;
    max-width: none;
  }
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: transparent;
}

.hero {
  padding: 2rem 0 2.25rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 3.5rem 0 2.5rem;
  }
}

@media (max-width: 767px) {
  .hero {
    padding-top: var(--hero-pad-top, 3rem);
    padding-bottom: 2.5rem;
  }
}

.hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (max-width: 767px) {
  .hero__grid {
    gap: 2rem;
  }
}

@media (min-width: 860px) {
  .hero__grid {
    gap: 2.5rem;
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .eyebrow {
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
  }
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 5.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 80%, var(--text-muted));
  max-width: none;
}

@media (min-width: 768px) {
  .hero h1 {
    margin-bottom: 1rem;
  }

  .hero__lead {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    max-width: 42ch;
  }
}

.hero .store-block--hero {
  margin-bottom: 0.85rem;
}

.hero__trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero__trust li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero__trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

@media (min-width: 768px) {
  .hero__trust {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
  }
}

.btn--nav-cta {
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 38%, transparent);
}

.nav .btn {
  min-height: var(--touch);
  margin-top: 0.35rem;
}

@media (min-width: 768px) {
  .nav .btn {
    min-height: auto;
    margin-top: 0;
  }

  .btn--nav-cta {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 800;
  }
}

.hero__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

@media (max-width: 767px) {
  :root {
    --gutter: 1.875rem;
  }

  .hero__grid {
    gap: 2.5rem;
  }

  .eyebrow {
    margin-bottom: 1rem;
    line-height: 1.45;
  }

  .hero h1 {
    margin-bottom: 1.15rem;
    font-size: clamp(1.55rem, 6.8vw, 2.05rem);
    line-height: 1.22;
  }

  .hero__lead {
    margin-bottom: 1.65rem;
    font-size: 1.05rem;
    line-height: 1.68;
  }

  .hero .store-block--hero {
    margin-bottom: 1.25rem;
  }

  .store-block--hero .store-tagline {
    margin-bottom: 0.9rem;
    line-height: 1.45;
  }

  .store-row--hero {
    gap: 0.85rem;
  }

  .store-block--hero .store-soon {
    margin-top: 0.85rem;
    line-height: 1.5;
  }

  .hero__trust {
    gap: 0.7rem;
    padding-top: 0.35rem;
  }

  .hero__trust li {
    padding-left: 1.35rem;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hero__visual {
    min-height: 0;
    padding-top: 0.25rem;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 2rem;
  }
}

.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 4.25rem 0;
  }
}

.section--surface,
.section--cta {
  background: var(--surface);
  border-block: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.section--band {
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg));
  border-block: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
}

.section--default {
  background: var(--bg);
}

.section--context {
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.section--context .container {
  max-width: 50rem;
}

.section__copy p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

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

.section__copy-note {
  margin-top: 1.25rem;
  padding-top: 0.95rem;
  font-style: italic;
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.section__head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

@media (min-width: 768px) {
  .section__head {
    margin-bottom: 2.5rem;
  }
}

.section__head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section__head p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 78%, var(--text-muted));
}

@media (max-width: 767px) {
  .section {
    padding: 3.5rem 0;
  }

  .section__head {
    margin-bottom: 2.25rem;
  }

  .section__head h2 {
    margin-bottom: 1rem;
    line-height: 1.28;
  }

  .section__head p {
    line-height: 1.7;
  }

  .feature-grid,
  .why-grid {
    gap: 1.5rem;
  }

  .feature,
  .why-card {
    padding: 1.85rem 1.5rem;
  }

  .feature h3,
  .why-card h3 {
    margin-bottom: 0.75rem;
  }

  .trust-metrics {
    padding-block: 0.75rem;
  }

  .trust-metrics__grid {
    gap: 1.5rem 1.15rem;
  }
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.35rem;
  }
}

.feature {
  padding: 1.65rem 1.5rem;
  min-height: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 32%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 75%, var(--text-muted));
}

.why-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 900px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
  }
}

.why-card {
  padding: 1.65rem 1.5rem;
  min-height: 100%;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--border) 32%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}

.why-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.why-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.why-card p {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 75%, var(--text-muted));
}

.why-card p:last-child {
  margin-bottom: 0;
}

.why-card__contrast {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed color-mix(in srgb, var(--border) 45%, transparent);
  font-size: 0.95rem !important;
  color: var(--text-muted) !important;
}

.why__foot {
  max-width: 42rem;
  margin: 2rem auto 0;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.steps {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.step {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 28%, transparent);
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
}

.step p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 75%, var(--text-muted));
}

.step__num {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.trust-metrics {
  padding: 2.5rem 0;
  background: var(--bg);
  border-block: 1px solid color-mix(in srgb, var(--border) 25%, transparent);
}

.trust-metrics__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

@media (min-width: 720px) {
  .trust-metrics__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-metrics__value {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.trust-metrics__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

.trust-metrics__note {
  margin: 1.75rem auto 0;
  max-width: 36rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.download {
  text-align: center;
  padding: 3.25rem 0 3.5rem;
}

@media (min-width: 768px) {
  .download {
    padding: 4.5rem 0 4.75rem;
  }
}

.download__layout {
  max-width: 36rem;
  margin-inline: auto;
}

.download__head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  letter-spacing: -0.02em;
}

.download__lead {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--text) 80%, var(--text-muted));
}

.download__focus {
  margin-bottom: 1.75rem;
}

.download-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.download-chips li {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
  color: color-mix(in srgb, var(--text) 85%, var(--text-muted));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.download__note {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.store-tagline {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.store-block--hero .store-tagline {
  font-size: 1.02rem;
}

.store-block--download .store-tagline {
  text-align: center;
}

.store-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.store-row--hero {
  gap: 0.75rem;
}

@media (max-width: 767px) {
  .store-row--hero {
    flex-direction: column;
  }

  .store-row--hero .store-btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .store-row--hero {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .store-row--hero .store-btn {
    flex: 1 1 12rem;
  }
}

@media (min-width: 768px) {
  .store-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
  }
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: var(--touch);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid color-mix(in srgb, var(--accent) 70%, var(--border));
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.store-btn:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 90%, var(--text));
  border-color: var(--accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 42%, transparent);
}

.store-btn:active {
  transform: translateY(0);
}

.store-btn__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--on-accent);
}

.store-btn__icon svg {
  width: 1.625rem;
  height: 1.625rem;
}

.store-btn__text {
  font-size: 1.125rem;
  text-align: left;
  line-height: 1.25;
}

.store-btn__text small {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--on-accent) 78%, transparent);
  letter-spacing: 0.02em;
}

.store-btn--soon {
  background: color-mix(in srgb, var(--accent) 92%, var(--bg));
}

.store-soon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--touch);
  margin: 0;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: default;
}

.store-block--hero .store-soon-badge {
  min-height: 3.25rem;
  font-size: 1rem;
}

.store-block--download .store-soon-badge {
  margin-inline: auto;
  max-width: 22rem;
}

.store-block--sticky .store-soon-badge {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .store-soon-badge {
    width: auto;
    min-width: 220px;
    margin-inline: auto;
  }
}

.store-row--hero .store-btn {
  min-height: 3.25rem;
  padding: 0.9rem 1.2rem;
}

.store-row--hero .store-btn__text {
  font-size: 1.2rem;
}

.store-row--hero .store-btn__text small {
  font-size: 0.875rem;
}

.store-row--hero .store-btn__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

@media (min-width: 768px) {
  .store-btn {
    width: auto;
    min-width: 220px;
    min-height: auto;
    justify-content: flex-start;
  }
}

.store-soon {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.store-block--hero .store-soon {
  margin-top: 0.5rem;
}

.store-block--download .store-soon {
  text-align: center;
}

/* Analytics consent (fixed to viewport bottom; page padding keeps footer visible) */
:root {
  --analytics-consent-offset: 9rem;
}

body.has-analytics-consent {
  padding-bottom: calc(
    var(--analytics-consent-offset) + env(safe-area-inset-bottom, 0px)
  );
}

body.has-analytics-consent.has-sticky-download {
  padding-bottom: calc(
    var(--analytics-consent-offset) + 4.75rem + env(safe-area-inset-bottom, 0px)
  );
}

.analytics-consent {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding: 0.85rem var(--gutter) calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 28px color-mix(in srgb, var(--text) 12%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.has-sticky-download .analytics-consent {
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

html.analytics-consent-resolved #analytics-consent {
  display: none;
}

.analytics-consent__inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
}

.analytics-consent__title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
}

.analytics-consent__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.analytics-consent__text a {
  color: var(--accent);
  font-weight: 600;
}

.analytics-consent__actions {
  display: flex;
  flex-direction: row;
  gap: 0.55rem;
}

.analytics-consent__actions .btn--consent {
  flex: 1 1 0;
  min-height: var(--touch);
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid var(--border);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.analytics-consent__actions .btn--consent-accept {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.analytics-consent__actions .btn--consent-accept:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
  border-color: color-mix(in srgb, var(--accent) 88%, var(--text));
}

.analytics-consent__actions .btn--consent-decline {
  background: transparent;
  color: var(--text-muted);
  border-color: color-mix(in srgb, var(--border) 85%, transparent);
}

.analytics-consent__actions .btn--consent-decline:hover {
  background: var(--accent-soft);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

@media (min-width: 768px) {
  .analytics-consent__inner {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .analytics-consent__copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .analytics-consent__actions {
    flex: 0 0 auto;
    min-width: 22.5rem;
    flex-direction: row-reverse;
  }

  .analytics-consent__actions .btn--consent {
    flex: 1 1 auto;
    width: auto;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent {
    transition: none;
  }
}

/* Sticky mobile download bar */
body.has-sticky-download {
  padding-bottom: calc(
    4.75rem + env(safe-area-inset-bottom, 0px)
  );
}

.sticky-download {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem var(--gutter) calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--text) 10%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s ease,
    visibility 0.42s;
}

.sticky-download.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }

  .sticky-download {
    transition: none;
  }
}

.sticky-download__inner {
  max-width: var(--max);
  margin-inline: auto;
}

.store-row--sticky {
  flex-direction: row;
  gap: 0.5rem;
}

.store-row--sticky .store-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.65rem;
  gap: 0.5rem;
  justify-content: center;
}

.store-row--sticky .store-btn__text {
  font-size: 0.9375rem;
}

.store-row--sticky .store-btn__text small {
  font-size: 0.75rem;
}

.store-row--sticky .store-btn__icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

@media (min-width: 768px) {
  .sticky-download {
    display: none !important;
  }
}

.disclaimer {
  margin: 2rem auto 0;
  max-width: 52ch;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-terms {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-footer__brand p {
  margin: 0;
}

.site-footer__heritage {
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--text);
}

/* Legal pages */
.legal-page {
  padding: 2.25rem 0 2.5rem;
}

@media (min-width: 768px) {
  .legal-page {
    padding: 2rem 0 3rem;
  }
}

.legal-page h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.legal-page .meta {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.92rem;
}

.legal-page section {
  margin-bottom: 1.75rem;
}

.legal-page h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.legal-page p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.legal-page ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page__cookie-settings {
  width: auto;
  max-width: 100%;
  margin-top: 0.25rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 42rem;
  margin-inline: auto;
}

.faq-list--seo {
  max-width: 48rem;
}

.faq-accordion {
  display: grid;
  gap: 0.65rem;
  max-width: 48rem;
  margin-inline: auto;
}

.faq-entry {
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
}

.faq-entry h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.faq-entry p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-item {
  border: 1px solid color-mix(in srgb, var(--border) 32%, transparent);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.faq-item summary {
  padding: 1.15rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  color: var(--text);
}

.faq-item summary:focus {
  outline: none;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  margin-left: 1rem;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
}

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

.faq-item[open] summary {
  padding-bottom: 0.65rem;
}

.faq-item p {
  margin: 0;
  padding: 0 1.35rem 1.25rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

.faq-accordion .faq-item p a {
  font-weight: 600;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a {
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--border);
}

.content-page {
  padding: 1.25rem 0 2.5rem;
}

@media (min-width: 768px) {
  .content-page {
    padding: 2rem 0 3.5rem;
  }
}

.content-page h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.content-lead {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: none;
}

@media (min-width: 768px) {
  .content-lead {
    font-size: 1.1rem;
  }
}

.content-page .section__head {
  max-width: none;
}

.content-prose h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.2rem;
}

.content-prose p,
.content-prose li {
  color: var(--text-muted);
  line-height: 1.6;
}

.content-prose ul,
.content-prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.content-prose li {
  margin-bottom: 0.4rem;
}

.exam-topics {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .exam-topics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .exam-topics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.exam-topics li {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 32%, transparent);
}

.exam-topics--open li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.exam-topics strong {
  display: block;
  margin-bottom: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.exam-topics span {
  display: block;
  font-size: 0.98rem;
  color: color-mix(in srgb, var(--text) 70%, var(--text-muted));
  line-height: 1.5;
}

.exam-topics--open strong {
  flex: 1 1 auto;
}

.exam-topics--open span {
  flex-shrink: 0;
}

.exam-topics a {
  color: var(--accent);
}

.section__foot {
  margin: 2rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

.section__foot--center {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.guide-links {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
  margin-inline: auto;
}

@media (min-width: 600px) {
  .guide-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: none;
  }
}

.guide-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.guide-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
}

.guide-link__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.guide-link__meta {
  font-size: 0.95rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 68%, var(--text-muted));
}

.trust-strip {
  margin: 0 0 1.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.download-bullets {
  max-width: 28rem;
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.download-bullets li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.download-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.content-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.download-prose {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  text-align: center;
}

.download-prose p {
  margin-bottom: 0.85rem;
}

.content-faq {
  margin-top: 2.5rem;
}

.content-faq h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.content-faq .faq-list {
  max-width: none;
  margin-inline: 0;
}

.topic-hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .topic-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .topic-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.topic-card {
  display: block;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
}

.topic-card h2,
.topic-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--text);
}

.topic-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.cta-banner {
  margin-top: 2.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

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

.related-topics {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.related-topics h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.related-topics ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.related-topics a {
  font-weight: 600;
}

.theory-section {
  margin-bottom: 3rem;
}

.theory-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .theory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .theory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.theory-grid--chapters {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .theory-grid--chapters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .theory-grid--chapters {
    grid-template-columns: repeat(3, 1fr);
  }
}

.theory-card[id],
.theory-card h3[id],
main section[id] {
  scroll-margin-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}

.theory-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  overflow: hidden;
}

.theory-card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.theory-card--link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.theory-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: color-mix(in srgb, var(--bg) 80%, var(--surface));
  padding: 0.65rem;
}

.theory-card__body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.theory-card h2,
.theory-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--text);
}

.theory-card p {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.theory-card__link {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.theory-card__link:hover {
  text-decoration: underline;
}

/* Stronger contrast when user or OS requests more contrast */
@media (prefers-contrast: more) {
  :root {
    --text-muted: #3d362f;
    --border: #6d6760;
    --accent: #6b3528;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --text-muted: #d8d2ca;
      --border: #9a9590;
      --accent: #d4b5a8;
      --on-accent: #1a100c;
    }
  }
}

/* ── iPhone mockup (hero) ──────────────────────────────────── */

.iphone-mockup {
  position: relative;
  width: 270px;
  height: 550px;
  border-radius: 46px;
  background: #000;
  border: 3px solid #6b7280;
  box-shadow:
    inset 0 0 0 8px #000,
    inset 0 0 0 9px #2b2e33,
    0 25px 50px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  animation: floatPhone 6s ease-in-out infinite;
  flex-shrink: 0;
}

.iphone-mockup::after {
  content: "";
  position: absolute;
  top: 100px;
  left: -6px;
  width: 3px;
  height: 24px;
  background: #6b7280;
  border-radius: 3px 0 0 3px;
  box-shadow:
    0 40px 0 0 #6b7280,
    0 95px 0 0 #6b7280,
    270px 60px 0 0 #6b7280;
}

.iphone-mockup--lg {
  width: 300px;
  height: 610px;
  border-radius: 48px;
}

.iphone-mockup--lg::after {
  box-shadow:
    0 40px 0 0 #6b7280,
    0 95px 0 0 #6b7280,
    300px 60px 0 0 #6b7280;
}

.iphone-mockup--xl {
  width: 330px;
  height: 670px;
  border-radius: 52px;
}

.iphone-mockup--xl::after {
  box-shadow:
    0 48px 0 0 #6b7280,
    0 115px 0 0 #6b7280,
    330px 70px 0 0 #6b7280;
}

@keyframes floatPhone {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0);
  }
}

.iphone-mockup::before {
  /* Screenshots are full app UI — skip the overlay notch so headers stay visible. */
  content: none;
  display: none;
}

.iphone-mockup .glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 5;
  pointer-events: none;
  border-radius: 35px;
}

.iphone-screen-container {
  position: absolute;
  inset: 10px;
  border-radius: 35px;
  overflow: hidden;
  background: var(--bg);
}

.iphone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: absolute;
  inset: 0;
  opacity: 0;
}

.slideshow-2 .iphone-screen,
.slideshow-3 .iphone-screen,
.slideshow-5 .iphone-screen,
.slideshow-6 .iphone-screen {
  animation-timing-function: ease-in-out;
  will-change: opacity;
}

/* Pause on first paint; site.js adds slideshow-ready after decode warmup. */
.iphone-mockup.slideshow-2:not(.slideshow-ready) .iphone-screen,
.iphone-mockup.slideshow-3:not(.slideshow-ready) .iphone-screen,
.iphone-mockup.slideshow-5:not(.slideshow-ready) .iphone-screen,
.iphone-mockup.slideshow-6:not(.slideshow-ready) .iphone-screen {
  animation-play-state: paused !important;
}

.slideshow-3 .iphone-screen:nth-child(1) {
  animation: fade3-lead 12s infinite;
}

.slideshow-3 .iphone-screen:nth-child(n + 2) {
  animation: fade3-follow 12s infinite;
}

.slideshow-3 .iphone-screen:nth-child(2) {
  animation-delay: 4s;
}

.slideshow-3 .iphone-screen:nth-child(3) {
  animation-delay: 8s;
}

@keyframes fade3-lead {
  0%,
  25% {
    opacity: 1;
  }

  33.33%,
  91.66% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade3-follow {
  0% {
    opacity: 0;
  }

  4%,
  25% {
    opacity: 1;
  }

  33.33%,
  100% {
    opacity: 0;
  }
}

.slideshow-5 .iphone-screen:nth-child(1) {
  animation: fade5-lead 15s infinite;
}

.slideshow-5 .iphone-screen:nth-child(n + 2) {
  animation: fade5-follow 15s infinite;
}

.slideshow-5 .iphone-screen:nth-child(2) {
  animation-delay: 3s;
}

.slideshow-5 .iphone-screen:nth-child(3) {
  animation-delay: 6s;
}

.slideshow-5 .iphone-screen:nth-child(4) {
  animation-delay: 9s;
}

.slideshow-5 .iphone-screen:nth-child(5) {
  animation-delay: 12s;
}

@keyframes fade5-lead {
  0%,
  20% {
    opacity: 1;
  }

  25%,
  95% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade5-follow {
  0% {
    opacity: 0;
  }

  5%,
  20% {
    opacity: 1;
  }

  25%,
  100% {
    opacity: 0;
  }
}

.slideshow-6 .iphone-screen:nth-child(1) {
  animation: fade6-lead 18s infinite;
}

.slideshow-6 .iphone-screen:nth-child(n + 2) {
  animation: fade6-follow 18s infinite;
}

.slideshow-6 .iphone-screen:nth-child(2) {
  animation-delay: 3s;
}

.slideshow-6 .iphone-screen:nth-child(3) {
  animation-delay: 6s;
}

.slideshow-6 .iphone-screen:nth-child(4) {
  animation-delay: 9s;
}

.slideshow-6 .iphone-screen:nth-child(5) {
  animation-delay: 12s;
}

.slideshow-6 .iphone-screen:nth-child(6) {
  animation-delay: 15s;
}

@keyframes fade6-lead {
  0%,
  16.66% {
    opacity: 1;
  }

  20%,
  96.66% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade6-follow {
  0% {
    opacity: 0;
  }

  3.5%,
  16.66% {
    opacity: 1;
  }

  20%,
  100% {
    opacity: 0;
  }
}

.slideshow-2 .iphone-screen:nth-child(1) {
  animation: fade2-lead 10s infinite;
}

.slideshow-2 .iphone-screen:nth-child(n + 2) {
  animation: fade2-follow 10s infinite;
}

.slideshow-2 .iphone-screen:nth-child(2) {
  animation-delay: 5s;
}

@keyframes fade2-lead {
  0%,
  40% {
    opacity: 1;
  }

  50%,
  90% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade2-follow {
  0% {
    opacity: 0;
  }

  8%,
  40% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .iphone-mockup {
    width: 240px;
    height: 490px;
  }

  .iphone-mockup--xl {
    width: 280px;
    height: 570px;
  }

  .iphone-mockup--xl::after {
    box-shadow:
      0 40px 0 0 #6b7280,
      0 95px 0 0 #6b7280,
      280px 60px 0 0 #6b7280;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iphone-mockup {
    animation: none;
  }

  .slideshow-6 .iphone-screen,
  .slideshow-5 .iphone-screen,
  .slideshow-3 .iphone-screen,
  .slideshow-2 .iphone-screen {
    animation: none;
    opacity: 0;
  }

  .slideshow-6 .iphone-screen:nth-child(1),
  .slideshow-5 .iphone-screen:nth-child(1),
  .slideshow-3 .iphone-screen:nth-child(1),
  .slideshow-2 .iphone-screen:nth-child(1) {
    opacity: 1;
  }
}
