/* ============================================
   SPEND MATTERS SOLUTIONS
   Inspired by bridge.surf editorial aesthetic
   Instrument Serif + Geist · Light · Clean
   ============================================ */

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

:root {
  --ink:     #0d0d0d;
  --ink-2:   #444;
  --ink-3:   #888;
  --bg:      #f5f4f0;
  --surface: #ffffff;
  --border:  rgba(0,0,0,0.09);
  --blue:    #1746c8;
  --violet:  #5b21b6;
  --teal:    #0a7c6e;
  --r: 24px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* ---- AMBIENT ---- */
.ambient { position:fixed; inset:0; z-index:-1; pointer-events:none; }
.orb {
  position:absolute; border-radius:50%;
  filter:blur(100px); opacity:.55;
}
.orb.a { width:500px;height:500px;background:rgba(23,70,200,.10);top:-160px;left:-160px; }
.orb.b { width:420px;height:420px;background:rgba(91,33,182,.08);right:-120px;top:40%; }
.orb.c { width:360px;height:360px;background:rgba(10,124,110,.07);bottom:-100px;left:35%; }

/* ---- UTILS ---- */
.wrap { width:min(1160px,92%); margin:auto; }

/* ---- REVEAL ---- */
[data-reveal] { opacity:0; transform:translateY(24px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1); }
[data-reveal].in { opacity:1; transform:none; }
[data-d="1"] { transition-delay:.08s; }
[data-d="2"] { transition-delay:.16s; }
[data-d="3"] { transition-delay:.24s; }
[data-d="4"] { transition-delay:.32s; }

/* ---- HEADER ---- */
header {
  position:fixed; width:100%; top:0; z-index:900;
  backdrop-filter:blur(16px) saturate(1.4);
  -webkit-backdrop-filter:blur(16px) saturate(1.4);
  background:rgba(245,244,240,.78);
  border-bottom:1px solid var(--border);
  transition:box-shadow .25s;
}
header.sh { box-shadow:0 2px 16px rgba(0,0,0,.06); }

.nav-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:15px 0; gap:16px;
}

.brand {
  display:flex; align-items:center; gap:9px;
  text-decoration:none; color:var(--ink);
  font-size:15px; font-weight:600; letter-spacing:-.2px;
  flex-shrink:0;
}

.desktop-nav { display:flex; gap:2px; }
.desktop-nav a {
  text-decoration:none; color:var(--ink-2);
  font-size:14px; font-weight:400;
  padding:7px 13px; border-radius:100px;
  transition:background .15s, color .15s;
}
.desktop-nav a:hover { background:rgba(0,0,0,.06); color:var(--ink); }

.pill-btn {
  text-decoration:none; background:var(--ink); color:#fff;
  font-size:13px; font-weight:500;
  padding:9px 18px; border-radius:100px;
  transition:opacity .2s;
  white-space:nowrap; flex-shrink:0;
}
.pill-btn:hover { opacity:.75; }

.burger {
  display:none; flex-direction:column; gap:5px;
  background:none; border:none; cursor:pointer; padding:4px;
}
.burger span { display:block; width:20px;height:1.5px;background:var(--ink);border-radius:2px;transition:.3s; }
.burger.open span:first-child { transform:rotate(45deg) translate(4.5px,4.5px); }
.burger.open span:last-child  { transform:rotate(-45deg) translate(4.5px,-4.5px); }

.mob-nav {
  display:none; flex-direction:column;
  border-top:1px solid var(--border); padding:10px 0 16px;
}
.mob-nav.open { display:flex; }
.mob-nav a {
  text-decoration:none; color:var(--ink); font-size:15px;
  padding:11px 20px; transition:background .15s;
}
.mob-nav a:hover { background:rgba(0,0,0,.04); }

/* ---- BUTTONS ---- */
.btn-dark {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--ink); color:#fff;
  text-decoration:none; font-size:14px; font-weight:500;
  padding:13px 24px; border-radius:100px;
  transition:opacity .2s, transform .2s;
}
.btn-dark:hover { opacity:.8; transform:translateY(-1px); }
.btn-dark.big { font-size:15px; padding:15px 28px; }

