/* ==========================================================================
   Spark Brand Media — global stylesheet
   Black / white / grayscale only. Inter, varying weight only.
   ========================================================================== */

:root {
  --color-bg: #FFFFFF;
  --color-text: #1A1A1A;
  --color-muted: #6B6B6B;
  --color-border: #E5E5E5;
  --color-border-strong: #D0D0D0;
  --color-invert-bg: #1A1A1A;
  --color-invert-text: #FFFFFF;

  --max-width: 1160px;
  --radius: 6px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset ---------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

button {
  font-family: inherit;
}

/* ---- Accessibility utilities ------------------------------------------- */

.visually-hidden {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden:focus {
  position: fixed;
  left: var(--space-2);
  top: var(--space-2);
  width: auto;
  height: auto;
  z-index: 200;
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}

/* ---- Focus states (accessibility) ------------------------------------ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* ---- Layout helpers ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-7);
  border-bottom: 1px solid var(--color-border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-heading {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.section-body {
  color: var(--color-muted);
  font-size: 1.0625rem;
  max-width: 640px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

/* ---- Typography --------------------------------------------------------- */

h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--color-text);
}

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

/* ---- Buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.375rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  border-color: var(--color-invert-bg);
}

.btn-primary:hover {
  background: #333333;
  border-color: #333333;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-text);
}

.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border-strong);
  transition: text-decoration-color 0.15s ease;
}

.link-underline:hover {
  text-decoration-color: var(--color-text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--color-muted);
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-5);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
}

.footer-brand h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.footer-brand p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  max-width: 320px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--color-text);
}

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

.footer-bottom {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* ---- Hero --------------------------------------------------------------- */

.hero {
  padding-block: var(--space-8) var(--space-7);
  text-align: center;
}

.hero-inner {
  max-width: 780px;
  margin-inline: auto;
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.hero-subhead {
  font-size: 1.1875rem;
  color: var(--color-muted);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---- Flow diagram (Agency -> Spark -> Deliverable) ----------------------- */

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-7);
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}

.flow-step-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  color: var(--color-text);
}

.flow-step-box svg {
  width: 28px;
  height: 28px;
}

.flow-step span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted);
}

.flow-arrow {
  color: var(--color-border-strong);
  flex-shrink: 0;
}

.flow-arrow svg {
  width: 22px;
  height: 22px;
}

/* ---- Services grid -------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: var(--space-5);
}

.service-card {
  background: var(--color-bg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.service-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-text);
}

.service-card h3 {
  margin-top: 0.25rem;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.services-note {
  margin-top: var(--space-3);
  font-size: 0.9375rem;
  color: var(--color-muted);
}

/* ---- Why-us 2x2 grid ------------------------------------------------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-4);
  margin-top: var(--space-5);
}

.why-item h3 {
  margin-bottom: 0.5rem;
}

.why-item p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* ---- How it works steps ----------------------------------------------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.step-item {
  border-top: 1px solid var(--color-border-strong);
  padding-top: var(--space-2);
}

.step-number {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

.step-item h3 {
  margin-bottom: 0.5rem;
}

.step-item p {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* ---- Pricing preview / plan cards ------------------------------------- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
  align-items: stretch;
}

.plan-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.plan-card.is-highlighted {
  border-color: var(--color-text);
}

.plan-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.plan-name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-muted);
}

.plan-credits {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.plan-covers {
  color: var(--color-muted);
  font-size: 0.9375rem;
  flex-grow: 1;
}

.plan-card .btn {
  margin-top: var(--space-2);
}

.pricing-preview-link {
  display: block;
  text-align: center;
  margin-top: var(--space-4);
}

/* ---- Full pricing table ------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
  margin-top: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

table.credit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.credit-table th,
.credit-table td {
  text-align: left;
  padding: 0.9rem 1.25rem;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--color-border);
}

.credit-table th {
  font-weight: 600;
  color: var(--color-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #FAFAFA;
}

.credit-table td:last-child,
.credit-table th:last-child {
  text-align: right;
}

.credit-table tr:last-child td {
  border-bottom: none;
}

.table-note {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  color: var(--color-muted);
}

/* ---- Billing list -------------------------------------------------- */

.billing-list {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 680px;
}

.billing-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.billing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text);
}

/* ---- FAQ accordion -------------------------------------------------- */

.faq-list {
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: transparent;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
}

.faq-question svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  transition: transform 0.2s ease;
}

.faq-item.is-open .faq-question svg {
  transform: rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.faq-answer-inner {
  padding-bottom: 1.25rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
  max-width: 680px;
}

/* ---- Final CTA band --------------------------------------------------- */

.cta-band {
  text-align: center;
  padding-block: var(--space-7);
}

.cta-band h2 {
  margin-bottom: var(--space-2);
}

.cta-band p {
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

/* ---- Page header (Pricing / Onboarding) ------------------------------- */

.page-header {
  padding-block: var(--space-7) var(--space-5);
  text-align: center;
}

.page-header-inner {
  max-width: 640px;
  margin-inline: auto;
}

.page-header h1 {
  margin-bottom: var(--space-2);
}

.page-header p {
  color: var(--color-muted);
  font-size: 1.0625rem;
}

/* ---- Contact note ---------------------------------------------------- */

.contact-note {
  text-align: center;
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  color: var(--color-muted);
}

/* ---- Onboarding form --------------------------------------------------- */

.onboarding-form {
  max-width: 640px;
  margin-inline: auto;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-field .optional {
  font-weight: 400;
  color: var(--color-muted);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 0.7rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  width: 100%;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #A8A8A8;
}

.form-field textarea {
  resize: vertical;
  min-height: 96px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.checkbox-group,
.multiselect-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9375rem;
}

.checkbox-option input {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-text);
}

.multiselect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.field-error {
  font-size: 0.8125rem;
  color: #B3261E;
  display: none;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #B3261E;
}

.form-field.has-error .field-error {
  display: block;
}

.form-note {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9375rem;
  max-width: 480px;
  margin-inline: auto;
  margin-top: var(--space-3);
}

.form-success {
  display: none;
  text-align: center;
  max-width: 480px;
  margin-inline: auto;
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.form-success.is-visible {
  display: block;
}

/* ---- Dev/TODO notice banner -------------------------------------------- */

.build-note {
  background: #FAFAFA;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  color: var(--color-muted);
  max-width: 640px;
  margin: var(--space-3) auto 0;
}

.build-note strong {
  color: var(--color-text);
}

/* ---- Scroll reveal ---------------------------------------------------- */

/* Only animate when JS has confirmed it can run (html.js, set synchronously
   in <head>) and reveal the elements again (html.js .reveal.is-visible).
   Without JS, .reveal elements are plain, fully visible content — the
   animation is a progressive enhancement, never a requirement to see copy. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .multiselect-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav-primary {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-primary.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links a:not(.btn) {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-primary .btn {
    margin-top: var(--space-2);
  }

  .nav-toggle {
    display: block;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid .step-item {
    border-top: 1px solid var(--color-border-strong);
  }

  .flow-diagram {
    flex-direction: column;
  }

  .flow-arrow svg {
    transform: rotate(90deg);
  }

  .footer-top {
    flex-direction: column;
  }

  .multiselect-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    justify-content: center;
  }
}
