/* ==========================================================================
   Digivolve Accountants - global.css
   Tokens, reset, base type, buttons, shared components, motion
   ========================================================================== */

:root {
  /* Brand palette - built around Digivolve brand blue #43B6FF, deep navy surfaces */
  --ink: #0B2A45;
  --ink-2: #123A5C;
  --ink-3: #07203A;
  --blue: #43B6FF;        /* brand blue - bright accent, used on dark or as fills */
  --blue-deep: #0E6FB8;   /* accessible blue for links and labels on light */
  --blue-deeper: #0B5C9C; /* hover */
  /* legacy accent names now resolve to the brand blue */
  --gold: var(--blue);
  --gold-deep: var(--blue-deep);
  --paper: #F5F4F0;
  --paper-2: #FCFBF7;
  --charcoal: #1E2A2E;
  --slate: #5E6A6B;
  --line: #E8E4DC;
  --line-soft: #F0ECE3;

  /* On dark surfaces */
  --on-ink: #ECF2F6;
  --on-ink-mute: #A4B6BD;
  --on-ink-line: rgba(236, 242, 246, 0.16);

  /* Type */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --edge: clamp(1.5rem, 6vw, 6rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------ Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* When Lenis smooth scroll is active, let it own the scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ------------------------------------------------------------------ Layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 880px; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.surface-ink { background: var(--ink); color: var(--on-ink); }
.surface-paper-2 { background: var(--paper-2); }

/* ------------------------------------------------------------------ Type */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 540; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
.surface-ink h1, .surface-ink h2, .surface-ink h3, .surface-ink h4 { color: var(--on-ink); }

.display { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 560; line-height: 1.04; letter-spacing: -0.02em; }
.h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -0.005em; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--slate); font-weight: 420; }
.surface-ink .lead { color: var(--on-ink-mute); }

.prose p { max-width: 62ch; }
.prose p + p { margin-top: 1.15em; }

/* Eyebrow with hairline hexagon mark */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-deep);
}
.surface-ink .eyebrow { color: var(--gold); }
.eyebrow::before {
  content: ""; width: 13px; height: 15px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M13 1 24 7.5v15L13 29 2 22.5v-15z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M13 1 24 7.5v15L13 29 2 22.5v-15z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Figures - tabular ledger numerals */
.figure { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.95rem 1.6rem; border-radius: var(--radius);
  border: 1px solid transparent; transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1em; height: 1em; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.surface-ink .btn-ghost { color: var(--on-ink); border-color: var(--on-ink-line); }
.surface-ink .btn-ghost:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 600; font-size: 0.95rem; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
  transition: gap 0.3s var(--ease), border-color 0.3s var(--ease);
}
.link-arrow:hover { gap: 0.8rem; border-color: var(--gold); }
.surface-ink .link-arrow { color: var(--on-ink); border-color: var(--on-ink-line); }
.surface-ink .link-arrow:hover { border-color: var(--gold); }

/* ------------------------------------------------------------------ Hairline rule */
.rule { height: 1px; background: var(--line); border: 0; }
.surface-ink .rule { background: var(--on-ink-line); }

/* ------------------------------------------------------------------ Section heading block */
.heading-block { max-width: 720px; }
.heading-block .eyebrow { margin-bottom: 1.1rem; }
.heading-block .lead { margin-top: 1.4rem; }

/* ------------------------------------------------------------------ Trust strip */
.trust { border-block: 1px solid var(--on-ink-line); }
.trust__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem); padding-block: 1.5rem;
}
.trust__item {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-ink-mute);
}
.trust__item strong { color: var(--gold); font-weight: 700; }

/* ------------------------------------------------------------------ CTA band */
.cta-band { text-align: center; }
.cta-band .h2 { max-width: 18ch; margin-inline: auto; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.2rem; }
.cta-band__meta { margin-top: 2.4rem; font-size: 0.9rem; color: var(--on-ink-mute); display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; justify-content: center; }
.cta-band__meta a { color: var(--on-ink); border-bottom: 1px solid var(--on-ink-line); padding-bottom: 1px; }
.cta-band__meta a:hover { border-color: var(--gold); }

@media (max-width: 560px) {
  .cta-band__actions { flex-direction: column; align-items: stretch; max-width: 340px; margin-inline: auto; }
  .cta-band__actions .btn { width: 100%; }
  .cta-band__meta { flex-direction: column; align-items: center; gap: 0.7rem; margin-top: 2rem; }
}

/* ------------------------------------------------------------------ Reveal motion
   Gated behind .js: if JavaScript does not run, content stays fully visible. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * { transition-delay: calc(var(--i, 0) * 80ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .line-reveal > span { transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------------ Focus */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------------ Skip link */
.skip {
  position: absolute; left: 1rem; top: -100%; z-index: 200;
  background: var(--ink); color: var(--on-ink); padding: 0.7rem 1.1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }