/* =========================================================
   EVOLUUT — design system
   Brand:
     · orange  #FF4B2B  (action, status, headline emphasis — loudest accent)
     · blue    #22D3EE  (technical/AI signal — sparing, never as 2nd loud color)
     · 70/15/10/5 — black · off-white & muted · orange · blue
   Type: Jost (display, matches wordmark) + Fraunces (italics) + JetBrains Mono (technical)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&family=JetBrains+Mono:wght@300;400;500&family=Jost:wght@200;300;400;500;600&display=swap');

:root {
  /* Surfaces */
  --bg: #050505;
  --bg-elevated: #0B0B0B;
  --bg-card: #111111;
  --bg-card-hover: #151515;
  --bg-card-soft: #151515;
  --border: #1a1a1a;
  --border-bright: #262626;
  --border-soft: rgba(245, 242, 237, 0.12);

  /* Type */
  --text: #F5F2ED;
  --text-dim: #B8B2A8;
  --text-faint: #77736D;

  /* Orange — primary action / energy / status */
  --orange: #FF4B2B;
  --orange-bright: #FF6A45;
  --orange-soft: #FF4B2B26;        /* translucent fill */
  --orange-glow: #FF4B2B14;
  --border-orange: rgba(255, 75, 43, 0.45);

  /* Electric blue — technical / AI / interface accents (sparing) */
  --blue: #22D3EE;
  --blue-soft: #38BDF8;
  --blue-tint: rgba(34, 211, 238, 0.10);
  --border-blue: rgba(34, 211, 238, 0.45);

  /* Brief-style aliases — use these names in new component CSS */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-elevated);
  --text-primary: var(--text);
  --text-secondary: var(--text-dim);
  --text-muted: var(--text-faint);
  --accent-orange: var(--orange);
  --accent-orange-soft: var(--orange-bright);
  --accent-blue: var(--blue);
  --accent-blue-soft: var(--blue-soft);

  --display: 'Jost', sans-serif;
  --serif:   'Fraunces', Georgia, serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;
  --sans:    'Jost', system-ui, sans-serif;

  --radius: 18px;
  --max-w: 1320px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
}
::selection { background: var(--orange); color: #000; }

/* Keyboard focus — electric-blue ring (accessibility) */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom cursor — soft orange glow that follows the mouse */
.cursor-glow {
  position: fixed;
  pointer-events: none;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}
body.cursor-active .cursor-glow { opacity: 1; }

/* Cursor dot + trailing ring (ported from prototype B). Elements are
   injected by site.js on fine-pointer devices only; CSS keeps them hidden
   everywhere else as a belt-and-braces. */
.cur-dot, .cur-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 900;
  border-radius: 50%;
  display: none;
}
.cur-dot { width: 6px; height: 6px; background: var(--orange); }
.cur-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 75, 43, 0.55);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s;
}
.cur-ring.is-hover { width: 64px; height: 64px; border-color: var(--blue); }
@media (hover: hover) and (pointer: fine) {
  .cur-dot, .cur-ring { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .cur-dot, .cur-ring { display: none !important; }
}

/* Scrub word reveal ([data-scrub-words], split by site.js). Words dim, then
   brighten as the block scrolls through view. Opacity (not color) so nested
   highlights like .hl keep their own hue in both themes.
   FALLBACK: the dimming only applies once site.js adds .sw-active to the block.
   If JS doesn't run — or the scroll handler never fires — the words stay
   full-strength and readable. That matters most on the lite theme, where a low
   opacity on the warm background is too faint to read, so its dimmed floor is
   also raised. */
[data-scrub-words] .sw-w { transition: opacity 0.3s linear; }
[data-scrub-words].sw-active .sw-w { opacity: 0.34; }
[data-scrub-words].sw-active .sw-w.on { opacity: 1; }
body.theme-lite [data-scrub-words].sw-active .sw-w { opacity: 0.5; }
body.theme-lite [data-scrub-words].sw-active .sw-w.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  [data-scrub-words].sw-active .sw-w { opacity: 1 !important; }
}

/* =========================================================
   NAV
   ========================================================= */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease-out),
              backdrop-filter 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out);
}
/* When the page has scrolled past the threshold, the nav lights up
   with a backdrop-blurred surface. Body class set by site.js scroll
   listener. Both themes have their own surface treatment. */
body.nav-scrolled nav.site-nav {
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
body.theme-lite.nav-scrolled nav.site-nav {
  background: rgba(238, 232, 222, 0.85);
  border-bottom-color: rgba(17, 17, 17, 0.10);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* Allow the logo to overflow vertically without expanding the nav bar */
  overflow: visible;
}
nav.site-nav { overflow: visible; }
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 36px;     /* tightly-cropped mark — much smaller than the
                       padded-JPEG asset that used to live at 72px */
  width: auto;
  display: block;
  transition: transform 0.4s var(--ease-spring);
}
.nav-logo:hover img {
  transform: scale(1.06);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}

/* Nav dropdown — Services menu has sub-items (Overview / Website Packages).
   Opens on hover (desktop) and focus-within (keyboard). */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown > a .caret {
  display: inline-block;
  font-size: 9px;
  margin-left: 4px;
  transition: transform 0.2s;
  vertical-align: middle;
}
.nav-dropdown:hover > a .caret,
.nav-dropdown:focus-within > a .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 220px;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 8px;
  margin-top: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s var(--ease-out);
  z-index: 110;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover {
  color: var(--blue);
  background: var(--blue-tint);
}
.nav-dropdown-menu a.active { color: var(--orange); }

/* Lite-theme adjustments for the dropdown */
body.theme-lite .nav-dropdown-menu {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

/* =========================================================
   MEGA MENU — Case Studies on hover
   Injected by site.js. Two panes: orange Signature column on the
   left, case-study grid on the right.
   ========================================================= */
/* =========================================================
   CASE STUDIES MEGA MENU — Lumitech-inspired
   Left: featured "signature" cards over a textured gradient.
   Right: image-first cards split into Featured / Explore More,
   with an insight teaser chip at the bottom.
   ========================================================= */
.nav-dropdown-menu.nav-mega {
  /* Anchor the mega menu to the viewport (not the Case Studies link) so
     it doesn't clip off the right edge. Centered via translateX(-50%). */
  position: fixed;
  top: 60px;
  left: 50%;
  right: auto;
  width: 860px;
  max-width: calc(100vw - 32px);
  padding: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  /* Both panes stretch to match the taller one (default grid behavior).
     The right pane uses margin-top:auto on the insight chip to push it to
     the bottom so the dead space goes between cards and the chip, not below it. */
  grid-template-rows: max-content;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.40);
  /* Override inherited closed-state transform so it stays centered.
     The :hover/:focus-within rules below restore the open state. */
  transform: translate(-50%, -4px);
  margin-top: 0;
}
.nav-dropdown:hover .nav-dropdown-menu.nav-mega,
.nav-dropdown:focus-within .nav-dropdown-menu.nav-mega {
  transform: translate(-50%, 0);
  /* Open immediately on hover */
  transition-delay: 0s;
}
/* Give the user a short grace period before closing so a quick cursor
   trip across the gap between link and menu doesn't kill the menu. */
