/* Static template pages (/templates/**, built by scripts/build-seo-pages.mjs).
   Standalone on purpose: no app CSS, no fonts, no JS. Same tokens as /app/css/base.css
   (original app styling: cream background, purple accent, heavy system font). Mobile-first;
   every image has width/height + aspect-ratio, so nothing shifts while loading. */

:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --surface-muted: #f3eee8;
  --text: #1a1c22;
  --text-2: #6f6863; /* AA on cream */
  --accent: #7b5cfa;
  --accent-dark: #6242d9;
  --accent-tint: #f3f0fd;
  --border: #efe7e1;
  --sh-card: 0 6px 18px rgba(26, 28, 34, 0.06);
  --sh-accent: 0 8px 16px rgba(98, 66, 217, 0.28);
  --r-md: 16px;
  --r-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

:focus-visible {
  outline: 3px solid rgba(123, 92, 250, 0.5);
  outline-offset: 3px;
}

.sp-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* ---------- Nav ---------- */

.sp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 244, 0.94);
  border-bottom: 1px solid var(--border);
}
.sp-nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.sp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  text-decoration: none;
}
.sp-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.sp-nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* ---------- Breadcrumbs ---------- */

.sp-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-2);
}
.sp-crumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 4px;
}
.sp-crumbs a {
  color: var(--text-2);
  text-decoration: none;
  /* 24px+ tap targets */
  display: inline-block;
  padding: 2px 0;
}
.sp-crumbs a:hover {
  text-decoration: underline;
}
.sp-crumbs [aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Type ---------- */

.sp-hero {
  padding: 10px 0 8px;
}
.sp-eyebrow {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}
.sp-eyebrow a {
  color: var(--accent-dark);
  text-decoration: none;
}
.sp-h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.sp-h2 {
  margin: 0 0 12px;
  font-size: clamp(21px, 5.4vw, 26px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.sp-h2 a {
  color: inherit;
  text-decoration: none;
}
.sp-tagline {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 17px;
  font-weight: 600;
}
.sp-lede {
  margin: 16px 0;
  font-size: 17px;
  max-width: 62ch;
}
.sp-section {
  margin: 36px 0;
}
.sp-section p {
  max-width: 68ch;
}
.sp-small {
  font-size: 14px;
  color: var(--text-2);
}

/* ---------- Before / after ---------- */

.sp-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  max-width: 680px;
}
.sp-ba-item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-muted);
  aspect-ratio: 3 / 4;
  box-shadow: var(--sh-card);
}
.sp-ba-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-ba-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 28, 34, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sp-ba-tag.is-after {
  background: var(--accent-dark); /* white on #7b5cfa is 4.4:1, below AA for small text */
}
.sp-ba figcaption {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- CTA ---------- */

.sp-cta-box {
  margin: 18px 0 8px;
  max-width: 480px;
}
.sp-cta-mid {
  margin: 36px 0;
}
.sp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 19px; /* 19px/800 counts as large text: #fff on the accent passes AA (4.4:1 ≥ 3:1) */
  font-weight: 800;
  letter-spacing: -0.2px;
  text-decoration: none;
  box-shadow: var(--sh-accent);
  transition: background 0.15s ease, transform 0.15s ease;
}
.sp-btn:hover {
  background: #6f4ff5;
}
.sp-btn:active {
  transform: scale(0.98);
}
.sp-micro {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Lists ---------- */

.sp-list {
  margin: 0;
  padding-left: 20px;
  max-width: 68ch;
}
.sp-list li {
  margin: 6px 0;
}
.sp-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-card);
}
.sp-steps p {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 15px;
}
.sp-step-n {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.sp-note {
  padding: 18px 18px 14px;
  border-radius: var(--r-lg);
  background: var(--accent-tint);
}
.sp-note ul {
  margin: 0;
  padding-left: 20px;
}
.sp-note li {
  margin: 4px 0;
}
.sp-faq dt {
  font-weight: 700;
  margin-top: 14px;
}
.sp-faq dd {
  margin: 4px 0 0;
  color: var(--text-2);
}

/* ---------- Cards / grid ---------- */

.sp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-card {
  display: block;
  height: 100%;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-card);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}
.sp-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface-muted);
}
.sp-card-t {
  display: block;
  padding: 10px 12px 0;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
}
.sp-card-d {
  display: block;
  padding: 2px 12px 12px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.35;
}
.sp-card:hover .sp-card-t {
  color: var(--accent-dark);
}
.sp-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.sp-see,
.sp-more a {
  font-weight: 700;
  font-size: 15px;
}
.sp-see {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 0;
}
.sp-more {
  margin: 14px 0 0;
}

.sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.sp-chip.is-on {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
a.sp-chip:hover {
  border-color: var(--accent);
}

/* ---------- Footer ---------- */

.sp-footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}
.sp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0;
}
.sp-footer-links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  padding: 4px 0;
}
.sp-footer-links a:hover {
  text-decoration: underline;
}
.sp-ai-note,
.sp-copy {
  margin: 0;
}

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  .sp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sp-ba {
    gap: 14px;
  }
}
@media (min-width: 900px) {
  .sp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .sp-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

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