/* ============================================================================
   INSIGHTS MARKETING DESIGN SYSTEM — COMPONENTS
   ----------------------------------------------------------------------------
   Requires tokens.css. Free-standing: no app CSS, no framework, no build step.

   Direction — "Spectrum on Navy". Deep navy canvas, editorial whitespace,
   oversized Poppins display type, and the logo's spectrum gradient used as a
   precision instrument (hairlines, arcs, ring motifs) rather than a wash.
   Deliberately looser and larger than the product UI.
   ========================================================================== */

/* --- 1. BASE ------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Inline links use --action-text, not --action: the brighter fill blue only
   reaches 3.30:1 on light backgrounds, which fails AA at body size. */
a { color: var(--action-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.on-dark a { color: #7FC4F5; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

::selection { background: var(--ink); color: #fff; }

/* --- 2. LAYOUT ----------------------------------------------------------- */

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

.section        { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: var(--section-y-tight); }
.section--mist  { background: var(--mist); }
.section--ink   { background: var(--ink); color: var(--text-on-dark); }

/* Section header: eyebrow → headline → lead, consistently spaced. */
.section-head           { max-width: var(--measure-lead); margin-bottom: var(--space-9); }
.section-head--center   { margin-inline: auto; text-align: center; }
.section-head--wide     { max-width: 60ch; }

/* --- 3. TYPOGRAPHY ------------------------------------------------------- */

.display-1, .display-2, .display-3, .h1, .h2, .h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}

.display-1 { font-size: var(--fs-display-1); font-weight: var(--fw-semi); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
.display-2 { font-size: var(--fs-display-2); font-weight: var(--fw-semi); line-height: 1.08;             letter-spacing: var(--tracking-display); }
.display-3 { font-size: var(--fs-display-3); font-weight: var(--fw-semi); line-height: var(--lh-snug);   letter-spacing: var(--tracking-tight); }
.h1        { font-size: var(--fs-h1); font-weight: var(--fw-semi); line-height: var(--lh-snug); letter-spacing: var(--tracking-tight); }
.h2        { font-size: var(--fs-h2); font-weight: var(--fw-semi); line-height: var(--lh-snug); }
.h3        { font-size: var(--fs-h3); font-weight: var(--fw-medium); line-height: var(--lh-snug); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
  margin: var(--space-5) 0 0;
  max-width: var(--measure-lead);
  text-wrap: pretty;
}
.section-head--center .lead { margin-inline: auto; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 var(--space-5); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}
/* The eyebrow's leading dash is a 2px slice of the brand spectrum — the
   smallest possible dose of the logo gradient, repeated site-wide. */
.eyebrow::before {
  content: ""; width: 28px; height: 2px; border-radius: 2px;
  background: var(--spectrum-linear);
}

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

/* Gradient text — reserve for a single emphasised phrase per page. */
.spectrum-text {
  background: var(--spectrum-linear);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* --- 4. BRAND DEVICES ---------------------------------------------------- */

/* Full-bleed spectrum hairline. Used to cap navy sections. */
.spectrum-rule { height: 3px; border: 0; margin: 0; background: var(--spectrum-linear); }

/* Decorative ring, echoing the logo mark. Purely atmospheric. */
/* Band thickness matches the logo mark exactly: stroke 13 on radius 44 gives an
   inner edge at 74.3% of the outer radius. Every ring in the system uses 74%. */
.ring-motif {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: var(--spectrum-conic);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
          mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
  opacity: 0.22;
}

.logo-lockup { height: 34px; width: auto; }
.logo-mark   { height: 40px; width: 40px; }

/* --- 5. BUTTONS ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 1rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--action); color: #fff; box-shadow: 0 6px 18px rgba(26,146,236,0.28); }
.btn--primary:hover { background: var(--action-hover); box-shadow: 0 10px 26px rgba(26,146,236,0.34); }
.btn--primary:active { background: var(--action-press); }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-soft); }

.btn--secondary { background: transparent; color: var(--ink); border-color: rgba(0,15,69,0.22); }
.btn--secondary:hover { border-color: var(--ink); background: rgba(0,15,69,0.04); }

.btn--ghost { background: transparent; color: var(--text-body); padding-inline: var(--space-3); }
.btn--ghost:hover { color: var(--ink); }

/* On navy sections */
.on-dark .btn--secondary,
.btn--on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.34); }
.on-dark .btn--secondary:hover,
.btn--on-dark:hover { border-color: #fff; background: rgba(255,255,255,0.09); }

.btn--inverse { background: #fff; color: var(--ink); }
.btn--inverse:hover { background: rgba(255,255,255,0.9); }

.btn--sm { padding: 0.6875rem 1.125rem; font-size: var(--fs-xs); }
.btn--lg { padding: 1.1875rem 2.25rem; font-size: var(--fs-body); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.section-head--center .btn-row { justify-content: center; }

/* --- 6. HEADER / NAVIGATION ---------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,251,253,0.82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--cloud); }

.site-header__inner {
  display: flex; align-items: center; gap: var(--space-8);
  min-height: 80px;
}

.site-nav { display: flex; align-items: center; gap: var(--space-6); margin-left: auto; }

.site-nav__link {
  position: relative;
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-body); text-decoration: none; padding-block: var(--space-2);
  transition: color var(--dur-base) var(--ease);
}
.site-nav__link:hover { color: var(--ink); text-decoration: none; }
/* Underline grows from the left in brand spectrum. */
.site-nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--spectrum-linear); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-header__actions { display: flex; align-items: center; gap: var(--space-3); }

@media (max-width: 860px) {
  .site-nav { display: none; }
}

/* --- 7. HERO ------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: var(--text-on-dark);
  padding-block: clamp(5rem, 12vw, 10rem);
}
/* Atmosphere: an off-canvas spectrum ring, plus a soft navy vignette. */
.hero__ring {
  position: absolute; top: -26%; right: -14%;
  width: min(560px, 52vw); aspect-ratio: 1;
  background: var(--spectrum-conic);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
          mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
  opacity: 0.38;
  animation: hero-drift 44s linear infinite;
  pointer-events: none;
}
/* Below this width the headline spans the full container and the ring would
   sit behind live text. Legibility wins — the motif is atmosphere, not content. */
@media (max-width: 900px) {
  .hero__ring { display: none; }
}
@keyframes hero-drift { to { transform: rotate(360deg); } }

.hero__inner { position: relative; z-index: 1; max-width: 62ch; }
.hero .eyebrow { color: var(--text-on-dark-dim); }
.hero .lead { color: var(--text-on-dark-dim); max-width: 52ch; }
.hero .btn-row { margin-top: var(--space-8); }

.hero__note { margin-top: var(--space-6); font-size: var(--fs-xs); color: var(--text-on-dark-dim); }

/* Staggered entrance — one orchestrated load, not scattered micro-animations.
   Scoped to no-preference so the hero is never invisible if the animation
   doesn't run: content is visible by default and opts *in* to animating. */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero .display-1,
  .hero .lead,
  .hero .btn-row,
  .hero__note { animation: rise var(--dur-slow) var(--ease-out) backwards; }
  .hero .display-1 { animation-delay: 70ms; }
  .hero .lead      { animation-delay: 140ms; }
  .hero .btn-row   { animation-delay: 210ms; }
  .hero__note      { animation-delay: 280ms; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* --- 8. FEATURE GRID ----------------------------------------------------- */

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.feature {
  position: relative;
  padding: var(--space-7);
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease);
  overflow: hidden;
}
/* A spectrum bar wipes across the top edge on hover. */
.feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--spectrum-linear);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature:hover::before { transform: scaleX(1); }

.feature__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: grid; place-items: center;
  background: var(--action-tint); color: var(--action);
  margin-bottom: var(--space-5);
}
.feature__title { margin: 0 0 var(--space-3); }
.feature__body  { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-relaxed); }

.on-dark .feature { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); box-shadow: none; }
.on-dark .feature__icon { background: rgba(255,255,255,0.10); color: #fff; }

/* --- 9. STAT BAND -------------------------------------------------------- */

.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-8); }