.nav-dropdown-menu.nav-mega {
  transition-delay: 0.12s;
}
body.nav-scrolled .nav-dropdown-menu.nav-mega { top: 56px; }

/* HOVER BRIDGE — invisible area bridging the gap between the Case Studies
   link bottom and the mega menu top. The menu is position:fixed which
   creates a ~18px no-hover gap; the cursor crossing this gap loses the
   :hover state and the menu starts closing. The bridge sits as a ::before
   pseudo on the parent link, extending downward to cover the gap. Only
   active for dropdowns that actually have a nav-mega (i.e. Case Studies),
   so other dropdowns aren't affected. */
.nav-dropdown:has(.nav-mega) > a::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -24px;
  right: -24px;
  height: 36px;
  /* Transparent. Catches hover, doesn't block clicks below since the area
     below it is just nav background. */
}
@media (max-width: 1000px) {
  .nav-dropdown-menu.nav-mega { width: 760px; grid-template-columns: 220px 1fr; }
}
@media (max-width: 900px) {
  .nav-dropdown-menu.nav-mega { display: none; } /* let the simple link work on mobile */
}
body.theme-lite .nav-dropdown-menu.nav-mega {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(17, 17, 17, 0.18);
}
/* Title-case body text — overrides the uppercase inherited from
   .nav-links a. Pills, badges, CTAs, and eyebrows are still uppercase
   because they set text-transform: uppercase explicitly. */
.nav-mega-signature h4,
.nav-mega-signature p,
.nav-mega-card h5,
.nav-mega-card-sub,
.nav-mega-insight,
.nav-mega-insight-text {
  text-transform: none;
  letter-spacing: -0.005em;
}
.nav-mega-signature p,
.nav-mega-card-sub { letter-spacing: 0; }

/* LEFT — signature pane with a richer gradient + subtle noise/glow.
   Three layered gradients: radial highlight top-left, radial accent
   bottom-right, vertical orange base. Adds depth vs the old flat gradient. */
