/* ==========================================================================
   Tofu Ai — Brand stylesheet
   "Thinking Outside the Framework"
   Deep-tech aesthetic · brand blue #006BFF · dark-forward + light bands
   ========================================================================== */

:root {
  /* Brand palette */
  --blue: #006BFF;          /* Tofu Blue — accent / CTA */
  --blue-600: #005AD6;      /* hover */
  --blue-400: #4D9BFF;      /* bright glow / particles */
  --blue-100: #EAF3FF;      /* Light Tofu Blue */
  --charcoal: #111111;      /* Deep Charcoal — text on light */
  --white: #FFFFFF;
  --gray-50: #F5F7FA;       /* Soft Gray */

  /* Dark surfaces (deep-tech) */
  --ink: #07080D;           /* base near-black */
  --ink-2: #0C0E16;         /* panel */
  --ink-3: #12141F;         /* raised card */
  --ink-line: rgba(255, 255, 255, 0.08);

  /* Text — tuned for stronger contrast (less "faded") */
  --on-dark: #F3F5FB;
  --on-dark-muted: #C2CADC;   /* brighter muted on dark */
  --on-light: #0E0E14;
  --on-light-muted: #3E4763;  /* darker muted on light = more contrast */
  --border-light: #E6EAF1;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  /* Rhythm */
  --radius: 16px;
  --radius-sm: 10px;
  --shell: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--on-light);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.04; margin: 0; letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--blue); color: #fff; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }

.display-xl { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 700; text-transform: uppercase; }
.display-lg { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; text-transform: uppercase; }
.display-md { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }

.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--on-light-muted); max-width: 60ch; }

/* Dark theme scope */
.dark { background: var(--ink); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--white); }
.dark .lead { color: var(--on-dark-muted); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: all .22s var(--ease);
  min-height: 48px; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .22s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px -8px rgba(0,107,255,.6); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(0,107,255,.7); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .95; }
.btn-ghost:hover { background: rgba(0,107,255,.08); border-color: var(--blue); color: var(--blue); }
.dark .btn-ghost { border-color: rgba(255,255,255,.28); color: #fff; }
.dark .btn-ghost:hover { background: rgba(0,107,255,.16); border-color: var(--blue-400); color: #fff; }

/* --------------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: transform .38s var(--ease), background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.header-hidden { transform: translateY(-100%); }
.site-header.scrolled {
  background: rgba(7, 8, 13, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--ink-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 11px; overflow: hidden;
  background-image: url("../assets/logo.png");
  background-repeat: no-repeat;
  /* focus the silver mark, crop wordmark + corner watermark */
  background-size: 168%;
  background-position: 50% 30%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  flex: none;
}
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.03em; color: #fff; }
.brand-word .ai { color: var(--blue-400); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--on-dark-muted);
  padding: 10px 14px; border-radius: 8px; transition: color .18s, background .18s; position: relative;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--blue); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* Mobile drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 70; background: rgba(7,8,13,.98);
  backdrop-filter: blur(8px); display: flex; flex-direction: column;
  padding: 26px 24px; transform: translateY(-100%); transition: transform .38s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu .mm-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; }
.mobile-menu nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; text-transform: uppercase;
  color: #fff; padding: 12px 0; border-bottom: 1px solid var(--ink-line);
}
.mobile-menu nav a .n { font-family: var(--font-mono); font-size: .8rem; color: var(--blue-400); margin-right: 14px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: var(--ink); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after { /* vignette + brand glow */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 72% 42%, rgba(0,107,255,.20), transparent 60%),
    radial-gradient(120% 90% at 50% 120%, rgba(0,0,0,.75), transparent 55%);
}
.hero .shell { position: relative; z-index: 2; }
.page-hero { position: relative; overflow: hidden; background: var(--ink); padding-top: 150px; padding-bottom: 88px; }
.page-hero .hero-canvas { opacity: .8; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 80% at 78% 10%, rgba(0,107,255,.18), transparent 60%);
}
.page-hero .shell { position: relative; z-index: 2; }

/* ============================================================
   Hero sloth mascot — replaces the particle globe on desktop.
   Two-column hero at >=1025px; sloth hidden (globe kept) below.
   Tune (all optional):
     --sloth-height  : how tall the sloth is
     --sloth-max-x   : max horizontal parallax drift
     --sloth-max-y   : max vertical parallax drift
     --sloth-rot     : max tilt in degrees
   Parallax runs on .hero-sloth-inner (a SEPARATE wrapper) so no
   existing transform is ever overwritten.
   ============================================================ */
.hero-shell { display: block; }
.hero-sloth { display: none; }                 /* mobile/tablet: hidden, globe stays */

@media (min-width: 860px) {
  .hero-shell { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
  .hero-shell .hero-panel { flex: 1 1 auto; min-width: 0; }
  .hero-sloth {
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 clamp(260px, 34vw, 500px);
    position: relative; pointer-events: none;
    --sloth-height: min(74vh, 620px);
    /* how strongly the sloth turns toward the cursor (stronger = looks more) */
    --sloth-max-x: 12px; --sloth-max-y: 8px; --sloth-rot: 1.4deg;
    /* scroll reactions */
    --sloth-scroll-rise: 26px; --sloth-scroll-rot: 2deg; --sloth-scroll-shrink: 0.04;
  }
  .hero-sloth::before {                         /* soft backlight so the sloth reads on dark */
    content: ""; position: absolute; inset: -8%; z-index: 0;
    background: radial-gradient(48% 46% at 52% 48%, rgba(0,107,255,.20), transparent 70%);
  }
  .hero-sloth::after {                          /* subtle ground shadow to anchor it */
    content: ""; position: absolute; left: 12%; right: 12%; bottom: 6%; height: 26px; z-index: 0;
    background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,.5), transparent 72%);
    filter: blur(6px);
  }
  .hero-sloth-inner {
    position: relative; z-index: 1; width: 100%;
    display: flex; align-items: center; justify-content: center;
    transform: translate3d(0,0,0); will-change: transform;
  }
  /* stage holds both sloth expressions + the phone overlays; it does the idle float */
  .sloth-stage {
    position: relative; display: inline-block; z-index: 1;
    animation: slothFloat 6.5s ease-in-out infinite;   /* gentle idle "breathing" */
    /* hotspot box (whole phone) — where the hover is detected */
    --phone-x: 69%; --phone-y: 33%; --phone-w: 23%; --phone-h: 27%;
    /* red recolor box — ONLY the phone's screen */
    --screen-x: 74.5%; --screen-y: 37%; --screen-w: 13.5%; --screen-h: 17%;
  }
  .sloth-stage img { height: var(--sloth-height); width: auto; max-width: 100%; display: block; object-fit: contain; filter: drop-shadow(0 34px 48px rgba(0,0,0,.55)); }
  .sloth-stage .sloth-base { transition: opacity .45s ease; }
  .sloth-stage .sloth-neutral { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
  /* cursor on the phone (+ no-smile asset): smile fades away */
  .sloth-stage.smile-swap.phone-active .sloth-base { opacity: 0; }
  .sloth-stage.smile-swap.phone-active .sloth-neutral { opacity: 1; }
  /* phone recolor on hover (hue-shift the blue screen -> warm) */
  .phone-tint {
    position: absolute; left: var(--screen-x); top: var(--screen-y);
    width: var(--screen-w); height: var(--screen-h); border-radius: 8px; z-index: 2;
    opacity: 0; transition: opacity .3s ease; pointer-events: none;
    background: #ff2b2b; mix-blend-mode: color;   /* recolors just the screen to red */
  }
  .sloth-stage.phone-active .phone-tint { opacity: 1; }
  /* invisible hotspot that receives the hover */
  .phone-hotspot {
    position: absolute; left: var(--phone-x); top: var(--phone-y);
    width: var(--phone-w); height: var(--phone-h); z-index: 3;
    pointer-events: auto; cursor: pointer; border-radius: 16px;
  }
  .hero > .hero-canvas { display: none; }        /* replace the globe on desktop */
}
@keyframes slothFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-sloth-inner { transform: none !important; }
  .hero-sloth img { animation: none !important; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.06);
  font-size: .8rem; color: var(--on-dark); margin-bottom: 26px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-400); box-shadow: 0 0 0 4px rgba(77,155,255,.18); }