.stat { text-align: left; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: var(--fw-semi);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  color: var(--text-strong);
}
.stat__label { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); }
.stat + .stat { position: relative; }

/* --- 10. LOGO WALL ------------------------------------------------------- */

.logo-wall {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(var(--space-6), 5vw, var(--space-10));
}
.logo-wall img { height: 30px; width: auto; opacity: 0.5; filter: grayscale(1); transition: opacity var(--dur-base) var(--ease), filter var(--dur-base) var(--ease); }
.logo-wall img:hover { opacity: 1; filter: none; }
.logo-wall__caption { text-align: center; font-size: var(--fs-xs); color: var(--text-faint); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; margin-bottom: var(--space-7); }

/* --- 11. TESTIMONIAL ----------------------------------------------------- */

.quote { max-width: 24ch; }
.quote__text {
  font-family: var(--font-display);
  font-size: var(--fs-display-3);
  font-weight: var(--fw-regular);
  line-height: 1.28;
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.quote--wide .quote__text { max-width: 26ch; }

.quote__attrib { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-7); }
.quote__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.quote__name { font-weight: var(--fw-semi); color: var(--text-strong); font-size: var(--fs-sm); }
.quote__role { font-size: var(--fs-xs); color: var(--text-muted); }

/* --- 12. PRICING --------------------------------------------------------- */

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); align-items: start; }

