/* ClaviSay SEO secondary page template — shared styles */
:root {
  --bg: oklch(98% 0.004 95);
  --surface: oklch(100% 0.002 95);
  --fg: oklch(20% 0.018 70);
  --muted: oklch(48% 0.012 70);
  --border: oklch(90% 0.006 95);
  --accent: oklch(52% 0.10 28);
  --accent-soft: color-mix(in oklch, var(--accent) 10%, transparent);
  --accent-glow: color-mix(in oklch, var(--accent) 18%, transparent);
  --font-display: 'Iowan Old Style', 'Charter', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  --container: 960px;
  --gutter: 24px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px oklch(0% 0 0 / 0.04), 0 8px 24px oklch(0% 0 0 / 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; }

/* Page shell — flat background (no grid / radial overlays) */
.seo-page {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
}
.seo-page > * { position: relative; z-index: 1; }

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

/* ─── home-aligned topnav ─── */
.layout__header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid oklch(90% 0.006 95 / 0.35);
  background: oklch(98% 0.004 95 / 0.62);
  box-shadow: inset 0 -1px 0 oklch(100% 0.002 95 / 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.layout__topnav-left,
.layout__nav,
.layout__brand,
.layout__pill-link {
  display: flex;
  align-items: center;
}

.layout__topnav-left {
  min-width: 0;
  flex: 1;
}

.layout__brand {
  gap: 10px;
  padding-right: 20px;
  color: var(--fg);
  text-decoration: none;
}

.layout__brand:hover {
  text-decoration: none;
}

.layout__brand-logo {
  display: grid;
  width: 80px;
  height: 32px;
  overflow: hidden;
  place-items: center;
}

.layout__brand-wordmark {
  width: auto;
  height: 32px;
}

.layout__nav {
  gap: clamp(16px, 2.5vw, 28px);
}

.layout__nav--actions {
  gap: 16px;
}

.layout__mobile-menu {
  position: relative;
  display: none;
}

.layout__mobile-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.layout__mobile-menu-trigger::-webkit-details-marker {
  display: none;
}

.layout__mobile-menu-panel {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.layout__mobile-menu-panel a {
  display: flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
  text-decoration: none;
}

.layout__mobile-menu-panel a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.layout__nav a,
.layout__pill-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}

.layout__nav a:hover,
.layout__nav a.active {
  color: var(--fg);
  text-decoration: none;
}

.layout__pill-link {
  min-height: 32px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  line-height: 1;
}

.layout__pill-link:hover {
  border-color: var(--accent);
  color: var(--fg);
}

@media (max-width: 720px) {
  .layout__header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .layout__topnav-left {
    flex: 1 1 auto;
    width: auto;
  }

  .layout__nav--primary {
    display: none;
  }

  .layout__mobile-menu {
    display: block;
    margin-left: auto;
  }

  .layout__mobile-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 240;
  }

  .layout__nav--actions {
    flex: 0 0 auto;
  }
}

@media (max-width: 520px) {
  .layout__nav--actions a:not(.layout__pill-link) {
    display: none;
  }
}

@media (max-width: 380px) {
  .layout__mobile-menu-trigger,
  .layout__pill-link {
    padding-inline: 12px;
  }
}

/* ─── section rhythm ─── */
.seo-section { padding: clamp(56px, 8vw, 96px) 0; }
.seo-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.seo-h1 { font-size: clamp(36px, 5.5vw, 52px); line-height: 1.08; margin-bottom: 16px; }
.seo-h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.12; margin-bottom: 16px; }
.seo-h2--center {
  text-align: center;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  margin-bottom: clamp(28px, 4vw, 40px);
}
.seo-h3 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; font-weight: 500; }
.seo-lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 52ch; }
.seo-body { color: var(--muted); max-width: 58ch; }
.seo-body p + p { margin-top: 14px; }
.seo-body a { font-weight: 500; }

/* H2 sections — centered titles + lead descriptions, left-aligned body */
.seo-section .seo-h2,
.seo-cta-band .seo-h2 {
  text-align: center;
  width: 100%;
  max-width: none;
}
.seo-section .seo-lead,
.seo-cta-band .seo-lead {
  max-width: 58ch;
  width: 100%;
  text-align: center;
  margin-inline: auto;
}
.seo-section .seo-body,
.seo-split__text .seo-body {
  max-width: none;
  width: 100%;
  text-align: left;
}
.seo-split__text {
  text-align: left;
}
.seo-action {
  margin-top: 24px;
  text-align: center;
}

.seo-split__text .seo-action {
  text-align: left;
}

/* ─── layout: split ─── */
.seo-split-block { display: grid; gap: 0; }
.seo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.seo-split--img-left .seo-split__visual { order: 1; }
.seo-split--img-left .seo-split__text { order: 2; }
.seo-split--img-right .seo-split__visual { order: 2; }
.seo-split--img-right .seo-split__text { order: 1; }
@media (max-width: 820px) {
  .seo-split, .seo-split--img-left, .seo-split--img-right { grid-template-columns: 1fr; }
  .seo-split--img-left .seo-split__visual,
  .seo-split--img-right .seo-split__visual { order: -1; }
  .seo-split--img-left .seo-split__text,
  .seo-split--img-right .seo-split__text { order: unset; }
}