/* ---- Hero copy container: plain, no box ---- */
.hero-panel { display: block; max-width: 820px; }
.hero-panel::before, .hero-panel::after { content: none; }

/* ---- Liquid glossy GLASS LETTERS (no background plate) ----
   White->blue gradient fill clipped to the text, a slow shine sweep across the
   glyphs, soft depth shadow, and a brighter glow on hover. Stays bright/legible. */
.hero h1, .page-hero h1 {
  display: block; position: relative; color: #EAF3FF; /* fallback */
  background-image: linear-gradient(100deg,
    #f2f7ff 0%, #dbe9ff 24%, #bcd4ff 48%,
    #e8f1ff 64%, #accdff 84%, #dfeaff 100%);
  background-size: 210% 100%; background-position: 0% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 1px rgba(0,0,0,.16);   /* subtle depth only — no glow/halo */
  transition: filter .3s var(--ease);
  animation: glassSweep 9s linear infinite;  /* calmer, slower shimmer */
  cursor: default;
}
@keyframes glassSweep { to { background-position: 260% 0; } }

/* keep the accent word inside the same glass fill */
.hero h1 .hl, .page-hero h1 .hl { -webkit-text-fill-color: transparent; color: inherit; text-shadow: none; }
.hl { color: #9BC8FF; }

/* ============================================================
   EFFECT 1 — Cursor-localized heading "flashlight" glow
   (replaces the old full-heading :hover glow)
   Tune here:
     --glow-radius : size of the illuminated pool (~80–120px)
     --glow-fade   : enter/leave opacity fade (~300–500ms)
   The glow is a JS-cloned copy of each hero <h1> (.heading-glow),
   masked to a radial pool that follows --mx/--my (set from JS).
   ============================================================ */
:root { --lens-size: 130px; --glow-fade: 400ms; }

/* Home headline uses a solid fill so its letters stay visible while they scatter on scroll */
.hero h1 {
  background: none;
  -webkit-text-fill-color: #e9f2ff; color: #e9f2ff;
  animation: none;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero h1 .hl { -webkit-text-fill-color: #9BC8FF; color: #9BC8FF; }
.scatter-ch { display: inline-block; will-change: transform, opacity; }

.heading-fx { position: relative; }

/* Liquid-refraction cursor: a soft glass water-droplet that glides over the
   letters and gently refracts (blurs + brightens) what's beneath it.
   Tune: --lens-size (droplet size), --glow-fade (fade in/out). */
.heading-lens {
  position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none;
  width: var(--lens-size); height: var(--lens-size);
  margin-left: calc(var(--lens-size) / -2); margin-top: calc(var(--lens-size) / -2);
  transform: translate(var(--mx, -9999px), var(--my, -9999px));
  border-radius: 50%;
  -webkit-backdrop-filter: blur(2.5px) brightness(1.16) saturate(1.18);
  backdrop-filter: blur(2.5px) brightness(1.16) saturate(1.18);
  background: radial-gradient(circle at 38% 30%, rgba(255,255,255,.30), rgba(255,255,255,.05) 44%, transparent 64%);
  box-shadow: inset 0 1px 10px rgba(255,255,255,.28), inset 0 -10px 16px rgba(0,80,200,.16);
  opacity: 0; transition: opacity var(--glow-fade) ease;
  will-change: transform, opacity;
  /* soft edge so there's no hard circle */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0,0,0,.5) 68%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0,0,0,.5) 68%, transparent 78%);
}
.heading-lens.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero h1, .page-hero h1 { animation: none; background-position: 32% 0; }
  .heading-lens { display: none; }
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.svc-grid { grid-template-columns: repeat(3, 1fr); }
.svc-card {
  position: relative; padding: 30px 26px; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--ink-line);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(120% 120% at 0% 0%, rgba(0,107,255,.16), transparent 55%);
}
.svc-card:hover { transform: translateY(-6px); border-color: rgba(0,107,255,.5); }
.svc-card:hover::before { opacity: 1; }
.svc-card .ic {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(0,107,255,.22), rgba(0,107,255,.05));
  border: 1px solid rgba(0,107,255,.35); color: var(--blue-400); margin-bottom: 20px; position: relative;
}
.svc-card .ic svg { width: 26px; height: 26px; }
.svc-card h3 { font-size: 1.22rem; color: #fff; margin-bottom: 10px; position: relative; }
.svc-card p { color: var(--on-dark-muted); font-size: .96rem; margin: 0; position: relative; }
.svc-card .num { position: absolute; top: 22px; right: 24px; font-family: var(--font-mono); font-size: .72rem; color: rgba(255,255,255,.5); }

/* Light card variant */
.card-light {
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 30px 26px;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card-light:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(17,17,17,.22); border-color: rgba(0,107,255,.4); }
.card-light .ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue); margin-bottom: 20px; }
.card-light .ic svg { width: 26px; height: 26px; }
.card-light h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card-light p { color: var(--on-light-muted); font-size: .96rem; margin: 0; }

