/* =========================================================
   Theme Tokens
   - Color palette, spacing, radii, transitions
   ========================================================= */
:root{
  --brand-600:#3556ff; --brand-700:#2645e6; --brand-900:#0d1a5b;
  --ink-900:#0e1220; --ink-700:#2c344a; --ink-500:#5d6785; --ink-300:#9aa3ba; --ink-100:#e6e9f2;
  /* Light theme base: very light blue instead of plain white */
  --bg:#f9fbff; /* EDIT ME: light background hue */
  --bg-muted:#f2f7ff; /* EDIT ME: subtle section background */
  --radius:16px; --shadow:0 10px 30px rgba(0,0,0,.08);
  --space-1:6px; --space-2:10px; --space-3:16px; --space-4:24px; --space-5:36px; --space-6:56px; --space-7:84px;
  --transition-bg: background-color .25s ease, color .25s ease;
}

html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;margin:0;color:var(--ink-900);background:var(--bg);transition:var(--transition-bg)}
.container{max-width:1200px;margin:auto;padding:0 var(--space-4)}
/* Prevent in-page anchors from being hidden under sticky header */
h1[id], h2[id], h3[id], h4[id], section[id]{scroll-margin-top:80px}

/* =========================================================
   Navbar
   - Brand, links, dropdown
   ========================================================= */
.navbar{position:sticky;top:0;background:rgba(249,251,255,.8);backdrop-filter:blur(10px) saturate(1.2);border-bottom:1px solid var(--ink-100);z-index:50}
.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;height:64px}
.nav-brand{font-weight:800;color:var(--brand-900);text-decoration:none;font-size:clamp(1.25rem, 2.6vw, 1.75rem);line-height:1}
.nav-links{display:flex;gap:18px;align-items:center}
.nav-links a{color:var(--ink-700);text-decoration:none}
.nav-links a.active{color:var(--brand-700);font-weight:600}
/* services dropdown */
.nav-dropdown{position:relative}
.nav-dropdown > a{display:inline-flex;align-items:center;gap:6px}
.nav-dropdown > a .caret{border:solid currentColor;border-width:0 2px 2px 0;display:inline-block;padding:3px;transform:rotate(45deg);margin-top:2px}
.nav-dropdown .menu{position:absolute;top:100%;left:0;min-width:220px;background:var(--bg);border:1px solid var(--ink-100);border-radius:12px;box-shadow:var(--shadow);padding:8px;margin-top:8px;display:none}
.nav-dropdown .menu::before{content:"";position:absolute;left:0;right:0;top:-8px;height:8px}
.nav-dropdown .menu a{display:block;padding:10px 12px;border-radius:8px;color:var(--ink-700)}
.nav-dropdown .menu a:hover,.nav-dropdown .menu a:focus-visible{background:var(--bg-muted);color:var(--ink-900)}
.nav-dropdown:hover .menu,.nav-dropdown:focus-within .menu,.nav-dropdown[aria-expanded="true"] .menu{display:block}

/* Button visited state should not change color */
.btn:visited{color:inherit}

/* =============================================
   Mobile Navbar Fixes (no desktop changes)
   - Prevent cut off by allowing wrap + auto height
   - Keep contact button and theme toggle visible
   ============================================= */
@media(max-width:720px){
  .nav-inner{height:auto;min-height:64px;padding:8px var(--space-4);gap:12px;flex-wrap:wrap}
  .nav-brand{margin-right:auto}
  .nav-links{flex-wrap:wrap;width:100%;justify-content:flex-start;gap:10px 12px}
  .nav-links a{padding:6px 0}
  .nav-links .btn{padding:10px 14px}
}
@media(max-width:420px){
  .icon-btn{width:36px;height:36px}
  .nav-inner{gap:10px}
  .nav-links{gap:8px 10px}
  .btn{padding:10px 14px}
}

/* Service card title links */
.card h3 a{color:inherit;text-decoration:none}
.card h3 a:hover,.card h3 a:focus-visible{color:var(--brand-700)}