.btn-outline {
  display:inline-flex; align-items:center;
  background:#fff; color:var(--ink);
  text-decoration:none; font-size:14px; font-weight:400;
  padding:13px 24px; border-radius:100px;
  border:1px solid var(--border);
  transition:border-color .2s, transform .2s, box-shadow .2s;
}
.btn-outline:hover { border-color:rgba(0,0,0,.2); transform:translateY(-1px); box-shadow:0 4px 16px rgba(0,0,0,.06); }

/* ---- HERO ---- */
.hero {
  min-height:100vh; display:flex; align-items:center;
  padding:130px 0 80px;
}

.hero-layout {
  display:grid; grid-template-columns:1fr 1fr;
  gap:72px; align-items:center;
}

.eyebrow {
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px; font-weight:500; letter-spacing:.06em;
  color:var(--ink-2); border:1px solid var(--border);
  background:#fff; padding:6px 13px; border-radius:100px;
  margin-bottom:28px;
}
.pulse-dot {
  width:6px;height:6px;border-radius:50%;background:#1746c8;
  animation:pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.6)} }

/* THE KEY FIX: Instrument Serif for display — natural proportions, no stretch */
.hero-copy h1 {
  font-family:'Instrument Serif', Georgia, serif;
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 400;           /* Serif at 400 looks naturally bold */
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 22px;
}

/* Italic = the gradient accent word */
.hero-copy h1 em {
  font-style:italic;
  background:linear-gradient(120deg,#1746c8,#5b21b6);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

.hero-copy > p {
  font-size:16px; line-height:1.75;
  color:var(--ink-2); max-width:440px;
  margin-bottom:32px;
}

.cta-group { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:44px; }

.stats-strip {
  display:flex; align-items:center;
  background:#fff; border:1px solid var(--border);
  border-radius:20px; padding:18px 26px;
  width:fit-content; gap:0;
}
.stat { padding:0 20px; text-align:center; }
.stat strong {
  display:block;
  font-family:'Instrument Serif',serif;
  font-size:28px; font-weight:400;
  letter-spacing:-.5px; color:var(--ink);
  line-height:1;
}
.stat span { font-size:12px; color:var(--ink-3); margin-top:4px; display:block; }
.sdiv { width:1px;height:36px;background:var(--border);flex-shrink:0; }

/* ---- 3D CAROUSEL ---- */
.stage {
  position:relative;
  display:flex; flex-direction:column;
  align-items:center;
  perspective:1200px;
  padding:30px 40px 16px;
}

.deck {
  position:relative;
  width:320px; height:400px;
  transform-style:preserve-3d;
}

.kard {
  position:absolute; inset:0;
  border-radius:28px;
  padding:36px;
  display:flex; flex-direction:column;
  overflow:hidden;
  cursor:pointer;
  transition:transform .65s cubic-bezier(.34,1.2,.64,1), opacity .5s ease;
  box-shadow: 0 24px 60px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.2);
}

/* State classes */
.kard.s-active { transform:rotateY(0deg) translateZ(0) scale(1); opacity:1; z-index:10; }
.kard.s-next   { transform:rotateY(-42deg) translateX(200px) translateZ(-100px) scale(0.86); opacity:.65; z-index:5; }
.kard.s-prev   { transform:rotateY(42deg) translateX(-200px) translateZ(-100px) scale(0.86); opacity:.65; z-index:5; }
.kard.s-back   { transform:translateZ(-280px) scale(0.6); opacity:0; z-index:1; }

.kard::before {
  content:''; position:absolute; top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);
}