/* Stat band */
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 8px 4px; }
.stat .fig { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--white); }
.stat .fig .u { color: var(--blue-400); }
.stat .lab { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); margin-top: 12px; }

/* Solutions / problems list */
.sol-grid { grid-template-columns: repeat(2, 1fr); }
.sol {
  display: flex; gap: 18px; padding: 26px; border-radius: var(--radius);
  background: var(--gray-50); border: 1px solid var(--border-light); transition: background .3s, transform .3s var(--ease);
}
.sol:hover { transform: translateY(-4px); background: var(--blue-100); }
.sol .k { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--blue); border: 1px solid var(--border-light); }
.sol .k svg { width: 24px; height: 24px; }
.sol h3 { font-size: 1.1rem; margin-bottom: 6px; }
.sol p { margin: 0; font-size: .93rem; color: var(--on-light-muted); }

/* Process steps */
.steps { grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.step { position: relative; padding-top: 28px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-size: .8rem; color: var(--blue); font-weight: 500;
}
.step .bar { height: 3px; background: linear-gradient(90deg, var(--blue), rgba(0,107,255,0)); border-radius: 3px; margin: 12px 0 16px; }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: .9rem; color: var(--on-light-muted); margin: 0; }

/* Tech / capabilities chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  font-family: var(--font-mono); font-size: .82rem; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--ink-line); background: rgba(255,255,255,.03); color: var(--on-dark);
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--blue); color: #fff; background: rgba(0,107,255,.12); }

/* Why / feature rows */
.why-grid { grid-template-columns: repeat(3, 1fr); }
.why { padding: 28px; border-radius: var(--radius); border: 1px solid var(--ink-line); background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.why .k { color: var(--blue-400); margin-bottom: 16px; } .why .k svg { width: 30px; height: 30px; }
.why h3 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }
.why p { color: var(--on-dark-muted); font-size: .94rem; margin: 0; }