/* =========================================================
   Buttons
   - Primary, outline, theme-aware, icon button
   ========================================================= */
.btn{display:inline-block;padding:12px 18px;border-radius:12px;font-weight:600;text-decoration:none;position:relative;overflow:hidden;
  transition:background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .08s ease}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0) scale(.98)}
.btn-primary{background:linear-gradient(90deg,var(--brand-600),var(--brand-700));background-size:200% 100%;color:#fff}
.btn-primary:hover,.btn-primary:focus-visible{background-position:100% 0;box-shadow:0 6px 18px rgba(53,86,255,.28)}
.btn-outline{border:1px solid var(--ink-100);color:var(--ink-900);background:#fff}
.btn-outline:hover,.btn-outline:focus-visible{border-color:var(--brand-600);box-shadow:0 6px 18px rgba(53,86,255,.18)}
/* theme-aware button that stays light on light, dark on dark */
.btn-theme{border:1px solid var(--ink-100);background:#fff;color:var(--ink-900)}
.btn-theme:hover,.btn-theme:focus-visible{border-color:var(--brand-600);box-shadow:0 6px 18px rgba(53,86,255,.18)}

/* =========================================================
   Layout
   - Sections, grids, hero, typography
   ========================================================= */
.section{padding:var(--space-7) 0}
.section-muted{background:var(--bg-muted)}
.grid{display:grid;gap:28px}
.grid.columns-3{grid-template-columns:1fr}
@media(min-width:800px){.grid.columns-3{grid-template-columns:repeat(3,1fr)}}
.grid.cols{grid-template-columns:1fr}
@media(min-width:900px){.grid.cols{grid-template-columns:1.1fr .9fr;align-items:center}}
.hero{display:grid;gap:32px;align-items:center}
@media(min-width:900px){.hero{grid-template-columns:1.1fr .9fr}}
h1{font-size:clamp(32px,4vw,56px);line-height:1.06;letter-spacing:-.02em;margin:0 0 12px}
h2{font-size:clamp(24px,3vw,36px);line-height:1.12;margin:0 0 12px}
p.lead{font-size:1.15rem;color:var(--ink-700);max-width:70ch}

/* =========================================================
   Cards & Lists
   ========================================================= */
.card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);transition:transform .18s ease, box-shadow .18s ease}
.card:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(0,0,0,.12)}
.card-inner{padding:22px}
.card h3{margin:4px 0 8px}
.media{overflow:hidden;border-radius:var(--radius)}
.media img{width:100%;display:block}
.cards{display:grid;gap:24px}
@media(min-width:800px){.cards{grid-template-columns:repeat(3,1fr)}}
.pill{font-size:.8rem;color:var(--brand-700);background:#eef1ff;padding:6px 10px;border-radius:999px;display:inline-block;border:0}
/* Dark-mode pill contrast */
[data-theme="dark"] .pill{background:rgba(107,133,255,.16);color:var(--brand-700);border:1px solid #2f3c5a}
.list{margin:12px 0 0;padding:0;list-style:none}
.list li{display:flex;gap:10px;margin:10px 0;color:var(--ink-700);align-items:center}
.check{width:20px;height:20px;border-radius:6px;background:var(--brand-600);display:inline-flex;align-items:center;justify-content:center;color:#fff}
.check svg{width:14px;height:14px;fill:#fff;display:block}

/* =========================================================
   Proof stats (optional)
   ========================================================= */
.proof{display:grid;gap:18px;grid-template-columns:repeat(2,1fr)}
@media(min-width:800px){.proof{grid-template-columns:repeat(4,1fr)}}
.stat{background:#fff;border-radius:14px;padding:18px;text-align:center;border:1px solid var(--ink-100)}
.stat b{font-size:1.4rem}

/* =========================================================
   Footer
   ========================================================= */
footer{padding:40px 0;border-top:1px solid var(--ink-100);color:var(--ink-500)}
footer a{color:var(--ink-700);text-decoration:none;margin-right:14px}

/* =========================================================
   Reveal animations
   ========================================================= */
/* Section/card fade-in */
.reveal{opacity:0;transform:translateY(12px);transition:opacity .5s ease, transform .5s ease;will-change:opacity,transform}
.reveal.show{opacity:1;transform:translateY(0)}

/* =========================================================
   Subtle parallax backdrop
   ========================================================= */
.parallax{position:relative;isolation:isolate;overflow:hidden}
.parallax::after{content:"";position:absolute;inset:-10%;background:
  radial-gradient(60% 60% at 80% 10%, rgba(53,86,255,.18), transparent 60%),
  radial-gradient(40% 40% at 10% 70%, rgba(13,26,91,.12), transparent 60%);
  z-index:-1;transform:translateY(var(--pY,0px));transition:transform .1s linear}

/* =========================================================
   Accessibility (a11y)
   ========================================================= */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:2px solid var(--brand-600);outline-offset:2px;border-radius:10px}

/* =========================================================
   Icon Button + Theme Icons
   ========================================================= */
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--ink-100);background:#fff;color:var(--ink-900);cursor:pointer;position:relative;overflow:hidden;transition:border-color .25s ease, background-color .25s ease, transform .08s ease}
.icon-btn:hover{border-color:var(--brand-600);background:var(--bg-muted);transform:translateY(-1px)}
.icon-btn:active{transform:translateY(0) scale(.98)}
.icon{width:18px;height:18px;display:block}
/* For filled icons (e.g., moon) */
.icon-fill path, .icon-fill circle, .icon-fill rect { fill: currentColor }
/* For stroked icons (e.g., sun) */
.icon-stroke *, .icon-stroke path, .icon-stroke circle, .icon-stroke line { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.icon-sun{display:none}
[data-theme="dark"] .icon-sun{display:block}
[data-theme="dark"] .icon-moon{display:none}

/* =========================================================
   Dark Theme Overrides
   ========================================================= */
[data-theme="dark"]{--bg:#0b0f1a;--bg-muted:#0f1526;--ink-900:#eef1f7;--ink-700:#c2c8d8;--ink-500:#9aa3ba;--ink-300:#7b86a5;--ink-100:#24304a;--brand-600:#6b85ff;--brand-700:#94a5ff;--brand-900:#cfd6ff}
[data-theme="dark"] .card,[data-theme="dark"] .stat{background:#0f1526;border-color:#24304a}
[data-theme="dark"] .navbar{background:rgba(11,15,26,.7);border-bottom-color:#24304a}
[data-theme="dark"] .btn-outline{background:#121a2b;color:var(--ink-900);border-color:#24304a}
[data-theme="dark"] .btn-outline:hover,[data-theme="dark"] .btn-outline:focus-visible{background:#19233a;border-color:#2f3c5a;box-shadow:0 6px 18px rgba(0,0,0,.35)}
[data-theme="dark"] .btn-theme{background:#121a2b;color:var(--ink-900);border-color:#24304a}
[data-theme="dark"] .btn-theme:hover,[data-theme="dark"] .btn-theme:focus-visible{background:#19233a;border-color:#2f3c5a;box-shadow:0 6px 18px rgba(0,0,0,.35)}
/* Dark mode: icon button uses dark background and light icon */
[data-theme="dark"] .icon-btn{background:#121a2b;color:var(--ink-900);border-color:#24304a}
[data-theme="dark"] .icon-btn:hover{background:#19233a;border-color:#2f3c5a}

/* =========================================================
   Button Ripple Effect
   ========================================================= */
.ripple{position:absolute;pointer-events:none;border-radius:999px;transform:translate(-50%,-50%) scale(0);opacity:.6;animation:ripple .6s ease-out;will-change:transform,opacity}
@keyframes ripple{to{transform:translate(-50%,-50%) scale(1);opacity:0}}

/* Pinwheel overlay removed per request */