.nav-mega-left {
  background:
    radial-gradient(circle at 12% 8%,  rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 92% 92%, rgba(255, 75, 43, 0.55)  0%, rgba(255, 75, 43, 0) 55%),
    linear-gradient(160deg, #FF6A45 0%, #FF4B2B 55%, #E5371A 100%);
  color: #050505;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-mega-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  color: #050505;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.nav-mega-all:hover { background: #ffffff; transform: translateY(-1px); }
.nav-mega-all-icon {
  background: var(--blue);
  color: #ffffff;
  width: 20px; height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Signature card — body sits at the top, the product mockup peeks from
   the bottom like a product display stand. Two tones (orange + dark)
   pick out one card visually. */
/* `a.nav-mega-signature` qualifier outweighs the .nav-dropdown-menu a
   rule's padding override. */
a.nav-mega-signature {
  border-radius: 12px;
  /* Bottom padding leaves room for the absolutely-positioned mockup peek.
     Tuned to the peek height + small breathing room (54 + 6 = 60). */
  padding: 12px 12px 60px;
  text-decoration: none;
  position: relative;
  display: block;
  flex: 0 0 auto;             /* size to content, do not stretch */
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
}
/* Cover-variant signatures (Hansard's full-bleed committee photo) use a
   taller image band — match the bottom padding to that. */
a.nav-mega-signature:has(.nav-mega-sig-thumb.cover) {
  padding-bottom: 70px;
}
.nav-mega-sig-orange {
  /* Soft glass-on-orange */
  background:
    radial-gradient(circle at 80% 100%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.10) 100%);
  color: #050505;
  border: 1px solid rgba(255, 255, 255, 0.30);
}
.nav-mega-sig-orange:hover {
  background:
    radial-gradient(circle at 80% 100%, rgba(255, 255, 255, 0.40) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.14) 100%);
  transform: translateY(-2px);
}
.nav-mega-sig-dark {
  background:
    radial-gradient(circle at 80% 100%, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0) 55%),
    linear-gradient(170deg, #1a1a1a 0%, #050505 70%);
  color: #F5F2ED;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-mega-sig-dark:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.nav-mega-sig-body {
  position: relative;
  z-index: 1;
}
.nav-mega-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #050505;
  color: #FF4B2B;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 100px;
  margin-bottom: 6px;
  font-weight: 600;
}
.nav-mega-sig-dark .nav-mega-badge { background: #FF4B2B; color: #050505; }
.nav-mega-signature h4 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.nav-mega-sig-orange h4 { color: #050505; }
.nav-mega-sig-dark   h4 { color: #F5F2ED; }
.nav-mega-signature p {
  font-size: 11px;
  line-height: 1.35;
  margin: 0 0 8px;
}
.nav-mega-sig-orange p { color: rgba(5, 5, 5, 0.74); }
.nav-mega-sig-dark   p { color: #B8B2A8; }

/* Mockup peek — sits at the bottom of the card. The non-cover variant
   is a centered product image; the cover variant is a full-bleed photo
   filling a defined band (used for Hansard's committee photo). */
.nav-mega-sig-thumb {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.nav-mega-sig-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}
.nav-mega-sig-thumb.cover {
  left: 0; right: 0; bottom: 0;
  height: 64px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.nav-mega-sig-thumb.cover img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 30%;
  filter: none;
}

.nav-mega-sig-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  width: 22px; height: 22px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.92);
  color: #050505;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}
.nav-mega-signature:hover .nav-mega-sig-arrow { transform: translate(2px, -2px); background: #ffffff; }
.nav-mega-sig-dark .nav-mega-sig-arrow { background: #F5F2ED; }

/* CTA group at the bottom of the left pane */
.nav-mega-ctas { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.nav-mega-cta {
  background: rgba(255, 255, 255, 0.95);
  color: #050505;
  padding: 8px 12px;
  border-radius: 100px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.nav-mega-cta:hover { background: #ffffff; transform: translateY(-1px); }
.nav-mega-cta-whatsapp {
  background: #25D366;
  color: #ffffff;
}
.nav-mega-cta-whatsapp:hover { background: #1FBE5C; color: #ffffff; }
.nav-mega-cta-wa-icon {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-mega-cta-wa-icon svg { width: 100%; height: 100%; display: block; }

/* RIGHT — case study grid, stacked image-first cards */
.nav-mega-right {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-mega-section-head {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 2px;
}
.nav-mega-section-head-secondary {
  color: var(--text-faint);
  margin-top: 6px;
}
.nav-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 90px;       /* lock card row height to the thumb size */
  gap: 8px;
  align-items: start;         /* don't stretch cards to fill stale row height */
}

/* `a.nav-mega-card` (not just `.nav-mega-card`) to outweigh the
   site-wide `.nav-dropdown-menu a { display: block }` rule above. */
a.nav-mega-card {
  display: flex;
  flex-direction: row;       /* horizontal: image left, body right */
  align-items: stretch;
  padding: 0;                /* override .nav-dropdown-menu a padding: 10px 14px */
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
}
a.nav-mega-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
body.theme-lite .nav-mega-card:hover { box-shadow: 0 6px 14px rgba(17, 17, 17, 0.10); }

/* Square thumb pinned to the left of the card */
.nav-mega-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card-soft) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}
.nav-mega-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-out);
}
.nav-mega-card:hover .nav-mega-thumb img { transform: scale(1.04); }
.nav-mega-thumb.contain img { object-fit: contain; padding: 8px; }

/* Industry pill — pinned to the top-right corner of the card. Absolutely
   positioned against the card (which has position: relative), so it sits
   out of the body's flow and the title can sit at the top of the body. */
.nav-mega-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8px;
  padding: 2px 7px;
  border-radius: 100px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  max-width: 60%;          /* never wider than ~half the body, prevents overlap with title */
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Industry color variants — soft tinted backgrounds with matched text */
.nav-mega-pill.pill-blue   { background: rgba(34, 211, 238, 0.22); color: #67E8F9; }
.nav-mega-pill.pill-orange { background: rgba(255, 75, 43, 0.26);  color: #FF8C6F; }
.nav-mega-pill.pill-green  { background: rgba(74, 222, 128, 0.22); color: #86EFAC; }
.nav-mega-pill.pill-purple { background: rgba(168, 85, 247, 0.24); color: #C4B5FD; }
.nav-mega-pill.pill-cyan   { background: rgba(94, 234, 212, 0.22); color: #99F6E4; }
.nav-mega-pill.pill-pink   { background: rgba(244, 114, 182, 0.24); color: #F9A8D4; }
body.theme-lite .nav-mega-pill.pill-blue   { background: rgba(8, 145, 178, 0.16);  color: #0E7490; }
body.theme-lite .nav-mega-pill.pill-orange { background: rgba(255, 75, 43, 0.18);  color: #C2410C; }
body.theme-lite .nav-mega-pill.pill-green  { background: rgba(34, 197, 94, 0.18);  color: #15803D; }
body.theme-lite .nav-mega-pill.pill-purple { background: rgba(126, 34, 206, 0.16); color: #6D28D9; }
body.theme-lite .nav-mega-pill.pill-cyan   { background: rgba(20, 184, 166, 0.18); color: #0F766E; }
body.theme-lite .nav-mega-pill.pill-pink   { background: rgba(219, 39, 119, 0.16); color: #BE185D; }

/* Hover arrow on the right edge of the card — replaces the old image-overlay
   "Read case study →" chip since the image is now too small to host it. */
.nav-mega-card-cta {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translate(6px, -50%);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
/* Visually replace the chip's text with just an arrow on hover */
.nav-mega-card-cta { font-size: 0; }
.nav-mega-card-cta::before { content: '→'; font-size: 16px; }
.nav-mega-card:hover .nav-mega-card-cta {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Body sits to the right of the square thumb, vertically centered */
.nav-mega-card-body {
  padding: 10px 28px 10px 12px;   /* extra right padding for the hover arrow */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;                   /* lets text-overflow ellipsis work */
  flex: 1;
}
.nav-mega-card h5 {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;  /* product names in title case, not uppercase */
}
/* One-line description next to the title */
.nav-mega-card-sub {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
  letter-spacing: 0;
  text-transform: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bottom: featured-insight teaser chip — sits directly after the cards. */
.nav-mega-insight {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;  /* override .nav-links a uppercase */
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.nav-mega-insight:hover {
  background: var(--blue-tint);
  border-color: var(--border-blue);
  transform: translateY(-1px);
}
.nav-mega-insight-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-mega-insight-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-mega-insight-arrow {
  color: var(--blue);
  font-weight: 700;
  flex-shrink: 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out), background 0.2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { background: var(--blue); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--orange); }
.nav-links a.active::after { background: var(--orange); }

.nav-cta {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--orange);
  color: #000;
  padding: 10px 18px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.3s var(--ease-out), background 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--orange-bright);
  box-shadow: 0 8px 30px var(--orange-soft);
}

/* =========================================================
   MOBILE NAV — hamburger + slide-in panel
   Below 900px the desktop nav-links transform into a right-side
   drawer revealed by the hamburger button (injected by site.js).
   ========================================================= */

/* Hamburger — desktop hidden, mobile visible. Injected by site.js. */
.nav-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  flex-shrink: 0;
  padding: 0;
  margin-right: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out);
}
.nav-hamburger svg { width: 16px; height: 16px; display: block; }
.nav-hamburger:hover {
  color: var(--blue);
  border-color: var(--border-blue);
  background: var(--blue-tint);
}
.nav-hamburger .nav-hamburger-x { display: none; }
body.nav-open .nav-hamburger {
  color: var(--blue);
  border-color: var(--border-blue);
  background: var(--blue-tint);
}
body.nav-open .nav-hamburger .nav-hamburger-bars { display: none; }
body.nav-open .nav-hamburger .nav-hamburger-x    { display: block; }

/* Backdrop — covers content behind the slide-in panel */
.nav-mobile-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
body.theme-lite .nav-mobile-backdrop { background: rgba(17, 17, 17, 0.45); }
body.nav-open .nav-mobile-backdrop { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* The mobile nav-links panel — visible only at <=900px */
@media (max-width: 900px) {
  .nav-hamburger { display: inline-flex; }
  .nav-links {
    /* Convert into a fixed slide-in drawer */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 320px; max-width: 88vw;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 100;
    padding: 80px 20px 32px;
    gap: 4px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.40);
  }
  body.theme-lite .nav-links {
    background: var(--bg-elevated);
    border-left-color: var(--border);
  }
  body.nav-open .nav-links { transform: translateX(0); }

  .nav-links a {
    padding: 14px 14px;
    border-radius: 8px;
    font-size: 13px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
  }
  .nav-links a::after { display: none; }       /* hide underline on mobile */
  .nav-links a:hover { background: var(--blue-tint); color: var(--blue); }

  /* Services dropdown — inline-expand on mobile (no hover) */
  .nav-dropdown { display: block; position: static; }
  .nav-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-dropdown > a .caret { transform: rotate(180deg); margin-left: auto; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 8px 12px;
    margin-top: 0;
    width: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: block;
  }
  .nav-dropdown-menu.nav-mega { display: none; } /* hide complex mega on mobile */
  /* Case Studies parent — its mega is hidden, so suppress the caret to
     avoid implying an inline submenu that never appears. The link
     itself still navigates to /case-studies. */
  .nav-dropdown:has(.nav-mega) > a .caret { display: none; }
  .nav-dropdown-menu a {
    padding: 11px 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-dim);
  }
  .nav-dropdown-menu a.active { color: var(--orange); }

  .nav-inner { padding: 0 20px; height: 64px; }
  .nav-logo img { height: 30px; }
  .nav-cta { padding: 9px 14px; font-size: 11px; }
}
@media (max-width: 480px) {
  .nav-cta { display: none; } /* free up room — CTA also lives in the open drawer */
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 15px 24px;
  border-radius: 100px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s var(--ease-out);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text);
}
.btn-primary {
  background: var(--orange);
  color: #000;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--orange-bright);
  box-shadow: 0 8px 40px var(--orange-soft);
}
.btn-secondary {
  border-color: var(--border-blue);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--blue-tint);
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}
.btn-secondary:hover .arrow { color: var(--blue); }
.btn .arrow {
  transition: transform 0.3s var(--ease-out);
  display: inline-block;
}
.btn:hover .arrow { transform: translateX(4px); }

/* =========================================================
   PAGE HEADER (for inner pages — small hero)
   ========================================================= */
.page-header {
  padding: 180px 0 80px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
/* Mesh & grid span the full viewport — matches the homepage hero treatment */
.page-header-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}
.page-header-mesh::before {
  content: '';
  position: absolute;
  top: -180px; right: -260px;
  width: 1000px; height: 1000px;
  background: var(--orange);
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.18;
  animation: drift1 22s ease-in-out infinite;
}
.page-header-mesh::after {
  content: '';
  position: absolute;
  bottom: -240px; left: -240px;
  width: 700px; height: 700px;
  background: rgba(110, 168, 255, 0.10);
  border-radius: 50%;
  filter: blur(160px);
  animation: drift1 32s ease-in-out infinite reverse;
}
.page-header-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-100px, 80px); }
}
.page-header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.page-eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--orange);
}
.page-header h1 {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  max-width: 1100px;
}
.page-header h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--orange);
  letter-spacing: -0.02em;
}
.page-header .lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--text-dim);
  max-width: 720px;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .page-header { padding: 130px 0 60px; }
  .page-header-inner { padding: 0 20px; }
}

/* =========================================================
   SECTIONS
   ========================================================= */
section.section {
  padding: 100px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
@media (max-width: 768px) {
  section.section { padding: 64px 20px; }
}
.section-head {
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 768px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 12px;
  border-top: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-num .dot-mark {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 900px;
}
.section-title em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-dim);
  font-weight: 400;
  /* Italic glyph side-bearings + the heading's negative letter-spacing
     compress inter-word gaps in accents; nudge them back so word pairs
     (e.g. "big output") don't visually fuse. */
  word-spacing: 0.09em;
}
.section-title .accent { color: var(--orange); }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* Word-by-word reveal for headlines */
.split-line {
  overflow: hidden;
  display: block;
}
.split-line .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}
.split-line.visible .word { transform: translateY(0); }
.split-line .word:nth-child(2)  { transition-delay: 0.05s; }
.split-line .word:nth-child(3)  { transition-delay: 0.1s; }
.split-line .word:nth-child(4)  { transition-delay: 0.15s; }
.split-line .word:nth-child(5)  { transition-delay: 0.2s; }
.split-line .word:nth-child(6)  { transition-delay: 0.25s; }
.split-line .word:nth-child(7)  { transition-delay: 0.3s; }
.split-line .word:nth-child(8)  { transition-delay: 0.35s; }
.split-line .word:nth-child(9)  { transition-delay: 0.4s; }
.split-line .word:nth-child(10) { transition-delay: 0.45s; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 80px 32px 32px;
  max-width: var(--max-w);
  margin: 80px auto 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer.site-footer { padding: 60px 20px 28px; }
}
.footer-brand {
  max-width: 340px;
}
.footer-brand img {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: 24px;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.footer-brand .office {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);            /* was --text-faint — too dim on dark bg */
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-brand .office strong {
  color: var(--text);
  font-weight: 500;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.footer-social a:hover {
  color: #F5F2ED;
  border-color: rgba(245, 242, 237, 0.40);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
footer h6 {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 400;
}
footer ul { list-style: none; }
footer ul li { padding: 5px 0; }
footer ul li a {
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
footer ul li a:hover { color: var(--blue); }

/* Footer policies row — Terms · Privacy · Refunds · Cancellation · Delivery · Security */
.footer-policies {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);            /* was --text-faint — separator dots were invisible */
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer-policies a {
  color: var(--text);                /* was --text-dim — bumped to primary for readability */
  text-decoration: none;
  transition: color 0.2s;
}
.footer-policies a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);            /* was --text-faint — © + Anguilla line were invisible */
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-bottom .made {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-bottom .made .pin {
  color: var(--orange);
  display: inline-flex;
  gap: 3px;
}
.footer-bottom .made .pin span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--orange);
  display: block;
}

/* =========================================================
   SHARED COMPONENTS
   ========================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), background 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
}
.card:hover {
  border-color: var(--blue);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px var(--blue),
    0 0 36px var(--blue-tint),
    0 12px 40px rgba(0,0,0,0.6);
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Status tags — orange (action / shipped / energy) */
.tag.live,
.tag.shipped,
.tag.active,
.tag.started { color: var(--orange); }

/* Capability / system tags — electric blue (technical signal) */
.tag.ai,
.tag.api,
.tag.automation,
.tag.data,
.tag.software,
.tag.infrastructure,
.tag.system { color: var(--blue); }

/* Pill variant — fills the background instead of just colouring text */
.tag.pill {
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.3);
}
.tag.pill.ai,
.tag.pill.api,
.tag.pill.automation,
.tag.pill.data,
.tag.pill.software,
.tag.pill.infrastructure,
.tag.pill.system { background: var(--blue-tint); }

.tag .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

/* =========================================================
   EYEBROW TWO-TONE — orange "/NN —" + blue category text
   Apply to .page-eyebrow, .section-num, .num-col by wrapping
   spans: <span class="num">/01 —</span> <span class="cat">…</span>
   ========================================================= */
.page-eyebrow .num,
.section-num .num,
.num-col .num,
.eyebrow-num { color: var(--orange); }

.page-eyebrow .cat,
.section-num .cat,
.num-col .cat,
.eyebrow-cat { color: var(--blue); }

/* =========================================================
   CAPABILITY CHIPS — blue technical pills under product/case names
   ========================================================= */
.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 14px;
}
.capabilities .cap {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 4px 10px;
  border: 1px solid var(--border-blue);
  background: var(--blue-tint);
  border-radius: 100px;
}

/* =========================================================
   INLINE HIGHLIGHT UTILITY
   <span class="hl">word</span> for blue inline emphasis
   <span class="hl-orange">word</span> for orange
   ========================================================= */
.hl, .hl-blue {
  color: var(--blue);
  font-weight: 500;
}
.hl-orange {
  color: var(--orange);
  font-weight: 500;
}

/* =========================================================
   PILLARS — 3-up icon row (FAST BY DESIGN / BUILT TO SHIP / SECURE BY DEFAULT)
   ========================================================= */
.pillars {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 32px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
}
@media (max-width: 768px) {
  .pillars { grid-template-columns: 1fr; padding: 40px 20px 16px; gap: 16px; }
}
.pillar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.3s, background 0.3s;
}
.pillar:hover {
  border-color: var(--border-blue);
  background: var(--bg-card-hover);
}
.pillar .pillar-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid currentColor;
}
.pillar.pillar-blue   .pillar-icon { color: var(--blue);   background: var(--blue-tint); }
.pillar.pillar-orange .pillar-icon { color: var(--orange); background: var(--orange-glow); }
.pillar .pillar-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* =========================================================
   TABS — blue active underline (mockup component)
   Usage:
     <div class="tabs">
       <button class="tab active">Overview</button>
       <button class="tab">Features</button>
       <button class="tab">Pricing</button>
     </div>
   ========================================================= */
.tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 14px 0 16px;
  margin-bottom: -1px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.tab::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out);
}
.tab:hover { color: var(--blue); }
.tab:hover::after { transform: scaleX(0.5); }
.tab.active { color: var(--blue); }
.tab.active::after { transform: scaleX(1); }