.price-card {
  position: relative;
  padding: var(--space-7);
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: var(--space-5);
}
/* The featured tier is framed by the brand spectrum rather than a flat accent. */
.price-card--featured {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    var(--spectrum-linear) border-box;
  border: 2px solid transparent;
}
.price-card__badge {
  position: absolute; top: calc(-1 * var(--space-3)); left: var(--space-7);
  background: var(--ink); color: #fff;
  font-size: var(--fs-eyebrow); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
}
.price-card__tier { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-semi); color: var(--text-strong); }
.price-card__price { font-family: var(--font-display); font-size: 3rem; font-weight: var(--fw-semi); line-height: 1; letter-spacing: var(--tracking-display); color: var(--text-strong); }
.price-card__price span { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--text-muted); letter-spacing: 0; }
.price-card__desc { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); font-size: var(--fs-sm); }
.price-list li { display: flex; align-items: flex-start; gap: var(--space-3); color: var(--text-body); }
.price-list li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--action-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A92EC' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* --- 13. FAQ ------------------------------------------------------------- */

.faq { border-top: 1px solid var(--cloud); }
.faq__item { border-bottom: 1px solid var(--cloud); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  padding: var(--space-6) 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-medium);
  color: var(--text-strong);
  transition: color var(--dur-base) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--action); }
.faq__q::after {
  content: ""; flex-shrink: 0; width: 12px; height: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px,-2px);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg) translate(-3px,-3px); }
.faq__a { padding-bottom: var(--space-6); margin: 0; max-width: var(--measure); color: var(--text-muted); font-size: var(--fs-sm); }

/* --- 14. FORMS ----------------------------------------------------------- */

.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--text-strong); }
.field__hint  { font-size: var(--fs-xs); color: var(--text-muted); }

.input, .select, .textarea {
  width: 100%;
  font-family: var(--font-body); font-size: var(--fs-sm); color: var(--text-body);
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--action); box-shadow: var(--focus-ring);
}
.textarea { min-height: 132px; resize: vertical; line-height: var(--lh-normal); }
.select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6480' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 16px;
  padding-right: 2.75rem;
}

.field--invalid .input { border-color: var(--spectrum-red); }
.field__error { font-size: var(--fs-xs); color: var(--spectrum-red); }

/* Inline capture — email + submit as one unit. */
.inline-form { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.inline-form .input { flex: 1 1 260px; border-radius: var(--radius-pill); padding-inline: 1.25rem; }

.on-dark .input, .on-dark .select, .on-dark .textarea {
  background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.18); color: #fff;
}
.on-dark .input::placeholder { color: rgba(255,255,255,0.48); }

/* --- 15. CTA BAND -------------------------------------------------------- */

.cta-band {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--text-on-dark);
  border-radius: var(--radius-xl);
  padding: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 6vw, 5rem);
  text-align: center;
}
.cta-band__ring {
  position: absolute; bottom: -55%; left: 50%; transform: translateX(-50%);
  width: min(680px, 90%); aspect-ratio: 1;
  background: var(--spectrum-conic);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
          mask: radial-gradient(circle closest-side, transparent 0 74%, #000 74.5% 99.5%, transparent 100%);
  opacity: 0.38; pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band .lead { margin-inline: auto; color: var(--text-on-dark-dim); }
.cta-band .btn-row { justify-content: center; margin-top: var(--space-7); }

/* --- 16. FOOTER ---------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--text-on-dark-dim); padding-block: var(--space-10) var(--space-7); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-8); }
.site-footer__blurb { font-size: var(--fs-sm); max-width: 34ch; margin: var(--space-5) 0 0; }
.site-footer__title { font-size: var(--fs-eyebrow); font-weight: var(--fw-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: rgba(255,255,255,0.9); margin: 0 0 var(--space-4); }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.site-footer__list a { color: var(--text-on-dark-dim); font-size: var(--fs-sm); }
.site-footer__list a:hover { color: #fff; text-decoration: none; }
.site-footer__base {
  display: flex; flex-wrap: wrap; gap: var(--space-5); justify-content: space-between; align-items: center;
  margin-top: var(--space-9); padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: var(--fs-xs);
}

/* --- 17. SCROLL REVEAL --------------------------------------------------- */

/* Scroll-linked reveal. Also opt-in, and additionally guarded on support for
   animation-timeline so browsers without it show content rather than hiding it. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise var(--dur-slow) var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
  }
}

/* --- 18. UTILITIES ------------------------------------------------------- */

.stack-4 > * + * { margin-top: var(--space-4); }
.stack-6 > * + * { margin-top: var(--space-6); }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
