/* ==========================================================================
   Global: base, typography, layout, buttons and shared components
   ========================================================================== */

body {
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: inherit;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -.01em; }
p  { text-wrap: pretty; }

/* Accent word inside a heading: brand colour, same typeface, no italics */
em.accent, .accent { font-style: normal; color: var(--c-purple); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--c-purple); color: var(--c-white); font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--c-purple); outline-offset: 3px; }

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--sand { background: var(--c-sand); }
.section--white { background: var(--c-white); }
.section--night { background: var(--c-night); color: var(--c-white); }
.section--line { border-top: 1px solid var(--c-line); }

/* Section heading block */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-purple);
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
}
.section--night .eyebrow { color: #D9D2E6; }
/* No purple text on dark surfaces: accents, links and figures stay white */
.section--night .accent { color: var(--c-white); }

.head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.head--center { margin-inline: auto; text-align: center; }
.head--center .eyebrow { justify-content: center; }
.head__lead {
  margin-top: 18px;
  font-size: var(--t-lead); line-height: 1.55; color: var(--c-ink-soft);
}
.section--night .head__lead { color: #C9C2D6; }
.head--split {
  max-width: none;
  display: grid; gap: 20px 64px; align-items: end;
}
@media (min-width: 960px) {
  .head--split { grid-template-columns: 1.1fr 1fr; }
  .head--split .head__lead { margin-top: 0; }
}

.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--c-ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r-btn);
  font-family: var(--f-sans); font-size: .9375rem; font-weight: 500; line-height: 1.1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--dark { background: var(--c-purple); color: var(--c-white); }
.btn--dark:hover { background: var(--c-purple-deep); }
.btn--primary { background: var(--c-purple); color: var(--c-white); }
.btn--primary:hover { background: var(--c-purple-deep); }
.btn--outline { border-color: var(--c-purple); color: var(--c-purple); background: transparent; }
.btn--outline:hover { background: var(--c-purple); color: var(--c-white); }
.btn--light { background: var(--c-white); color: var(--c-purple); }
.btn--light:hover { background: var(--c-purple-soft); }
.btn--ghost-light { border-color: rgba(255,255,255,.4); color: var(--c-white); }
.btn--ghost-light:hover { border-color: var(--c-white); background: rgba(255,255,255,.08); }
.btn--lg { min-height: 48px; padding: 13px 24px; font-size: 1rem; }
.btn--sm { min-height: 36px; padding: 7px 14px; font-size: .875rem; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--c-purple); text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.section--night .text-link { color: var(--c-white); }

/* Cards */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 32px);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--c-ink-soft); }
.card--link { text-decoration: none; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.card--link:hover { border-color: var(--c-purple); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.section--night .card { background: var(--c-night-2); border-color: var(--c-night-line); }
.section--night .card p { color: #C9C2D6; }

.icon-tile {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 20px;
  border-radius: 12px; background: var(--c-purple-soft); color: var(--c-purple);
}
.icon-tile svg { width: 22px; height: 22px; }
.section--night .icon-tile { background: rgba(255,255,255,.1); color: var(--c-white); }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Mobile swipe rows: horizontal scroll-snap under 720px */
@media (max-width: 719px) {
  .swipe {
    display: grid; grid-auto-flow: column; grid-auto-columns: 84%;
    gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { scroll-snap-align: start; }
}

/* Check list */
.checks { display: grid; gap: 12px; }
.checks li {
  position: relative; padding-left: 30px; color: var(--c-ink-soft);
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231E8A5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.section--night .checks li { color: #D8D2E3; }

/* Stars */
.stars { display: inline-flex; gap: 2px; color: var(--c-gold); }
.stars svg { width: 16px; height: 16px; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 28px; font-size: var(--t-small); color: var(--c-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--c-line); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-ink); text-decoration: underline; }

/* FAQ accordion */
.faq { border-top: 1px solid var(--c-line); }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.125rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--c-line);
  font-weight: 400; font-size: 1rem; transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 24px; max-width: 760px; color: var(--c-ink-soft); }

/* Prose (blog, legal, long-form) */
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--c-ink-soft); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.28rem, 1.04rem + 0.8vw, 1.68rem); color: var(--c-ink); }
.prose h3 { margin-top: 1.6em; color: var(--c-ink); }
.prose a { color: var(--c-purple); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--c-ink); }
.prose blockquote {
  padding: 20px 24px; border-left: 3px solid var(--c-purple);
  background: var(--c-purple-soft); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--c-ink);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--c-line); text-align: left; }
.prose th { color: var(--c-ink); }
.prose .stat-callout {
  padding: 24px 28px; border-radius: var(--r-lg); background: var(--c-night); color: var(--c-white);
}
.prose .stat-callout strong { display: block; font-size: 1.92rem; line-height: 1; color: var(--c-purple-glow); margin-bottom: 8px; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  padding: clamp(40px, 6vw, 80px);
  border-radius: var(--r-xl);
  background: var(--c-purple); color: var(--c-white);
}
.cta-band::before {
  content: ""; position: absolute; inset: auto -20% -60% auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(139,92,246,.7), transparent);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { max-width: 760px; }
.cta-band p { max-width: 620px; margin-top: 16px; color: #EDE6F8; font-size: var(--t-lead); }
.cta-band .actions { margin-top: 32px; }

/* Reveal on scroll (progressive: only hidden once JS marks the page) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Short customer cases (case-card.njk) */
.case { display: flex; flex-direction: column; gap: 6px; }
.case__logo {
  display: grid; place-items: center; height: 72px; margin-bottom: 14px;
  border-radius: var(--r-md); background: var(--c-paper);
}
.case__logo--dark { background: var(--c-ink); }
.case__logo img { max-width: 140px; max-height: 44px; width: auto; height: auto; object-fit: contain; }
.case__logo span { font-weight: 600; color: var(--c-ink); }
.case__meta { font-size: var(--t-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-purple); }
.case__name { font-size: 1rem; }
.case__figures { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--c-ink-soft) !important; }
.case__figures strong { font-size: 1.44rem; font-weight: 600; letter-spacing: -.02em; color: var(--c-ink); }
.case__rating { font-weight: 600; color: var(--c-ink); }
.case__rating::first-letter { color: var(--c-gold); }
.case__growth { font-size: var(--t-small); color: var(--c-muted) !important; }
.cases { display: grid; gap: 16px; }
@media (min-width: 720px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cases { grid-template-columns: repeat(4, 1fr); } }
.cases__note { margin-top: 18px; font-size: var(--t-small); color: var(--c-muted); }

/* Reviews-in-AI statement */
.ai-claim { margin-top: 28px; padding: 18px 22px; border-left: 3px solid var(--c-purple); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--c-purple-soft); color: var(--c-ink-soft); }
.ai-claim strong { color: var(--c-ink); }
.ai-claim a { color: var(--c-purple); text-underline-offset: 3px; }
.section--night .ai-claim { background: rgba(255,255,255,.07); border-left-color: var(--c-white); color: #D9D2E6; }
.section--night .ai-claim strong, .section--night .ai-claim a { color: var(--c-white); }