/* =========================================================
   CODE BLOCK — stylised snippet with brand syntax highlighting
   Usage:
     <pre class="codeblock"><code>
   <span class="cb-line"><span class="cb-num">01</span><span class="cb-kw">const</span> evolut = <span class="cb-kw">new</span> <span class="cb-cls">AIStudio</span>();</span>
   <span class="cb-line"><span class="cb-num">02</span>evolut.<span class="cb-fn">build</span>({ <span class="cb-prop">purpose</span>: <span class="cb-str">'impact'</span> });</span>
   <span class="cb-line"><span class="cb-num">03</span>evolut.<span class="cb-fn">ship</span>();</span>
     </code></pre>
   ========================================================= */
.codeblock {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}
.codeblock code { font-family: inherit; }
.codeblock .cb-line { display: block; }
.codeblock .cb-num {
  color: var(--text-faint);
  user-select: none;
  margin-right: 22px;
  display: inline-block;
  text-align: right;
  min-width: 18px;
}
.codeblock .cb-kw    { color: var(--blue); }            /* const, new, return, function */
.codeblock .cb-cls   { color: var(--blue); font-weight: 500; } /* AIStudio, ClassName */
.codeblock .cb-fn    { color: var(--text); }            /* build, ship — function calls */
.codeblock .cb-prop  { color: var(--text-dim); }         /* object property keys */
.codeblock .cb-str   { color: var(--orange); }          /* 'string literals' */
.codeblock .cb-numv  { color: var(--blue-soft); }       /* numeric literals */
.codeblock .cb-cmt   { color: var(--text-faint); font-style: italic; } /* // comment */
.codeblock .cb-op    { color: var(--text-faint); }       /* operators (=, =>, etc.) */

