/* =========================================================
   Base
   Design tokens, reset, typography, buttons, colour tones, shared animations
   ========================================================= */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --line: #e4e7ec;
  --line-2: #d6dbe2;
  --text: #262e36;
  --text-2: #4b5563;
  --text-3: #677083;
  --slate: #262e36;
  --brand: #1d5fd6;
  --brand-600: #174fb6;
  --brand-50: #edf3fe;
  --green: #16a34a;
  --amber: #d97706;
  --ink: #262e36;
  --ink-2: #2e3742;
  --ink-line: rgba(255,255,255,.08);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --brandfont: "Saira", var(--font);

  --frame: 1200px;
  --pad: clamp(20px, 4.6vw, 56px);
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(13,17,23,.05);
  --shadow: 0 1px 2px rgba(13,17,23,.04), 0 8px 24px -12px rgba(13,17,23,.12);
  --shadow-lg: 0 2px 4px rgba(13,17,23,.04), 0 24px 60px -24px rgba(13,17,23,.25), 0 60px 120px -60px rgba(29,95,214,.25);
  --ease: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; }
ul, ol { list-style: none; }
.i { width: 16px; height: 16px; flex-shrink: 0; }
.i.flip { transform: scaleX(-1); }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; color: var(--text); }
h2 { font-size: clamp(32px, 4.2vw, 52px); letter-spacing: -0.035em; }
h3 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; }


/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(13,17,23,.2), 0 6px 16px -6px rgba(29,95,214,.6); }
.btn-primary:hover { background: var(--brand-600); }
.btn-primary .i { transition: transform .25s var(--ease); }
.btn-primary:hover .i { transform: translateX(2px); }
.btn-dark { background: var(--text); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(13,17,23,.3); }
.btn-dark:hover { background: #1c232a; }
.btn-outline { background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #b9c0cb; }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }


/* ---------- Colour tones (shared by service cards and project cards) ----------
   --glow-y moves the glow; --dots-mask shapes the dot grid on light cards. */
.tone-dark { background: #262e36; color: #fff; box-shadow: 0 30px 60px -30px rgba(10,14,22,.6); }
.tone-dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 55% at 50% var(--glow-y, 100%), rgba(41,98,255,.30), transparent 70%), radial-gradient(ellipse 50% 40% at 100% 0%, rgba(41,98,255,.12), transparent 70%); }
.tone-blue { background: linear-gradient(160deg, #2463ea 0%, #1546c2 55%, #0f36a3 100%); color: #fff; box-shadow: 0 30px 60px -30px rgba(21,70,194,.6); }
.tone-blue::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 50% at 50% var(--glow-y, 100%), rgba(120,170,255,.45), transparent 70%); }
.tone-light { background: #eceff4; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tone-light::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle, rgba(13,17,23,.09) 1px, transparent 1.3px); background-size: 18px 18px;
  -webkit-mask-image: var(--dots-mask, linear-gradient(180deg, transparent 30%, #000)); mask-image: var(--dots-mask, linear-gradient(180deg, transparent 30%, #000)); }

/* ---------- Shared animations ---------- */
@keyframes ping { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Visually hidden (spam trap, screen-reader text) ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Rendering performance: skip work for cards that are off screen ---------- */
.svc, .wcard, .step, .plan, .vcaps-grid li, .stage { content-visibility: auto; contain-intrinsic-size: auto 520px; }
.stage { contain-intrinsic-size: auto 660px; }
.step, .plan, .vcaps-grid li { contain-intrinsic-size: auto 260px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