/* Client / trust logos — clean light band so every logo reads well */
.client-band { background: var(--gray-50); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; align-items: stretch; }
.logo-cell {
  min-height: 118px; display: grid; place-items: center; padding: 22px;
  border: 1px solid var(--border-light); border-radius: 16px; background: #fff;
  transition: box-shadow .26s var(--ease), transform .26s var(--ease), border-color .26s;
}
.logo-cell:hover { transform: translateY(-4px); border-color: rgba(0,107,255,.35); box-shadow: 0 18px 38px -22px rgba(17,17,17,.3); }
.logo-cell img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; }
.cfallback { font-family: var(--font-mono); font-size: .8rem; color: var(--on-light-muted); text-align: center; }
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* Industries */
.ind-grid { grid-template-columns: repeat(3, 1fr); }
.ind { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 12px; border: 1px solid var(--border-light); background: #fff; transition: border-color .25s, transform .25s var(--ease); }
.ind:hover { border-color: var(--blue); transform: translateX(4px); }
.ind .k { color: var(--blue); } .ind .k svg { width: 24px; height: 24px; }
.ind span { font-weight: 600; font-size: .98rem; }

/* Case study cards */
.case-grid { grid-template-columns: repeat(2, 1fr); }
.case {
  position: relative; border-radius: var(--radius); overflow: hidden; padding: 34px 30px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: linear-gradient(160deg, #0d1b3d, #061027); border: 1px solid var(--ink-line);
  transition: transform .3s var(--ease);
}
.case:nth-child(2) { background: linear-gradient(160deg, #101a30, #06122b); }
.case:nth-child(3) { background: linear-gradient(160deg, #0a2540, #041018); }
.case:nth-child(4) { background: linear-gradient(160deg, #131a2e, #060a17); }
.case::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 85% 0%, rgba(0,107,255,.3), transparent 60%); opacity: .8; }
.case:hover { transform: translateY(-6px); }
.case > * { position: relative; }
.case .tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-400); margin-bottom: auto; }
.case h3 { font-size: 1.4rem; margin: 20px 0 10px; }
.case p { color: var(--on-dark-muted); font-size: .93rem; margin: 0 0 6px; }
.case .metric { margin-top: 16px; font-family: var(--font-mono); font-size: .82rem; color: #fff; }
.case .metric b { color: var(--blue-400); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 76px); background: linear-gradient(135deg, #003a8c, #006BFF); color: #fff; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 90% 10%, rgba(255,255,255,.22), transparent 55%); }
.cta-band > * { position: relative; }

/* Team */
.team-grid { grid-template-columns: repeat(4, 1fr); }
.member { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-light); background: #fff; }
.member .ph { position: relative; overflow: hidden; aspect-ratio: 1/1; background: linear-gradient(160deg, var(--blue-100), #dfeaff); display: grid; place-items: center; color: var(--blue); font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; }
.member .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member .info { padding: 18px 20px; }
.member .info h4 { font-size: 1.05rem; }
.member .info .role { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin-top: 4px; }

/* Insights / blog */
.post-grid { grid-template-columns: repeat(3, 1fr); }
.post { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-light); background: #fff; transition: transform .3s var(--ease), box-shadow .3s; display: flex; flex-direction: column; }
.post:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -26px rgba(17,17,17,.25); }
.post .cover { aspect-ratio: 16/10; background: linear-gradient(150deg, #0a1834, #06305f); position: relative; }
.post .cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 20% 20%, rgba(0,107,255,.4), transparent 60%); }
.post .body { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post .cat { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.post h3 { font-size: 1.14rem; }
.post .meta { margin-top: auto; font-size: .82rem; color: var(--on-light-muted); }

/* ---- Blog article (post.html) ---- */
.article-head .back { display: inline-block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .05em; color: var(--blue-400); margin-bottom: 18px; }
.article-head .article-meta { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em; color: var(--on-dark-muted); }
.article { max-width: 760px; margin-inline: auto; }
.post-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin: 0 0 34px; display: block; background: #0a1834; border: 1px solid var(--border-light); }
.article .back { display: inline-block; font-family: var(--font-mono); font-size: .8rem; color: var(--blue); }
.prose { font-size: 1.06rem; line-height: 1.75; color: #232d3b; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.15; margin: 42px 0 14px; color: var(--charcoal); }
.prose h3 { font-family: var(--font-display); font-size: 1.22rem; margin: 30px 0 10px; color: var(--charcoal); }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 26px; }
.prose li { margin: 7px 0; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--charcoal); font-weight: 600; }
.prose blockquote { margin: 26px 0; padding: 14px 24px; border-left: 3px solid var(--blue); background: var(--gray-50); border-radius: 0 12px 12px 0; color: #3a4453; font-style: italic; }
.prose blockquote p { margin: 0; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--gray-50); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: #0d1117; color: #e6edf3; padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 0 0 22px; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: .86rem; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; margin: 10px 0 24px; }
.prose hr { border: 0; height: 1px; background: var(--border-light); margin: 36px 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: .84rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: .96rem; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border-light); background: #fff; color: var(--on-light); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,107,255,.14); }
.form-note { font-size: .82rem; color: var(--on-light-muted); }
.contact-cards { display: grid; gap: 14px; }
.contact-cards a, .contact-cards div.ci { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--ink-line); background: rgba(255,255,255,.03); transition: border-color .2s, background .2s; }
.contact-cards a:hover { border-color: var(--blue); background: rgba(0,107,255,.1); }
.contact-cards .k { color: var(--blue-400); flex: none; } .contact-cards .k svg { width: 22px; height: 22px; }
.contact-cards .lab { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--on-dark-muted); }
.contact-cards .val { color: #fff; font-weight: 500; font-size: .96rem; word-break: break-word; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--on-dark); border-top: 1px solid var(--ink-line); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-block: 72px; }
.footer-brand p { color: var(--on-dark-muted); font-size: .94rem; max-width: 34ch; margin: 18px 0 22px; }
.footer-col h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 18px; }
.footer-col a { display: block; color: var(--on-dark); font-size: .93rem; padding: 6px 0; opacity: 1; transition: color .18s; }
.footer-col a:hover { color: var(--blue-400); opacity: 1; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--ink-line); color: var(--on-dark); transition: all .2s; }
.socials a:hover { border-color: var(--blue); color: #fff; background: rgba(0,107,255,.14); }
.socials svg { width: 19px; height: 19px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; border-top: 1px solid var(--ink-line); font-size: .84rem; color: var(--on-dark-muted); flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(30px) scale(.98); filter: blur(7px); transition: opacity .85s var(--ease), transform .85s var(--ease), filter .85s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* Scroll progress bar (injected by main.js) */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: linear-gradient(90deg, var(--blue), var(--blue-400));
  box-shadow: 0 0 12px rgba(0,107,255,.65); border-radius: 0 3px 3px 0;
  transition: width .08s linear; pointer-events: none;
}
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* Section heading block */
.head { max-width: 62ch; margin-bottom: 48px; }
.head.center { margin-inline: auto; text-align: center; }
.head h2 { margin: 16px 0 18px; }

/* Split two-col */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* Divider gradient line */
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--ink-line), transparent); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .svc-grid, .why-grid, .ind-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-desktop { display: none; }
  .nav-toggle { display: inline-flex !important; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .stat-grid, .sol-grid, .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .svc-grid, .why-grid, .ind-grid, .post-grid, .team-grid, .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .shell { padding-inline: 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .btn:hover { transform: none !important; }
  .scroll-progress { display: none; }
}

/* Accessibility */
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #111; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* --------------------------------------------------------------------------
   Base hardening — win over Tailwind Play CDN preflight regardless of the
   order its <style> is injected (html body beats a bare body selector).
   -------------------------------------------------------------------------- */
html body { font-family: var(--font-body); line-height: 1.6; color: var(--on-light); background: var(--white); }
html body.dark, html .dark { color: var(--on-dark); }
html body .display-xl, html body .display-lg, html body .display-md { font-family: var(--font-display); }