/* =========================================================
   CARD-ICON — circular icon container for use inside cards
   (smaller cousin of .pillar-icon, can sit beside titles or footers)
   Usage:
     <span class="card-icon card-icon-blue">
       <svg viewBox="0 0 24 24" width="18" height="18" ...>...</svg>
     </span>
   ========================================================= */
.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid currentColor;
  transition: transform 0.3s var(--ease-out);
}
.card-icon.card-icon-sm { width: 28px; height: 28px; }
.card-icon.card-icon-lg { width: 48px; height: 48px; }
.card-icon-blue   { color: var(--blue);   background: var(--blue-tint); }
.card-icon-orange { color: var(--orange); background: var(--orange-glow); }
.card-icon-muted  { color: var(--text-dim); background: transparent; }

/* =========================================================
   BRAND PATTERN — decorative dotted texture
   Predominantly orange dots with sparse blue accents.
   Usage:
     <div class="brand-pattern"></div>           (orange-only grid)
     <div class="brand-pattern with-blue"></div> (orange grid + blue accents)
   Apply to a sized container — the pattern fills it.
   ========================================================= */
.brand-pattern {
  width: 100%;
  height: 100%;
  background-color: transparent;
  background-image:
    radial-gradient(circle, var(--orange) 1.2px, transparent 1.8px);
  background-size: 18px 18px;
  opacity: 0.45;
}
.brand-pattern.with-blue {
  background-image:
    radial-gradient(circle, var(--orange) 1.2px, transparent 1.8px),
    radial-gradient(circle, var(--blue) 1.5px, transparent 2.2px);
  background-size: 18px 18px, 108px 108px;
  background-position: 0 0, 36px 36px;
}

/* =========================================================
   ARTICLE PAGE — long-form post layout (Insights articles)
   Used by every individual article HTML file in /insights/.
   ========================================================= */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.article-meta .dot {
  width: 4px; height: 4px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--blue);
}
.article-header h1 { max-width: 1080px; }
.article-header .lead { max-width: 760px; }

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dim);
}
@media (max-width: 768px) {
  .article-body { padding: 48px 20px 72px; font-size: 16px; }
}
.article-body p { margin-bottom: 24px; }
.article-body p strong,
.article-body li strong { color: var(--text); font-weight: 500; }

.article-body h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 56px 0 20px;
}
.article-body h2 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--orange);
  font-weight: 400;
}
.article-body h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  color: var(--text);
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}

.article-body ol {
  list-style: none;
  counter-reset: li;
  padding: 0;
  margin: 0 0 32px 0;
}
.article-body ol > li {
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
  counter-increment: li;
}
.article-body ol > li::before {
  content: counter(li, decimal-leading-zero);
  position: absolute;
  left: 0; top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.article-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}
.article-body ul > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
}
.article-body ul > li::before {
  content: '';
  position: absolute;
  left: 4px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
}

.article-body a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--border-blue);
  transition: color 0.2s, border-color 0.2s;
}
.article-body a:hover { color: var(--blue-soft); border-color: var(--blue-soft); }

.article-body .pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--text);
  border-left: 3px solid var(--orange);
  padding: 8px 0 8px 28px;
  margin: 48px 0;
}
.article-body .conclusion {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 56px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
}
.article-body .conclusion strong { color: var(--orange); }

.article-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 80px;
}
@media (max-width: 768px) { .article-footer { padding: 0 20px 60px; } }

.article-cta {
  background: var(--bg-card);
  border: 1px solid var(--orange-soft);
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 600px) { .article-cta { padding: 40px 28px; } }
.article-cta::before {
  content: '';
  position: absolute;
  top: -180px; right: -180px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.article-cta > * { position: relative; z-index: 1; }
.article-cta h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.1;
}
.article-cta h3 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--orange);
  font-weight: 400;
}
.article-cta p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 15px;
}
.article-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
/* The CTA card is always dark, even in lite theme — so the secondary
   "Visit <site>" button must use light text + bright cyan regardless of
   theme (otherwise lite theme's dark --text renders it invisible). */
.article-cta .btn-secondary {
  color: #F5F2ED;
  border-color: rgba(34, 211, 238, 0.45);
}
.article-cta .btn-secondary:hover {
  color: #22D3EE;
  border-color: #22D3EE;
  background: rgba(34, 211, 238, 0.08);
}
.article-cta .btn-secondary:hover .arrow { color: #22D3EE; }

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}
@media (max-width: 600px) { .article-nav { grid-template-columns: 1fr; } }
.article-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: block;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.article-nav a:hover {
  border-color: var(--blue);
  background: var(--bg-card-hover);
  box-shadow: 0 0 28px var(--blue-tint);
}
.article-nav .label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.article-nav .ttl {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.article-nav .next { text-align: right; }

/* =========================================================
   ARTICLE PAGE — sidebar (Recent Posts + Case Studies)
   Wraps .article-body in .article-with-sidebar grid.
   ========================================================= */
.article-with-sidebar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
}
@media (max-width: 1100px) {
  .article-with-sidebar { grid-template-columns: 1fr; gap: 0; padding: 0 20px; }
}
.article-with-sidebar > .article-body {
  max-width: 760px;
  margin: 0;
  padding: 64px 0 96px;
}
@media (max-width: 1100px) {
  .article-with-sidebar > .article-body { margin: 0 auto; padding: 48px 0 56px; }
}

.article-sidebar {
  position: sticky;
  top: 32px;
  padding: 64px 0 0;
}
@media (max-width: 1100px) {
  .article-sidebar {
    position: static;
    padding: 16px 0 64px;
    max-width: 760px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
  }
}

