/* Sparkler Pages — the client's design.
 *
 * THIS is the file that carries the look, and it is the reason the plugin exists: the client edits
 * words and images, never spacing or colour, so the design survives being edited.
 *
 * Namespaced .spk-* throughout because it loads alongside the client's active theme stylesheet.
 * Budget per-theme reset work: this is the composed surface the QC rule is about.
 */

/* BOX-SIZING IS OURS TO SET, NOT THE THEME'S TO PROVIDE.
 *
 * Caught by a real 390px screenshot, not by review: `.spk-wrap` is `width:100%` plus
 * `padding-inline`, which without border-box computes to 425px inside a 390px viewport — a 35px
 * horizontal scroll on every page, on every phone. It looked correct at 1440 and correct in the
 * markup.
 *
 * The tempting assumption is that the active theme already normalises this. Most do; relying on it
 * means the design breaks on the one client whose theme does not, and it breaks in the way nobody
 * checks. Scoped to our own subtree so we never reach into the theme's. */
.spk-body,
.spk-body *,
.spk-body *::before,
.spk-body *::after {
  box-sizing: border-box;
}

.spk-body {
  --spk-ink: #10151c;
  --spk-ink-soft: #55606f;
  --spk-bg: #ffffff;
  --spk-bg-alt: #f5f7fa;
  --spk-line: #e3e8ef;
  --spk-brand: #0b6bcb;
  --spk-brand-ink: #ffffff;
  --spk-radius: 14px;
  --spk-wrap: 1140px;
  --spk-band: clamp(3.5rem, 7vw, 6.5rem);

  margin: 0;
  background: var(--spk-bg);
  color: var(--spk-ink);
  font: 400 clamp(1rem, 0.35vw + 0.95rem, 1.075rem)/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .spk-body {
    --spk-ink: #eef2f7; --spk-ink-soft: #a3aebd; --spk-bg: #0d1117;
    --spk-bg-alt: #151b24; --spk-line: #232b36; --spk-brand: #4d9df0; --spk-brand-ink: #08121d;
  }
}

.spk-wrap { width: 100%; max-width: var(--spk-wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.25rem); }
.spk-sec { padding-block: var(--spk-band); }
.spk-sec + .spk-sec { border-top: 1px solid var(--spk-line); }

/* Type. Fluid, so the design does not need a mobile variant per band. */
.spk-h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.06; letter-spacing: -0.022em; margin: 0 0 1rem; font-weight: 680; }
.spk-h2 { font-size: clamp(1.6rem, 2.9vw, 2.4rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 1.6rem; font-weight: 660; }
.spk-h3 { font-size: 1.16rem; line-height: 1.3; margin: 0 0 .5rem; font-weight: 650; }
.spk-eyebrow { margin: 0 0 .7rem; font-size: .8rem; font-weight: 640; letter-spacing: .1em; text-transform: uppercase; color: var(--spk-brand); }
.spk-lede { font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.2rem); color: var(--spk-ink-soft); max-width: 52ch; }
.spk-lede p, .spk-card__body p, .spk-cta__body p { margin: 0 0 .8rem; }
.spk-prose { max-width: 68ch; }
.spk-prose p { margin: 0 0 1.05rem; }

/* Buttons and links. */
.spk-btn {
  display: inline-block; padding: .78rem 1.5rem; border-radius: 999px;
  background: var(--spk-brand); color: var(--spk-brand-ink);
  font-weight: 620; text-decoration: none; border: 1px solid transparent;
  transition: transform .12s ease, filter .12s ease;
}
.spk-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.spk-btn--sm { padding: .5rem 1rem; font-size: .92rem; }
.spk-btn--lg { padding: .95rem 1.9rem; font-size: 1.06rem; }
.spk-link { color: var(--spk-brand); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.spk-btn:focus-visible, .spk-link:focus-visible, .spk-nav__list a:focus-visible {
  outline: 3px solid var(--spk-brand); outline-offset: 3px;
}

/* Chrome. */
.spk-chrome-head { border-bottom: 1px solid var(--spk-line); background: var(--spk-bg); }
.spk-chrome-head__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 74px; }
.spk-brand { font-weight: 700; font-size: 1.12rem; color: inherit; text-decoration: none; letter-spacing: -0.01em; }
.spk-nav { margin-inline-start: auto; }
.spk-nav__list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.spk-nav__list a { color: var(--spk-ink-soft); text-decoration: none; font-weight: 560; font-size: .97rem; }
.spk-nav__list a:hover { color: var(--spk-ink); }
.spk-chrome-foot { border-top: 1px solid var(--spk-line); background: var(--spk-bg-alt); padding-block: 2.4rem; }
.spk-chrome-foot__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.spk-foot__brand { margin: 0; font-weight: 640; }
.spk-foot__line { margin: 0; color: var(--spk-ink-soft); font-size: .93rem; }

/* Hero. */
.spk-hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.spk-hero__actions { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; margin: 1.9rem 0 0; }
.spk-hero__img, .spk-hero__media img { width: 100%; height: auto; border-radius: var(--spk-radius); display: block; }
.spk-pagehead { background: var(--spk-bg-alt); }

/* Grids. */
.spk-grid { display: grid; gap: clamp(1.1rem, 2.4vw, 2rem); }
.spk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.spk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.spk-card { padding: 1.6rem; border: 1px solid var(--spk-line); border-radius: var(--spk-radius); background: var(--spk-bg); }
.spk-card__icon { display: inline-flex; width: 40px; height: 40px; margin-bottom: 1rem; color: var(--spk-brand); }
.spk-card__icon svg { width: 100%; height: 100%; }
.spk-card__body { color: var(--spk-ink-soft); font-size: .98rem; }

/* Testimonials. */
.spk-testimony { background: var(--spk-bg-alt); }
.spk-quote { margin: 0; padding: 1.7rem; background: var(--spk-bg); border: 1px solid var(--spk-line); border-radius: var(--spk-radius); }
.spk-quote__body { font-size: 1.06rem; }
.spk-quote__by { margin-top: 1rem; display: flex; flex-direction: column; gap: .1rem; }
.spk-quote__name { font-weight: 640; }
.spk-quote__role { color: var(--spk-ink-soft); font-size: .9rem; }

/* CTA. */
.spk-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.spk-cta__body { color: var(--spk-ink-soft); }
.spk-cta__actions { margin: 0; }

/* Mobile. Every dc export we ever shipped broke here first, so the breakpoints are part of the
 * design rather than an afterthought. */
@media (max-width: 900px) {
  .spk-hero__inner { grid-template-columns: 1fr; }
  .spk-grid--3, .spk-grid--2 { grid-template-columns: 1fr; }
  .spk-chrome-head__inner { flex-wrap: wrap; min-height: 0; padding-block: 1rem; }
  .spk-nav { margin-inline-start: 0; width: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .spk-btn { transition: none; }
  .spk-btn:hover { transform: none; }
}
