/*
 * Layout for the static pages: index.html, download.html and privacy.html. Colours and fonts
 * come from brand.css; nothing here should hard-code a hex value.
 */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--xc-font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--xc-fg);
  background: var(--xc-bg);
}

img, svg { max-width: 100%; }
a { color: var(--xc-primary); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--xc-primary); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: var(--xc-font-mono); font-size: 0.92em; background: var(--xc-surface-container); padding: 0.1em 0.4em; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--xc-fg-muted); }
.eyebrow {
  display: inline-block; margin-bottom: 0.75rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--xc-primary);
}
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--xc-surface-container); }
.section__lead { max-width: 42rem; font-size: 1.15rem; color: var(--xc-fg-muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--xc-bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--xc-outline-variant);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.site-brand { display: inline-flex; align-items: center; color: var(--xc-primary); text-decoration: none; }
.site-brand svg { height: 30px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--xc-fg); text-decoration: none; font-weight: 550; }
.site-nav a:hover { color: var(--xc-primary); }
.site-nav a.btn { color: var(--xc-on-primary); }
.site-nav__toggle {
  display: none; background: none; border: 1px solid var(--xc-outline-variant); border-radius: 8px;
  color: var(--xc-fg); padding: 0.4rem 0.6rem; cursor: pointer; font: inherit;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 650; text-decoration: none;
  background: var(--xc-primary); color: var(--xc-on-primary); border: 1px solid transparent;
  transition: transform 120ms ease, filter 120ms ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--xc-primary); border-color: var(--xc-outline); }
.btn--ghost:hover { background: var(--xc-surface-container); }

/* Store buttons */
.store-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-width: 190px; padding: 0.6rem 1.1rem 0.6rem 0.9rem; border-radius: 12px;
  background: var(--xc-fg); color: var(--xc-bg); text-decoration: none; line-height: 1.15;
  transition: transform 120ms ease, opacity 120ms ease;
}
.store-btn:hover { transform: translateY(-1px); }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn__label { display: flex; flex-direction: column; }
.store-btn__hint { font-size: 0.72rem; opacity: 0.8; }
.store-btn__name { font-size: 1.05rem; font-weight: 650; }
.store-btn.is-pending { opacity: 0.55; cursor: not-allowed; }
.store-btn.is-pending:hover { transform: none; }
.store-btn--lg { min-width: 240px; padding: 0.85rem 1.4rem 0.85rem 1.1rem; }
.store-btn--lg .store-btn__name { font-size: 1.2rem; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__sub { font-size: 1.2rem; color: var(--xc-fg-muted); max-width: 34rem; }
.hero__note { font-size: 0.95rem; color: var(--xc-fg-muted); }
.hero__art { display: flex; justify-content: center; }
.app-tile {
  position: relative; width: min(100%, 380px); aspect-ratio: 1; border-radius: 28%;
  background: var(--xc-primary); color: var(--xc-on-primary);
  display: grid; place-items: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.app-tile svg { width: 64%; height: auto; }
.app-tile--sm { width: 120px; border-radius: 26%; box-shadow: 0 16px 32px -18px rgba(0, 0, 0, 0.5); }
.app-tile img { width: 100%; height: auto; border-radius: inherit; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.step {
  background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
  border-radius: var(--xc-radius-lg); padding: 1.6rem;
}
.step__num {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--xc-primary-container); color: var(--xc-on-primary-container);
  font-weight: 750; font-size: 0.95rem; margin-bottom: 1rem;
}
.step p { margin-bottom: 0; color: var(--xc-fg-muted); }

/* Seek bar demo: the app's ad-skip Lottie, cropped to the band its artwork uses */
.seek {
  max-width: 600px; margin: 2.5rem auto 0; padding: 1.5rem; border-radius: var(--xc-radius-lg);
  background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
}
.seek__anim { aspect-ratio: 554 / 164; }
.seek__anim svg { display: block; }
.seek__chip {
  display: flex; width: fit-content; align-items: center; gap: 0.5rem; margin: 1rem auto 0;
  padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--xc-secondary-container); color: var(--xc-on-secondary-container);
}
.seek__chip svg { width: 18px; height: 18px; }
.seek__legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-size: 0.85rem; color: var(--xc-fg-muted); }
.seek__legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.4rem; vertical-align: -1px; }
.seek__legend .l-ad::before { background: var(--xc-ad); }
.seek__legend .l-undo::before { background: color-mix(in srgb, var(--xc-ad) 25%, transparent); }