.sb-section { margin-bottom: 44px; }
.sb-section:last-child { margin-bottom: 0; }
.sb-section h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.sb-section h4::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  flex-shrink: 0;
}

.sb-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease-out), border-color 0.3s;
}
.sb-item:hover { padding-left: 8px; border-color: var(--blue); }
.sb-item:last-child { border-bottom: none; }

.sb-meta {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sb-title {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.sb-item:hover .sb-title { color: var(--blue); }

/* =========================================================
   CASE STUDY — results metrics grid (used in article-body of /case-studies/*)
   ========================================================= */
.cs-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 32px 0 36px;
}
@media (max-width: 600px) { .cs-results { grid-template-columns: 1fr; } }
.cs-result {
  background: var(--bg-card);
  border: 1px solid var(--orange-soft);
  border-radius: 12px;
  padding: 20px 22px;
}
.cs-result-v {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--orange);
}
.cs-result-v .unit {
  color: var(--blue);
  font-size: 0.5em;
  margin-left: 2px;
}
.cs-result-l {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Case study hero image — sits at the top of .article-body */
.cs-hero-image {
  margin: 0 0 40px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 32px;
  position: relative;
}
.cs-hero-image::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.cs-hero-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  display: block;
}
.cs-hero-image figcaption {
  display: none;
}

/* =========================================================
   FLOATING BRAND DOTS (animated, decorative)
   ========================================================= */
.floating-dots {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.floating-dots .dot {
  position: absolute;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, -30px); }
}

/* =========================================================
   #3 — CLIP-PATH IMAGE REVEAL
   Add data-clip-reveal to any image, video, or visual block.
   The element starts hidden behind a clip-path inset and
   sweeps open from left → right when it enters the viewport.

   IMPORTANT: we use opacity + transform along with clip-path so
   the IntersectionObserver still considers the element painted
   and visible (a zero-area clip-path can confuse the observer
   in some browsers).
   ========================================================= */
[data-clip-reveal] {
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transform: translateX(-12px);
  transition:
    clip-path 1.4s cubic-bezier(.7, 0, .15, 1),
    opacity 0.6s ease,
    transform 1.0s cubic-bezier(.7, 0, .15, 1);
  will-change: clip-path, opacity, transform;
}
[data-clip-reveal].clip-in {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateX(0);
}
/* Optional direction variants */
[data-clip-reveal="right"]  { clip-path: inset(0 0 0 100%); transform: translateX(12px); }
[data-clip-reveal="top"]    { clip-path: inset(100% 0 0 0); transform: translateY(12px); }
[data-clip-reveal="bottom"] { clip-path: inset(0 0 100% 0); transform: translateY(-12px); }
[data-clip-reveal="right"].clip-in,
[data-clip-reveal="top"].clip-in,
[data-clip-reveal="bottom"].clip-in {
  clip-path: inset(0 0 0 0);
  transform: translate(0, 0);
}

/* Mask-reveal headline variant — text slides up from a clip mask.
   Add .mask-reveal to any heading; site.js will wrap each line. */
.mask-reveal {
  display: block;
}
.mask-reveal .mask-line {
  display: block;
  overflow: hidden;
  position: relative;
}
.mask-reveal .mask-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.7, 0, .15, 1);
  will-change: transform;
}
.mask-reveal.visible .mask-inner { transform: translateY(0); }
.mask-reveal .mask-line:nth-child(2) .mask-inner { transition-delay: 0.08s; }
.mask-reveal .mask-line:nth-child(3) .mask-inner { transition-delay: 0.16s; }
.mask-reveal .mask-line:nth-child(4) .mask-inner { transition-delay: 0.24s; }

/* =========================================================
   #4 — STACKED CARDS (scroll-driven deck)
   Wrap children inside [data-stack].
   Each stacked card sticks at top:120px; subsequent cards
   scroll up over the previous one and the underneath card
   subtly scales/fades.
   ========================================================= */
[data-stack] {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
[data-stack] > .stack-card {
  position: sticky;
  top: 100px;
  margin-top: 24px;
  transform-origin: top center;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
  will-change: transform, opacity;
}
[data-stack] > .stack-card:first-child { margin-top: 0; }
/* JS adds .stack-passed when the next card has covered this one,
   so we can scale & dim the one underneath. */
[data-stack] > .stack-card.stack-passed {
  transform: scale(0.96) translateY(-20px);
  opacity: 0.5;
  filter: blur(0.5px);
}
@media (max-width: 900px) {
  [data-stack] > .stack-card { position: relative; top: 0; margin-top: 16px; }
  [data-stack] > .stack-card.stack-passed {
    transform: none;
    opacity: 1;
    filter: none;
  }
}

/* =========================================================
   #7 — STICKY TEXT + CHANGING MEDIA
   Use .sticky-cycle wrapping a 2-col layout:
     <div class="sticky-cycle">
       <div class="sticky-cycle-text">
         <div class="sticky-chapter" data-chapter="0"> ... </div>
         <div class="sticky-chapter" data-chapter="1"> ... </div>
       </div>
       <div class="sticky-cycle-media">
         <div class="sticky-frame" data-frame="0"> ... </div>
         <div class="sticky-frame" data-frame="1"> ... </div>
       </div>
     </div>
   ========================================================= */
.sticky-cycle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  position: relative;
}
@media (max-width: 900px) { .sticky-cycle { grid-template-columns: 1fr; gap: 32px; } }

.sticky-cycle-text {
  display: flex;
  flex-direction: column;
  gap: 35vh; /* generous gap so each chapter triggers separately on scroll */
  padding: 20vh 0;
}
.sticky-chapter {
  opacity: 0.25;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
.sticky-chapter.active {
  opacity: 1;
  transform: translateY(0);
}
.sticky-chapter h3 {
  font-family: var(--display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.sticky-chapter h3 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--orange);
  font-weight: 400;
}
.sticky-chapter p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.sticky-chapter .chapter-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sticky-chapter .chapter-num::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.sticky-cycle-media {
  position: sticky;
  top: 120px;
  height: calc(100vh - 200px);
  max-height: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .sticky-cycle-media { position: relative; top: 0; height: 360px; }
}
.sticky-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
  pointer-events: none;
}
.sticky-frame.active {
  opacity: 1;
  transform: scale(1);
}

/* =========================================================
   #8 — COLOR THEME TRANSITIONS PER SECTION
   Add data-theme="orange-tint" or data-theme="deep" to a
   section. As that section enters the viewport center, the
   <body> gets that theme class and the page background
   color animates.
   ========================================================= */