.kard-blue   { background:linear-gradient(145deg,#1338a8,#1746c8,#1e56e0); }
.kard-violet { background:linear-gradient(145deg,#3b1476,#5b21b6,#6d28d9); }
.kard-teal   { background:linear-gradient(145deg,#065e52,#0a7c6e,#0d9488); }

.kard-label {
  font-size:11px; font-weight:500; letter-spacing:.07em;
  color:rgba(255,255,255,.65);
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  padding:5px 11px; border-radius:100px;
  width:fit-content; margin-bottom:28px;
}

.kard-val {
  font-family:'Instrument Serif',serif;
  font-size:72px; font-weight:400;
  color:#fff; line-height:.95;
  letter-spacing:-2px; margin-bottom:10px;
}

.kard-sub {
  font-size:14px; color:rgba(255,255,255,.7);
  line-height:1.5; flex:1;
}

.kard-pill {
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:500; color:rgba(255,255,255,.85);
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  padding:5px 12px; border-radius:100px;
  width:fit-content; margin-top:24px;
}

/* Wave */
.kard-wave {
  position:absolute; bottom:80px; left:0; right:0; height:60px;
  width:100%; opacity:.7;
}

/* Dots grid */
.kard-dots {
  display:grid; grid-template-columns:repeat(3,1fr);
  gap:9px; margin-top:auto; margin-bottom:14px;
}
.kard-dots span {
  width:10px;height:10px;border-radius:50%;
  background:rgba(255,255,255,.22);
}
.kard-dots span.on { background:rgba(255,255,255,.72); }

/* Bars */
.kard-bars {
  display:flex; align-items:flex-end; gap:6px;
  height:56px; margin-top:auto; margin-bottom:14px;
}
.kard-bars span {
  flex:1; height:var(--h);
  background:rgba(255,255,255,.28);
  border-radius:3px;
}
.kard-bars span:last-child { background:rgba(255,255,255,.82); }

/* Arrows */
.arr {
  position:absolute; top:48%; transform:translateY(-50%);
  width:38px;height:38px; border-radius:50%;
  background:#fff; border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer; color:var(--ink);
  box-shadow:0 2px 10px rgba(0,0,0,.07);
  transition:transform .2s, box-shadow .2s; z-index:20;
}
.arr:hover { box-shadow:0 6px 20px rgba(0,0,0,.1); transform:translateY(calc(-50% - 1px)); }
.arr-l { left:-14px; }
.arr-r { right:-14px; }

/* Dots nav */
.dot-row { display:flex;gap:7px;margin-top:22px; }
.dot {
  width:7px;height:7px;border-radius:100px;
  background:rgba(0,0,0,.18); border:none; cursor:pointer;
  padding:0; transition:width .3s, background .3s;
}
.dot.on { width:22px; background:var(--blue); }

/* ---- SERVICES ---- */
.services { padding:120px 0; }

.sec-head {
  text-align:center; max-width:520px; margin:0 auto 56px;
}
.tag {
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:500; letter-spacing:.1em;
  color:var(--blue); background:rgba(23,70,200,.07);
  border:1px solid rgba(23,70,200,.15);
  padding:5px 13px; border-radius:100px;
  margin-bottom:18px;
}
.sec-head h2, .why-left h2, .footer-cta h2 {
  font-family:'Instrument Serif',serif;
  font-size:clamp(30px,4vw,50px);
  font-weight:400; line-height:1.12;
  letter-spacing:-.5px; margin-bottom:14px;
}
.sec-head h2 em, .why-left h2 em, .footer-cta h2 em {
  font-style:italic;
  background:linear-gradient(120deg,#1746c8,#5b21b6);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.sec-head p { font-size:15px; color:var(--ink-2); line-height:1.7; }

.srv-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.scard {
  background:#fff; border:1px solid var(--border);
  border-radius:28px; padding:36px;
  display:flex; flex-direction:column;
  transition:transform .25s, box-shadow .25s;
  position:relative; overflow:hidden;
}
.scard:hover { transform:translateY(-4px); box-shadow:0 16px 48px rgba(0,0,0,.07); }

.scard.featured {
  background:var(--ink); color:#fff; border-color:transparent;
}
.scard.featured p { color:rgba(255,255,255,.65); }
.scard.featured .snum { color:rgba(255,255,255,.08); }
.scard.featured .slink { color:rgba(255,255,255,.7); }

.snum {
  font-family:'Instrument Serif',serif;
  font-size:52px; font-weight:400;
  color:rgba(0,0,0,.05); line-height:1;
  margin-bottom:-8px;
}

.sico {
  width:48px;height:48px;border-radius:14px;
  background:rgba(0,0,0,.05);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;
}
.sico.white { background:rgba(255,255,255,.12); }

.scard h3 {
  font-family:'Instrument Serif',serif;
  font-size:22px; font-weight:400;
  letter-spacing:-.2px; margin-bottom:10px;
}

.scard p {
  font-size:14px; color:var(--ink-2);
  line-height:1.7; flex:1; margin-bottom:28px;
}

.slink {
  font-size:13px; color:var(--blue); font-weight:500;
}
.slink.white { color:rgba(255,255,255,.7); }

/* ---- WHY ---- */
.why {
  padding:100px 0 120px;
  background:#fff;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

.why-layout {
  display:grid; grid-template-columns:1fr 1fr;
  gap:80px; align-items:center;
}

.why-left p {
  font-size:15px; color:var(--ink-2); line-height:1.75;
  max-width:380px;
}

.why-right { display:flex;flex-direction:column;gap:14px; }

.wpill {
  display:flex; align-items:flex-start; gap:14px;
  background:var(--bg); border:1px solid var(--border);
  border-radius:18px; padding:20px;
  transition:transform .2s, box-shadow .2s, background .2s;
}
.wpill:hover { background:#fff; transform:translateY(-2px); box-shadow:0 8px 28px rgba(0,0,0,.06); }

.wico {
  width:36px;height:36px;flex-shrink:0;border-radius:10px;
  background:rgba(23,70,200,.08);
  display:flex;align-items:center;justify-content:center;
  color:var(--blue);
}

.wpill h4 {
  font-size:14px;font-weight:600;
  margin-bottom:4px; color:var(--ink);
}
.wpill p { font-size:13px; color:var(--ink-2); line-height:1.6; }

/* ---- FOOTER ---- */
footer { padding:100px 0 40px; }

.footer-cta {
  text-align:center;
  padding-bottom:72px;
  border-bottom:1px solid var(--border);
  margin-bottom:36px;
}
.footer-cta p {
  font-size:15px; color:var(--ink-2); max-width:380px;
  margin:0 auto; line-height:1.7;
}

.footer-bar {
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:16px;
}
.brand.small {
  display:flex;align-items:center;gap:9px;
  text-decoration:none;
}
.bn { display:block;font-size:14px;font-weight:600;color:var(--ink); }
.bs { display:block;font-size:12px;color:var(--ink-3);margin-top:2px; }
.copy { font-size:12px; color:var(--ink-3); }

/* ---- RESPONSIVE ---- */
@media(max-width:1024px){
  .hero-layout { grid-template-columns:1fr; gap:56px; text-align:center; }
  .hero-copy > p { max-width:100%; margin:0 auto 32px; }
  .cta-group { justify-content:center; }
  .stats-strip { margin:0 auto; }
  .eyebrow { margin:0 auto 28px; }
  .stage { margin:0 auto; }
  .srv-grid { grid-template-columns:1fr; max-width:420px; margin:0 auto; }
  .why-layout { grid-template-columns:1fr; gap:48px; }
  .why-left p { max-width:100%; }
}

@media(max-width:768px){
  .desktop-nav,.pill-btn { display:none; }
  .burger { display:flex; }
  .hero { padding-top:96px; }
  .deck { width:280px;height:360px; }
  .kard-val { font-size:58px; }
  .kard { padding:28px; }
}

@media(max-width:480px){
  .stats-strip { flex-direction:column;gap:16px;padding:20px;width:100%; }
  .sdiv { width:100%;height:1px; }
  .stat { padding:0; }
  .deck { width:260px; height:330px; }
  .kard-val { font-size:50px; }
}