/* Why on-device */
.callout {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem); border-radius: var(--xc-radius-lg);
  background: var(--xc-primary); color: var(--xc-on-primary);
}
.callout .eyebrow { color: var(--xc-primary-container); }
.callout h2 { color: inherit; }
.callout p { opacity: 0.92; }
.callout ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.callout li {
  padding: 0.9rem 1rem; border-radius: var(--xc-radius);
  background: color-mix(in srgb, var(--xc-on-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--xc-on-primary) 18%, transparent);
}
.callout li strong { display: block; margin-bottom: 0.15rem; }

/* Library sync, the app's Premium sync Lottie */
.sync { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.sync__note { color: var(--xc-fg-muted); margin-bottom: 0; }
.sync__art {
  padding: 1.5rem; border-radius: var(--xc-radius-lg);
  background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
}
.sync__anim { aspect-ratio: 512 / 368; }
.sync__anim svg { display: block; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.feature {
  position: relative; padding: 1.4rem; border-radius: var(--xc-radius-lg);
  background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
}
.feature__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--xc-primary-container); color: var(--xc-on-primary-container);
}
.feature__icon svg { width: 26px; height: 26px; }
.feature p { margin: 0; color: var(--xc-fg-muted); font-size: 0.98rem; }
.feature__badge {
  position: absolute; top: 1.4rem; right: 1.4rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--xc-secondary-container); color: var(--xc-on-secondary-container);
}

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 760px; margin-top: 2.5rem; }
.plan {
  position: relative; padding: 1.6rem; border-radius: var(--xc-radius-lg);
  background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
}
.plan h3 { margin-top: 0; }
.plan--best { border: 2px solid var(--xc-primary); }
.plan__badge {
  position: absolute; top: 1.6rem; right: 1.6rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--xc-primary); color: var(--xc-on-primary);
}
.plan__price { margin: 0.25rem 0 0.5rem; }
.plan__price strong { font-size: 2.4rem; line-height: 1; letter-spacing: -0.02em; }
.plan__price span { color: var(--xc-fg-muted); }
.plan__note { margin: 0; color: var(--xc-fg-muted); font-size: 0.95rem; }
.roi { margin-top: 3rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--xc-radius-lg); background: var(--xc-surface-container); }
.roi h3 { margin-top: 0; }
.roi__scroll { overflow-x: auto; margin: 1.25rem 0; }
.roi__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.roi__table th, .roi__table td { padding: 0.7rem 0.75rem; text-align: left; border-bottom: 1px solid var(--xc-outline-variant); }
.roi__table thead th { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--xc-fg-muted); vertical-align: bottom; }
.roi__table td { white-space: nowrap; }
.roi__table tbody tr:last-child > * { border-bottom: 0; }
.roi__table td:nth-child(4) { font-weight: 700; color: var(--xc-primary); }
.roi__note { margin: 0; font-size: 0.85rem; color: var(--xc-fg-muted); }

/* Download page */
.download { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 3rem 0; }
.download__card {
  width: min(560px, 100%); margin-inline: auto; text-align: center; padding: clamp(2rem, 5vw, 3rem);
  border-radius: var(--xc-radius-lg); background: var(--xc-surface-lowest); border: 1px solid var(--xc-outline-variant);
}
.download__card .app-tile { margin: 0 auto 1.5rem; }
.download__card .store-row { justify-content: center; flex-direction: column; align-items: center; }
.download__pending {
  margin-top: 1rem; padding: 0.9rem 1rem; border-radius: var(--xc-radius);
  background: var(--xc-secondary-container); color: var(--xc-on-secondary-container); font-size: 0.95rem;
}
.download__pending p { margin: 0; }

/* Legal pages (privacy.html) */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.legal__body { max-width: 44rem; }
.legal__body h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.legal__body h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-top: 2.25em; }
.legal__body h3 { margin-top: 1.5em; }
.legal__body ul { padding-left: 1.25rem; margin: 0 0 1em; }
.legal__body li { margin-bottom: 0.4em; }
.legal__summary {
  margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-radius: var(--xc-radius);
  background: var(--xc-surface-container); border: 1px solid var(--xc-outline-variant);
}
.legal__summary ul { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--xc-outline-variant); padding: 2rem 0; font-size: 0.9rem; color: var(--xc-fg-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: inherit; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .app-tile { width: min(60%, 260px); }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .callout, .sync { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .steps, .features, .plans { grid-template-columns: 1fr; }
  .site-nav__toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1rem;
    background: var(--xc-bg); border-bottom: 1px solid var(--xc-outline-variant);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.65rem 0; }
  .site-nav a.btn { margin-top: 0.5rem; }
  .store-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .store-btn { transition: none; }
}