body {
  transition: background-color 1.2s var(--ease-out);
}
body.theme-deep        { background-color: #050306; }
body.theme-orange-tint { background-color: #0c0604; }
body.theme-cool        { background-color: #04060a; }
/* The base black resets when no special theme is active. */

/* Optional: make sections that declare a theme show a subtle
   ambient glow so the transition is "felt". */
[data-theme="orange-tint"] { position: relative; }
[data-theme="orange-tint"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--orange-glow) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
  z-index: 0;
}
[data-theme="orange-tint"].theme-active::before { opacity: 1; }
[data-theme="orange-tint"] > * { position: relative; z-index: 1; }

[data-theme="deep"] { position: relative; }
[data-theme="deep"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(110, 168, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
  z-index: 0;
}
[data-theme="deep"].theme-active::before { opacity: 1; }
[data-theme="deep"] > * { position: relative; z-index: 1; }

/* =========================================================
   LITE EDITORIAL THEME — alternate warm off-white variant
   ---------------------------------------------------------
   Opt-in by adding class="theme-lite" to <body> for full-page
   lite, or to a <section> for section-level lite. Within the
   scope, the brand tokens (--bg, --text, --blue, etc.) are
   remapped to the lite palette so existing components reflow
   automatically. Orange tokens are unchanged across themes.
   ========================================================= */
.theme-lite {
  /* Surfaces — warm off-white spectrum.
     Page bg uses the deeper beige #EEE8DE so the warm tone reads
     immediately; elevated/card surfaces step lighter to pop forward. */
  --bg: #EEE8DE;
  --bg-elevated: #F5F2ED;
  --bg-card: #FAF7F1;
  --bg-card-hover: #F5F2ED;
  --bg-card-soft: #E7DFD3;

  /* Borders — translucent dark on warm bg */
  --border: rgba(17, 17, 17, 0.12);
  --border-bright: rgba(17, 17, 17, 0.22);
  --border-soft: rgba(17, 17, 17, 0.08);

  /* Type — charcoal hierarchy */
  --text: #111111;
  --text-dim: #3A3632;
  --text-faint: #706A63;

  /* Blue — deeper teal for contrast on warm bg */
  --blue: #0891B2;
  --blue-soft: #22D3EE;
  --blue-tint: rgba(8, 145, 178, 0.10);
  --border-blue: rgba(8, 145, 178, 0.45);

  /* Orange unchanged — same tokens carry over */

  /* Brief-style aliases re-pointed for lite */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-elevated);
  --text-primary: var(--text);
  --text-secondary: var(--text-dim);
  --text-muted: var(--text-faint);
  --accent-blue: var(--blue);
  --accent-blue-soft: var(--blue-soft);
}

/* Body-scope lite — set the actual page bg, text, and selection */
body.theme-lite {
  background: var(--bg);
  color: var(--text);
}
body.theme-lite::before {
  /* Quieten the grain overlay on warm bg */
  opacity: 0.025;
  mix-blend-mode: multiply;
}
body.theme-lite ::selection { background: var(--orange); color: #fff; }

/* Component-level adjustments — fix patterns the bare token swap can't */
.theme-lite .card {
  box-shadow: 0 1px 0 rgba(17,17,17,0.04);
}
.theme-lite .card:hover {
  background: var(--bg-card-hover);
  box-shadow:
    0 0 0 1px var(--blue),
    0 0 28px var(--blue-tint),
    0 12px 40px rgba(17, 17, 17, 0.10);
}
/* Subtle-white overlay patterns become subtle-dark on warm bg */
.theme-lite .chat-ai,
.theme-lite .codeblock,
.theme-lite .article-cta,
.theme-lite .pillar:hover {
  background: var(--bg-card);
}
/* Tag pill backgrounds */
.theme-lite .tag.pill { background: rgba(17, 17, 17, 0.04); }
.theme-lite .tag.pill.ai,
.theme-lite .tag.pill.api,
.theme-lite .tag.pill.automation,
.theme-lite .tag.pill.data,
.theme-lite .tag.pill.software,
.theme-lite .tag.pill.infrastructure,
.theme-lite .tag.pill.system { background: var(--blue-tint); }

/* Capability chips on lite pages — slightly stronger fill */
.theme-lite .capabilities .cap { background: var(--blue-tint); }

/* Sidebar items in lite — soft hover */
.theme-lite .sb-item:hover { background: rgba(8, 145, 178, 0.04); }

/* Page-header mesh adjustments on lite — soften so the warm bg still reads */
body.theme-lite .page-header-mesh::before { opacity: 0.10; }
body.theme-lite .page-header-mesh::after { opacity: 0.06; }
body.theme-lite .hero-mesh::before { opacity: 0.10; }
body.theme-lite .hero-mesh::after { opacity: 0.06; }
body.theme-lite .hero-grid,
body.theme-lite .page-header-grid { opacity: 0.18; }

/* Footer stays dark on a lite page (anchor + brand identity), but
   uses a charcoal bg instead of pure black so the contrast against
   the warm page above is softer. Rounded like the cards so it reads
   as a floating panel sitting at the bottom of the page. */
body.theme-lite .site-footer {
  background: #1a1a1a;
  color: #F5F2ED;
  border-top: none;
  border-radius: var(--radius);
  margin-bottom: 40px;
}
body.theme-lite .site-footer .footer-brand p,
body.theme-lite .site-footer .office,
body.theme-lite .site-footer ul li a {
  color: #C8C3BA;                  /* slightly brighter than --text-dim for charcoal bg */
}
body.theme-lite .site-footer .office strong { color: #F5F2ED; }
body.theme-lite .site-footer h6 { color: #F5F2ED; }
body.theme-lite .site-footer ul li a:hover { color: var(--blue-soft); }
body.theme-lite .site-footer .footer-social a { color: #C8C3BA; border-color: rgba(245,242,237,0.18); }
body.theme-lite .site-footer .footer-social a:hover { color: #F5F2ED; border-color: rgba(245,242,237,0.40); background: rgba(255,255,255,0.06); }
body.theme-lite .site-footer .footer-bottom {
  border-top-color: rgba(245,242,237,0.12);
  color: #C8C3BA;
}
body.theme-lite .site-footer .footer-policies { color: #C8C3BA; }
body.theme-lite .site-footer .footer-policies a { color: #F5F2ED; }
body.theme-lite .site-footer .footer-policies a:hover { color: var(--blue-soft); }

/* =========================================================
   DARK ISLAND — punch a dark section into a lite page
   Use class="dark-island" on a <section>, hero panel, or card
   to force the dark palette inside an otherwise lite page.
   ========================================================= */
.dark-island {
  --bg: #050505;
  --bg-elevated: #0B0B0B;
  --bg-card: #111111;
  --bg-card-hover: #151515;
  --bg-card-soft: #151515;
  --border: #1a1a1a;
  --border-bright: #262626;
  --border-soft: rgba(245, 242, 237, 0.12);
  --text: #F5F2ED;
  --text-dim: #B8B2A8;
  --text-faint: #77736D;
  --blue: #22D3EE;
  --blue-soft: #38BDF8;
  --blue-tint: rgba(34, 211, 238, 0.10);
  --border-blue: rgba(34, 211, 238, 0.45);
  background: var(--bg);
  color: var(--text);
}

/* =========================================================
   LITE THEME — refinements (per Lynn's review)
   ========================================================= */

/* Lite nav — warm and minimal. Logo inverts to dark via CSS filter
   so we don't need a separate dark logo asset. The nav itself starts
   transparent and gains a warm backdrop-blurred surface when the page
   has scrolled (see body.nav-scrolled rules below). */
body.theme-lite .nav-logo img {
  filter: brightness(0);          /* white logo → pure black, alpha preserved */
  transition: filter 0.25s var(--ease-out);
}
body.theme-lite .nav-links a { color: var(--text-dim); }

/* Hero eyebrow pill (homepage) has a hardcoded dark bg — override on lite
   so the pill blends into the warm surface instead of pasting on top. */
body.theme-lite .hero-eyebrow {
  background: rgba(245, 242, 237, 0.65);
  border-color: rgba(17, 17, 17, 0.14);
  color: var(--text-dim);
}

/* Client marquee bar (homepage) has a hardcoded dark bg — make it
   theme-aware so it doesn't read as a dark stripe across a lite page. */
body.theme-lite .marquee {
  background: rgba(245, 242, 237, 0.5);
  border-top-color: var(--border);
  border-bottom-color: var(--border);
}
body.theme-lite .marquee-item { color: var(--text-dim); }

/* Hansard chat AI bubble — was rgba(255,255,255,0.04), invisible on warm bg.
   Flip the overlay polarity for lite so the bubble actually reads. */
body.theme-lite .chat-ai {
  background: rgba(17, 17, 17, 0.04);
  color: var(--text);
  border-color: var(--border);
}

/* Broker diagram chip — was rgba(0,0,0,0.4) dark fill; becomes a
   subtle dark-tint on warm bg in lite. */
body.theme-lite .bd-chip {
  background: rgba(17, 17, 17, 0.04);
  border-color: var(--border);
}

/* PER BRIEF: product showcases and case-study feature blocks STAY DARK
   even when the homepage / case-studies index is toggled to lite.
   Treats every .product-card and .feat-card as a dark island so its
   interior (descriptions, chips, chat bubbles, punchclock device, broker
   diagram, etc.) inherits the dark palette automatically. */
body.theme-lite .product-card,
body.theme-lite .feat-card {
  --bg: #050505;
  --bg-elevated: #0B0B0B;
  --bg-card: #111111;
  --bg-card-hover: #151515;
  --bg-card-soft: #151515;
  --border: #1a1a1a;
  --border-bright: #262626;
  --border-soft: rgba(245, 242, 237, 0.12);
  --text: #F5F2ED;
  --text-dim: #B8B2A8;
  --text-faint: #77736D;
  --blue: #22D3EE;
  --blue-soft: #38BDF8;
  --blue-tint: rgba(34, 211, 238, 0.10);
  --border-blue: rgba(34, 211, 238, 0.45);
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
/* Make sure the inner overlays/translucents that DID read correctly on
   dark continue to read correctly inside the dark-island product cards. */
body.theme-lite .feat-card .chat-ai,
body.theme-lite .feat-card .bd-chip {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}
body.theme-lite .nav-links a:hover { color: var(--blue); }
body.theme-lite .nav-links a.active { color: var(--orange); }
body.theme-lite .nav-links a.active::after { background: var(--orange); }
body.theme-lite .nav-links a:hover::after { background: var(--blue); }

/* Article body — larger, more readable, slightly tighter column */
body.theme-lite .article-body,
body.theme-lite .article-with-sidebar > .article-body {
  font-size: 18px;
  line-height: 1.75;
  max-width: 720px;
  color: var(--text-dim);
}
body.theme-lite .article-body h2 { color: var(--text); }
body.theme-lite .article-body h3 { color: var(--text); }

/* Article meta uses brighter blue + more weight */
body.theme-lite .article-meta { color: var(--blue); font-weight: 500; }

/* Numbered ordered-list markers stand out in deeper teal */
body.theme-lite .article-body ol > li::before { color: var(--blue); font-weight: 500; }

/* Sidebar becomes a "studio panel" card with blue heads + orange labels */
body.theme-lite .article-sidebar {
  background: var(--bg-card);
  border: 1px solid rgba(17, 17, 17, 0.10);
  border-radius: 18px;
  padding: 28px 28px 24px;
  position: sticky;
  top: 32px;
  margin-top: 64px;
}
@media (max-width: 1100px) {
  body.theme-lite .article-sidebar {
    margin: 0 auto;
    border-top: 1px solid rgba(17,17,17,0.10);
    position: static;
  }
}
body.theme-lite .article-sidebar .sb-section h4 { color: var(--blue); }
body.theme-lite .article-sidebar .sb-section h4::before {
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}
body.theme-lite .article-sidebar .sb-meta { color: var(--orange); }
body.theme-lite .article-sidebar .sb-item { border-bottom-color: rgba(17,17,17,0.10); }
body.theme-lite .article-sidebar .sb-item:hover {
  background: rgba(8, 145, 178, 0.05);
  padding-left: 8px;
  border-bottom-color: var(--blue);
}
body.theme-lite .article-sidebar .sb-item:hover .sb-title { color: var(--blue); }

/* CTA card — DARK card on a lite page (intentional contrast moment) */
body.theme-lite .article-cta {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #F5F2ED;
  margin-bottom: 56px;
}
body.theme-lite .article-cta::before {
  background: radial-gradient(circle, rgba(255, 75, 43, 0.20) 0%, transparent 60%);
  opacity: 1;
}
body.theme-lite .article-cta h3 { color: #F5F2ED; }
body.theme-lite .article-cta h3 em { color: var(--orange); }
body.theme-lite .article-cta p { color: #B8B2A8; }
/* Secondary detail link inside dark CTA gets bright cyan */
body.theme-lite .article-cta a:not(.btn) { color: #22D3EE; }

/* Prev/next nav — stronger borders, blue label, orange arrow via gradient */
body.theme-lite .article-nav { border-top-color: rgba(17,17,17,0.18); }
body.theme-lite .article-nav a {
  background: var(--bg-card);
  border: 1px solid rgba(17, 17, 17, 0.18);
  padding: 26px 30px;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
body.theme-lite .article-nav a:hover {
  border-color: var(--blue);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.10);
  transform: translateY(-2px);
}
body.theme-lite .article-nav .label {
  color: var(--blue);
  font-weight: 500;
  letter-spacing: 0.14em;
}
body.theme-lite .article-nav .ttl { color: var(--text); font-weight: 500; }

/* =========================================================
   THEME TOGGLE — sun/moon button in nav, persists via localStorage
   Injected by site.js into every .nav-inner. Hidden if JS is off.
   ========================================================= */
.nav-theme-toggle {
  background: transparent;
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-right: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
  padding: 0;
}
.nav-theme-toggle:hover {
  color: var(--blue);
  border-color: var(--border-blue);
  background: var(--blue-tint);
  transform: scale(1.04);
}
.nav-theme-toggle svg {
  width: 16px;
  height: 16px;
  transition: opacity 0.25s, transform 0.4s var(--ease-out);
}
.nav-theme-toggle .icon-sun { display: none; }
body.theme-lite .nav-theme-toggle .icon-sun  { display: inline-block; }
body.theme-lite .nav-theme-toggle .icon-moon { display: none; }
body.theme-lite .nav-theme-toggle {
  border-color: rgba(17, 17, 17, 0.20);
  color: var(--text-dim);
}
body.theme-lite .nav-theme-toggle:hover {
  color: var(--blue);
  border-color: var(--border-blue);
  background: var(--blue-tint);
}
@media (max-width: 768px) {
  .nav-theme-toggle { margin-right: 4px; width: 34px; height: 34px; }
}