/* ─── Feature assembly slot (section 1) ─── */
.seo-assembly {
  padding-top: clamp(64px, 10vw, 112px);
  padding-bottom: clamp(32px, 5vw, 48px);
  scroll-margin-top: 72px;
}
.seo-assembly__slot {
  min-height: clamp(220px, 32vw, 360px);
  border-radius: var(--radius-lg);
}

/* ─── URL hero (section 2) ─── */
.seo-hero-url { padding-top: clamp(24px, 4vw, 40px); padding-bottom: clamp(56px, 8vw, 88px); }
.seo-hero-url__inner { text-align: center; }
.seo-hero-url__inner .seo-lead { margin-inline: auto; }
.seo-url-form {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  max-width: 560px;
  margin-inline: auto;
}
.seo-url-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  box-shadow: var(--shadow-card);
}
.seo-url-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.seo-url-input::placeholder { color: color-mix(in oklch, var(--muted) 70%, transparent); }
@media (max-width: 520px) {
  .seo-url-form { flex-direction: column; max-width: none; }
  .seo-url-form .btn { width: 100%; }
}

/* ─── image placeholder ─── */
.seo-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 24px;
}
.seo-visual.square,
.seo-visual--square { aspect-ratio: 1; }
.seo-visual.wide,
.seo-visual--wide { aspect-ratio: 16 / 9; }
.seo-visual:has(img) {
  aspect-ratio: auto;
  padding: 0;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
}
.seo-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ─── bullet list (problem section) ─── */
.seo-bullets {
  list-style: none;
  margin-top: 20px;
  display: grid;
  gap: 10px;
  justify-items: start;
  text-align: left;
}
.seo-bullets li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}
.seo-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ─── feature grid (section 6) ─── */
.seo-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}
@media (max-width: 640px) { .seo-feature-grid { grid-template-columns: 1fr; } }
.seo-feature-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.seo-feature-card h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--fg); }
.seo-feature-card p { font-size: 14px; color: var(--muted); line-height: 1.55; margin-top: 6px; }

/* ─── steps (section 7) ─── */
.seo-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 720px) { .seo-steps { grid-template-columns: 1fr; } }
.seo-step {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  text-align: left;
}
.seo-step__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.seo-step h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; }
.seo-step p { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.55; }

/* ─── CTA band (section 8) ─── */
.seo-cta-band {
  text-align: center;
  padding: clamp(64px, 10vw, 96px) 0;
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.seo-cta-band .seo-h2 { margin-inline: auto; }
.seo-cta-band .seo-lead { margin: 16px auto 28px; }

/* ─── testimonials (section 9) — horizontal scroll ─── */
.seo-testimonial-scroll {
  position: relative;
  margin-top: 8px;
}
.seo-testimonial-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 20px;
  scrollbar-width: none;
}
.seo-testimonial-track::-webkit-scrollbar { display: none; }
.seo-testimonial {
  flex: 0 0 min(340px, 82vw);
  scroll-snap-align: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.seo-testimonial blockquote {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg);
  margin-bottom: 16px;
}
.seo-testimonial cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}
.seo-testimonial cite strong { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.seo-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px color-mix(in oklch, var(--fg) 6%, transparent);
}
.seo-scroll-btn:hover {
  border-color: color-mix(in oklch, var(--accent) 40%, var(--border));
}
.seo-scroll-btn--prev { left: -12px; }
.seo-scroll-btn--next { right: -12px; }
@media (max-width: 820px) {
  .seo-scroll-btn { display: none; }
  .seo-testimonial-track { padding-inline: 0; }
}
.seo-testimonial-scroll::before,
.seo-testimonial-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 20px;
  width: 48px;
  z-index: 1;
  pointer-events: none;
}
.seo-testimonial-scroll::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.seo-testimonial-scroll::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

/* ─── FAQ (section 10) ─── */
.seo-section--faq .container { text-align: left; }
.seo-section--faq .seo-h2--center { text-align: center; }
.seo-faq {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  text-align: left;
}
.seo-faq details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  text-align: left;
}
.seo-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.seo-faq details[open] summary::after { content: '−'; }
.seo-faq details p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  text-align: left;
  padding-right: 0;
}

/* ─── footer ─── */
.seo-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.seo-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.seo-footer__links { display: flex; gap: 20px; }
.seo-footer__links a { color: var(--muted); }
.seo-footer__links a:hover { color: var(--fg); }

/* Nested inside app layout (React route) */
.layout__main .seo-template-preview.seo-page,
.layout__main .ytv-page.seo-page {
  width: calc(100% + 2 * clamp(20px, 4vw, 48px));
  max-width: none;
  margin-inline: calc(-1 * clamp(20px, 4vw, 48px));
  margin-block-start: calc(-1 * clamp(32px, 5vw, 56px));
  margin-block-end: -64px;
  padding-inline: clamp(20px, 4vw, 48px);
  min-height: auto;
  background: var(--bg);
}

.seo-problem__closing,
.ytv-problem__closing {
  margin-top: 20px;
}

.seo-how-to__visual,
.ytv-how-to__visual {
  margin-top: 36px;
}
