/* Implaid — site styles, "data dots" design: the old site's content
   on the light dots design. Microsoft first, AI second.
   Self-hosted fonts only (no external requests). */
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/space-grotesk-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/inter-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/inter-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/inter-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/inter-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');}

:root {
  --ink:        #0E1A1C;
  --offwhite:   #F5F8F7;
  --soft:       #E9F2F1;
  --tint:       #DCEBEA;
  --deep:       #1F6B6E;
  --deep-hover: #185659;
  --node:       #164A4C;
  --brand:      #65B5B4;
  --text-2:     #4A5A5C;
  --footer-text:#A9BDBE;
  --line:       rgba(14,26,28,.16);

  --head: "Space Grotesk", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  --radius: 20px;
  --shadow: 0 18px 40px rgba(14,26,28,.06);
  --blend: 140px;           /* height of the gradient between sections */
  --ease: cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 .5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; max-width: 65ch; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--deep); color: #fff; }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: var(--gutter); top: 12px; z-index: 100;
  padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-family: var(--head);
  transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* -------------------------------------------------- Dots canvas layering ---
   The canvas (added by dots.js) is fixed above section backgrounds and below
   content. Sections never create a stacking context, so their backgrounds
   paint under it; .wrap lifts the content above it. */
.dots-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 860px; }

/* Preview marker */
.preview-pill {
  position: fixed;
  top: 88px; right: 16px;
  z-index: 70;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--deep);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(31,107,110,.35);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------- Labels --- */
.label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 18px;
}
.label--muted { color: var(--text-2); }

/* --------------------------------------------------------------- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1px solid var(--deep);
  background: var(--deep);
  color: #fff;
  font-family: var(--head);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.005em;
  line-height: 1.2;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--deep-hover); border-color: var(--deep-hover); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: rgba(255,255,255,.6); border-color: rgba(14,26,28,.32); color: var(--ink); }
.btn--sm { padding: 10px 20px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.link {
  display: inline-flex; gap: 8px; align-items: center;
  font-family: var(--head); font-weight: 500; color: var(--deep);
}
.link span { transition: transform .25s var(--ease); }
.link:hover span { transform: translateX(4px); }

/* ---------------------------------------------------------------- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,248,247,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { flex: none; position: relative; }
.brand::before { content: ""; position: absolute; inset: -16px -18px; }  /* larger hit area */
.brand img { height: 21px; width: auto; }
/* Logo halo: a soft circle follows the pointer (main.js sets --mx/--my,
   relative to .brand). Inside it, every letter except "AI" fades to 10%,
   and "AI" turns teal instead. In the 711px-wide logo PNG, "A" spans
   x 408-539 and "I" spans 548-579, hence the 57%-83% band. */
.brand {
  position: relative;
  --mx: -9999px;
  --my: -9999px;
  --halo: 70px;
}
/* Logo image. Mask layers, top to bottom, composited as
   halo-fade ∩ (non-AI band ∪ (inverse-halo ∩ AI band)):
   non-AI letters fade to 10% inside the halo; the original AI letters
   fade out completely there, so the teal copy above them has no dark
   anti-aliased rim showing through. */
.brand img {
  -webkit-mask-image:
    radial-gradient(circle var(--halo) at var(--mx) var(--my), rgb(0 0 0 / .1) 35%, #000 100%),
    linear-gradient(to right, #000 57%, transparent 57% 83%, #000 83%),
    radial-gradient(circle var(--halo) at var(--mx) var(--my), transparent 35%, #000 100%),
    linear-gradient(to right, transparent 57%, #000 57% 83%, transparent 83%);
          mask-image:
    radial-gradient(circle var(--halo) at var(--mx) var(--my), rgb(0 0 0 / .1) 35%, #000 100%),
    linear-gradient(to right, #000 57%, transparent 57% 83%, #000 83%),
    radial-gradient(circle var(--halo) at var(--mx) var(--my), transparent 35%, #000 100%),
    linear-gradient(to right, transparent 57%, #000 57% 83%, transparent 83%);
  -webkit-mask-composite: source-in, source-over, source-in, source-over;
          mask-composite: intersect, add, intersect, add;
}
/* Invisible padding around the logo so the link is easier to hit,
   without shifting the logo or its halo masks. */
.brand::before {
  content: "";
  position: absolute;
  inset: -16px -18px;
}
/* Teal overlay: logo shape, limited to the AI band, inside the halo. */
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--brand);
  -webkit-mask-image:
    url("../img/implaid-logo-black-web.png"),
    linear-gradient(to right, transparent 57%, #000 57% 83%, transparent 83%),
    radial-gradient(circle var(--halo) at var(--mx) var(--my), #000 35%, transparent 100%);
          mask-image:
    url("../img/implaid-logo-black-web.png"),
    linear-gradient(to right, transparent 57%, #000 57% 83%, transparent 83%),
    radial-gradient(circle var(--halo) at var(--mx) var(--my), #000 35%, transparent 100%);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a:not(.btn) {
  font-family: var(--head); font-size: 15.5px; font-weight: 500; color: var(--text-2);
  transition: color .2s var(--ease);
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav > .btn { display: none; }
.header-cta { flex: none; }
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 17px; height: 1.6px; background: var(--ink); position: relative;
  transition: transform .25s var(--ease), background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after { top: 5.5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-5.5px) rotate(-45deg); }

/* -------------------------------------------------------------- Sections ---
   Neighbouring light sections blend over var(--blend); never a hard edge. */
.sec { position: relative; padding-block: clamp(80px, 11vw, 140px); }
.sec h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.sec--hero {
  background: var(--soft);
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 7vw, 88px);
}

/* ----------------------------------------------------------------- Glows ---
   Soft teal light over the sections. Each glow overhangs its section so it
   fades out across the neighbours: no hard edges. Painted under the dots. */
.sec::before {
  content: "";
  position: absolute;
  inset: -180px 0;
  pointer-events: none;
}
.sec--hero::before {
  inset: -80px 0 -180px;
  background:
    radial-gradient(42% 55% at 82% 32%, rgba(101,181,180,.30), rgba(101,181,180,0) 70%),
    radial-gradient(35% 45% at 8% 10%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
}

/* Hero */
.sec--hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 15ch;
  margin-bottom: 26px;
}
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--text-2); max-width: 52ch; }

.trust { margin-top: clamp(64px, 9vw, 112px); }
.logo-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: clamp(20px, 4vw, 48px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px clamp(22px, 3.4vw, 40px);
}
.logo-strip img {
  height: auto; width: auto; max-height: 36px; max-width: 136px;
  object-fit: contain;
  opacity: .9;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.logo-strip a { display: inline-flex; border-radius: 8px; }
.logo-strip a:hover img, .logo-strip a:focus-visible img {
  filter: none; opacity: 1; transform: translateY(-1px);
}
.logo-strip a:focus-visible { outline: 2px solid var(--deep); outline-offset: 6px; }

/* Offer panel: visible without JS; with JS it opens on "Organize my data". */
.offer { display: grid; grid-template-rows: 1fr; margin-top: 28px; }
.offer > .offer-inner { overflow: hidden; }
.js .offer {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: grid-template-rows 300ms var(--ease), margin-top 300ms var(--ease),
              opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s 300ms;
}
.js .offer.is-open {
  grid-template-rows: 1fr;
  margin-top: 28px;
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: grid-template-rows 300ms var(--ease), margin-top 300ms var(--ease),
              opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s;
}
.offer-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(26px, 3.4vw, 40px);
  margin-bottom: 40px;   /* room for the shadow inside the clipped row */
}
.offer h3 { font-size: 1.6rem; margin-bottom: 6px; }
.offer-terms { font-family: var(--head); font-weight: 500; color: var(--ink); margin-bottom: 12px; }

/* AI section */
.sec--ai { padding-block: clamp(96px, 12vw, 160px); }
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 40%) 1fr;
  gap: 40px;
  align-items: center;
  min-height: 560px;
}
.ai-visual { min-height: 440px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tags li {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  color: var(--deep);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 4px 14px rgba(14,26,28,.04);
}

/* Security + speed */
.secure-head { max-width: 860px; }
.sec h2 .dim { color: #7E9092; }
.cards.cards--4 { grid-template-columns: repeat(4, 1fr); }
.ai-copy .btn-row { margin-top: 28px; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 3vw, 38px);
  display: flex;
  flex-direction: column;
}
.card h3 { font-size: 1.45rem; margin-bottom: 12px; }
.card p:not(.label) { font-size: 17px; }
.card .link { margin-top: auto; padding-top: 18px; }


/* Cursor glare on boxes (main.js feeds --cx/--cy on .card) */
.card { position: relative; isolation: isolate; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--cx, 50%) var(--cy, 50%), rgba(101,181,180,.16), rgba(101,181,180,0) 70%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 22px 48px rgba(14,26,28,.09); }
.card:hover::before { opacity: 1; }

/* Closing CTA */
.sec--cta { text-align: left; }

/* ---------------------------------------------------------------- Footer --- */
.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--footer-text);
  padding-block: clamp(64px, 8vw, 96px) 34px;
}
.site-footer .brand img { height: 26px; margin-bottom: 14px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(169,189,190,.16);
}
.footer-top h4 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.footer-top li { margin-bottom: 10px; font-size: 16px; }
.footer-top a { transition: color .2s var(--ease); }
.footer-top a:hover { color: var(--brand); }
.footer-tag { font-size: 16px; max-width: 34ch; }
.footer-bottom {
  padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: 14px; color: rgba(169,189,190,.7);
}

/* ------------------------------------------------------------ Responsive --- */
@media (max-width: 1100px) {
  .cards.cards--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; min-height: 0; }
  .ai-visual { min-height: 520px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .site-header .wrap { min-height: 66px; }
  .preview-pill { top: 76px; }
  .nav {
    position: fixed; inset: 66px 0 auto;
    background: var(--offwhite);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 24px; margin: 0;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid rgba(14,26,28,.08); font-size: 17px; }
  .nav > .btn { display: inline-flex; margin-top: 18px; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  :root { --gutter: 18px; --blend: 100px; }
  body { font-size: 17px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .footer-top { grid-template-columns: 1fr; }
  .cards.cards--4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ===================================================================
   Next version additions
   =================================================================== */

/* Section backgrounds: soft and off-white take turns, always blended. */
.sec--stack  { background: linear-gradient(var(--soft) 0, var(--offwhite) var(--blend)); }
.sec--ai     { background: linear-gradient(var(--offwhite) 0, var(--soft) var(--blend)); }
.sec--record { background: linear-gradient(var(--soft) 0, var(--offwhite) var(--blend)); padding-bottom: clamp(48px, 6vw, 72px); }
.sec--cases  { background: linear-gradient(var(--soft) 0, var(--offwhite) var(--blend)); padding-bottom: clamp(40px, 5vw, 64px); }
.sec--cta    { background: linear-gradient(var(--offwhite) 0, var(--tint) calc(var(--blend) * 1.6)); }

.sec--stack::before {
  background:
    radial-gradient(34% 40% at 28% 55%, rgba(101,181,180,.22), rgba(101,181,180,0) 70%),
    radial-gradient(30% 30% at 90% 20%, rgba(255,255,255,.7), rgba(255,255,255,0) 70%);
}
.sec--record::before { background: radial-gradient(40% 50% at 85% 40%, rgba(101,181,180,.16), rgba(101,181,180,0) 70%); }
.sec--cases::before  { background: radial-gradient(40% 40% at 10% 60%, rgba(101,181,180,.14), rgba(101,181,180,0) 70%); }

.sec-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head .lede { margin-bottom: 0; }

/* Hero: "ready for AI." picks up the brand teal */
.ai-word { color: var(--deep); }

/* ----------------------------------------------------------- The stack */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.stack-panel {
  display: none;
  position: relative;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.86) 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(10px, 2vw, 24px);
}
.js .stack-panel { display: block; }
.stack-svg { display: block; width: 100%; height: auto; overflow: visible; }
.stack-caption {
  position: absolute; left: 28px; bottom: 22px; margin: 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
}
.stack-caption span { transition: color .2s var(--ease); }
.stack[data-active] .stack-caption span { color: var(--deep); }

.layers { display: grid; gap: 4px; }
.layer {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  cursor: default;
  outline: none;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), opacity .25s var(--ease);
}
.layer h3 { font-size: 1.22rem; margin: 0 0 4px; }
.layer p { font-size: 16px; margin: 0; }
.layer-num {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--deep);
  padding-top: 5px;
}
.layer.is-active { background: #fff; box-shadow: var(--shadow); }
.stack[data-active] .layer:not(.is-active) { opacity: .55; }
.layer:focus-visible { box-shadow: 0 0 0 2px var(--deep); }
.layer--ai { margin-top: 10px; border-top: 1px dashed rgba(31,107,110,.3); border-radius: 0 0 16px 16px; }
.layer--ai.is-active { border-top-color: transparent; border-radius: 16px; }
.layer .link { font-size: 15px; }

/* SVG parts */
.st-dot { fill: var(--deep); opacity: .38; transition: opacity .3s var(--ease), fill .3s var(--ease); }
.st-dot--accent { opacity: .85; }
.st-face { fill: #EFF7F6; stroke: rgba(31,107,110,.16); stroke-width: 1; transition: fill .3s var(--ease); }
.st-side { fill: #CFE4E3; }
.st-leader { fill: var(--deep); opacity: .4; }
.st-label { font-family: var(--head); font-size: 13.5px; fill: var(--ink); }
.st-label .st-num { font-family: var(--mono); font-size: 11px; fill: var(--deep); letter-spacing: .06em; }
.st-gov circle { fill: var(--deep); opacity: .28; transition: opacity .3s var(--ease); }
.st-link { fill: var(--deep); opacity: .35; }
.st-node { fill: var(--node); }
.st-halo { fill: rgba(101,181,180,.22); transform-box: fill-box; transform-origin: center; }
.st-rise { fill: var(--brand); opacity: 0; }
.st-plate, .st-ai, .st-gov { cursor: pointer; }

.st-lift { transition: transform .45s var(--ease); }
.st-plate, .st-gov, .st-ai { transition: opacity .3s var(--ease); }

/* Build-in: plates drop into place bottom up, then the frame, then AI */
.js .stack:not(.is-built) .st-plate,
.js .stack:not(.is-built) .st-gov,
.js .stack:not(.is-built) .st-ai { opacity: 0; }
.stack.is-built .st-plate { animation: st-drop .8s var(--ease) backwards; animation-delay: calc(var(--i) * .18s); }
.stack.is-built .st-gov { animation: st-fade .8s var(--ease) .62s backwards; }
.stack.is-built .st-ai  { animation: st-fade .8s var(--ease) .85s backwards; }
@keyframes st-drop { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
.stack.is-built .st-rise { animation: st-rise 3.3s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes st-rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: .9; }
  85%  { opacity: .9; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
.stack.is-built .st-halo { animation: st-breathe 3.3s ease-in-out infinite; }
@keyframes st-breathe { 0%, 100% { transform: scale(.7); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } }

/* Highlight: the active layer lifts and darkens, the rest step back */
.stack[data-active] .st-plate, .stack[data-active] .st-ai { opacity: .32; }
.stack[data-active] .st-gov circle { opacity: .14; }
.st-gov .st-label { transition: opacity .3s var(--ease); }
.stack[data-active]:not([data-active="governance"]) .st-gov .st-label { opacity: .32; }
.stack[data-active="azure"] [data-layer="azure"],
.stack[data-active="dataverse"] [data-layer="dataverse"],
.stack[data-active="apps"] [data-layer="apps"],
.stack[data-active="ai"] .st-ai { opacity: 1; }
.stack[data-active="azure"] [data-layer="azure"] .st-lift,
.stack[data-active="dataverse"] [data-layer="dataverse"] .st-lift,
.stack[data-active="apps"] [data-layer="apps"] .st-lift { transform: translateY(-10px); }
.stack[data-active="azure"] [data-layer="azure"] .st-dot,
.stack[data-active="dataverse"] [data-layer="dataverse"] .st-dot,
.stack[data-active="apps"] [data-layer="apps"] .st-dot { opacity: .6; }
.stack[data-active="azure"] [data-layer="azure"] .st-dot--accent,
.stack[data-active="dataverse"] [data-layer="dataverse"] .st-dot--accent,
.stack[data-active="apps"] [data-layer="apps"] .st-dot--accent { opacity: 1; fill: var(--brand); }
.stack[data-active="azure"] [data-layer="azure"] .st-face,
.stack[data-active="dataverse"] [data-layer="dataverse"] .st-face,
.stack[data-active="apps"] [data-layer="apps"] .st-face { fill: #E1F1EF; }
/* Governance: the frame lights up, the plates stay visible inside it */
.stack[data-active="governance"] .st-plate { opacity: .6; }
.stack[data-active="governance"] .st-gov circle { opacity: .95; fill: var(--brand); }

/* -------------------------------------------------------------- AI */
.sec--ai { padding-block: clamp(80px, 9vw, 120px); }
.ai-copy .btn-row { margin-top: 26px; }

/* ----------------------------------------------------------- Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { border-top: 2px solid var(--deep); padding-top: 20px; }
.stat .num {
  font-family: var(--head); font-weight: 500; color: var(--ink);
  font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -.035em; line-height: 1;
  margin-bottom: 12px;
}
.stat p { font-size: 16px; margin: 0; max-width: 26ch; }

/* ----------------------------------------------------------- Cases */
.case-card .case-logo { height: 56px; display: flex; align-items: center; margin-bottom: 22px; }
.case-card .case-logo img {
  max-height: 44px; max-width: 150px; width: auto; height: auto; object-fit: contain;
  transition: transform .3s var(--ease);
}
.case-card:hover .case-logo img { transform: scale(1.04); }
.case-card .label { margin-bottom: 10px; }
.sec--cases .btn-row { margin-top: 36px; }

/* Whole card clickable through its link */
.card > .link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card:has(> .link) { cursor: pointer; }
.card:hover > .link span { transform: translateX(4px); }

/* ------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
}
@media (max-width: 960px) {
  .stack { grid-template-columns: 1fr; }
  .stack-panel { max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .layer { grid-template-columns: 34px 1fr; padding: 14px 12px; }
  .stack-caption { left: 18px; bottom: 14px; }
  /* Labels would be too small to read; the list below names the layers */
  .st-label, .st-leader { display: none; }
  .stack-panel { padding: 6px 4px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .stack.is-built .st-rise { animation: none; opacity: 0; }
}


/* ===================================================================
   Inner pages
   =================================================================== */

/* Current page in the nav: a small teal dot under the link */
.nav a[aria-current="page"] { color: var(--ink); position: relative; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -9px;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--brand);
}

/* Generic section tones, blended into each other */
.sec--page  { background: var(--soft); padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px); }
.sec--plain { background: linear-gradient(var(--soft) 0, var(--offwhite) var(--blend)); }
.sec--soft  { background: linear-gradient(var(--offwhite) 0, var(--soft) var(--blend)); }
.sec--page::before {
  inset: -80px 0 -180px;
  background:
    radial-gradient(40% 60% at 84% 34%, rgba(101,181,180,.30), rgba(101,181,180,0) 70%),
    radial-gradient(35% 45% at 8% 10%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
}
.sec--plain::before { background: radial-gradient(36% 40% at 90% 50%, rgba(101,181,180,.14), rgba(101,181,180,0) 70%); }
.sec--soft::before  { background: radial-gradient(36% 40% at 8% 50%, rgba(101,181,180,.18), rgba(101,181,180,0) 70%); }
.sec--page h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -.035em;
  max-width: 22ch;
  margin-bottom: 24px;
}
.sec--page .trust { margin-top: clamp(40px, 6vw, 64px); }
.sec .dim, h1 .dim { color: #7E9092; }
.sec--page + .sec { padding-top: clamp(56px, 7vw, 96px); }

/* Services: jump links to the four parts */
.part-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.part-nav a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 12px;
  background: rgba(255,255,255,.8);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(14,26,28,.05);
  font-family: var(--head); font-size: 15.5px; font-weight: 500; color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.part-nav a span {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--deep);
  font-family: var(--mono); font-size: 11.5px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.part-nav a:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.part-nav a:hover span { background: var(--deep); color: #fff; }

/* Services: one part = copy on the left, cards on the right */
.sec--part { padding-block: clamp(72px, 9vw, 120px); scroll-margin-top: 60px; }
.part {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.part-copy { position: sticky; top: 120px; }
.part-copy .label { display: flex; align-items: center; gap: 12px; }
.part-num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--deep); color: #fff; font-size: 11.5px; letter-spacing: 0;
}
.part-cards { display: grid; gap: 16px; }
.card--sm { padding: clamp(22px, 2.4vw, 30px); }
.card--sm h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card--sm p:last-child { margin-bottom: 0; }

/* Numbers on cards */
.big-num {
  font-family: var(--head); font-weight: 500; font-size: 3rem; line-height: 1;
  letter-spacing: -.04em; color: var(--brand); margin: 0 0 22px;
}

/* Lists with dot bullets */
.ticks { display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; font-size: 16.5px; line-height: 1.55; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(101,181,180,.18);
}
.ticks--lg li { font-family: var(--head); font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: var(--ink); padding-left: 32px; }
.ticks--lg li::before { top: .55em; }
.ticks--lg { gap: 18px; }

/* Cases: one wide card per client */
.case-list { display: grid; gap: 24px; }
.case-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 48px);
  scroll-margin-top: 100px;
}
.case-wide h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.case-wide .case-logo { height: 52px; display: flex; align-items: center; margin-bottom: 22px; }
.case-wide .case-logo img { max-height: 46px; max-width: 170px; width: auto; height: auto; object-fit: contain; }
.case-wide .label { margin-bottom: 10px; }
.case-wide .tags { margin-top: 20px; }
.case-wide .tags li { background: var(--soft); box-shadow: none; }
.case-main {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 3vw, 48px);
}
.case-main .label { margin-bottom: 18px; }
.sec--page .logo-strip a { padding: 4px; }

/* About: team */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.person {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 3.4vw, 44px);
}
.person-top { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.person-top img {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(101,181,180,.45);
}
.person h3 { font-size: 1.5rem; margin: 0 0 4px; }
.person-top .label { margin: 0; }
.person > p { font-size: 16.5px; }
.meta-list { margin: 22px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.meta-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15px; }
.meta-list dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--deep); padding-top: 3px; }
.meta-list dd { margin: 0; }

/* Careers */
.sec--careers h1 { max-width: 20ch; }
.rotator { color: var(--deep); display: inline-block; }
.rotator-word { display: inline-block; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.rotator-word.is-out { opacity: 0; transform: translateY(10px); }
.btn-row--note { align-items: center; }
.note { font-size: 15px; color: var(--text-2); }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); margin-right: 10px; vertical-align: 1px;
  animation: live 2.4s ease-out infinite;
}
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(101,181,180,.6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(101,181,180,0); } }
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.split h2 { margin-bottom: 0; }

.msg {
  max-width: 820px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 4.4vw, 56px);
}
.msg-who { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.msg-who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(101,181,180,.45); }
.msg-name { font-family: var(--head); font-weight: 500; color: var(--ink); margin: 0; }
.msg-role { font-size: 15px; margin: 0; }
.msg h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.msg-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pick {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 9px 16px;
  font-family: var(--head); font-size: 15px; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pick:hover { border-color: var(--deep); }
.pick.is-on { background: var(--deep); border-color: var(--deep); color: #fff; }
.msg .btn-row { align-items: center; gap: 22px; }

.float-cta {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  padding: 13px 22px; border-radius: 999px;
  background: var(--deep); color: #fff;
  font-family: var(--head); font-weight: 500; font-size: 15px;
  box-shadow: 0 14px 34px rgba(14,26,28,.18);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.float-cta.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.float-cta:hover { background: var(--deep-hover); }

/* Contact */
.contact-card {
  max-width: 860px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(30px, 5vw, 64px);
}
.contact-card > p:first-child { font-size: clamp(1.1rem, 1.6vw, 1.25rem); }
.contact-mail {
  display: inline-block;
  font-family: var(--head); font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 2.9rem); letter-spacing: -.03em;
  color: var(--ink);
  border-bottom: 2px solid var(--brand);
  margin: 8px 0 4px;
  transition: color .2s var(--ease);
}
.contact-mail:hover { color: var(--deep); }
.contact-card .btn-row { align-items: center; gap: 22px; }
.contact-meta { margin: 30px 0 0; }
.sec--contact { padding-bottom: clamp(100px, 12vw, 160px); }

/* Inner pages, smaller screens */
@media (max-width: 960px) {
  .part, .split, .case-wide, .people { grid-template-columns: minmax(0, 1fr); }
  .part-copy { position: static; }
  .case-main { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
}
@media (max-width: 560px) {
  .part-nav a { padding: 8px 14px 8px 8px; font-size: 14.5px; }
  .meta-list > div { grid-template-columns: 1fr; gap: 2px; }
  .person-top img { width: 64px; height: 64px; }
  .contact-mail { font-size: min(1.5rem, 6.4vw); white-space: nowrap; }
  .float-cta { right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Homepage: the same rhythm between sections as the Services page parts */
.sec--stack, .sec--ai, .sec--cases, .sec--cta { padding-block: clamp(72px, 9vw, 120px); }
.sec--ai .ai-grid { min-height: 0; }
.sec--ai .ai-visual { min-height: 420px; }

/* Tighter rhythm (About) */
.sec.sec--tight { padding-block: clamp(56px, 6.5vw, 88px); }

/* ===================================================================
   Half the vertical whitespace, site-wide. Every section padding above
   is halved here; the order of the rules keeps the same precedence.
   =================================================================== */
.sec { padding-block: clamp(40px, 5.5vw, 70px); }
.sec.sec--hero { padding-top: clamp(28px, 4vw, 52px); padding-bottom: clamp(28px, 3.5vw, 44px); }
.sec.sec--stack, .sec.sec--ai, .sec.sec--cases, .sec.sec--cta, .sec.sec--part { padding-block: clamp(36px, 4.5vw, 60px); }
.sec.sec--page { padding-block: clamp(28px, 4vw, 52px) clamp(24px, 3vw, 40px); }
.sec--page + .sec.sec { padding-top: clamp(28px, 3.5vw, 48px); }
.sec.sec--tight { padding-block: clamp(28px, 3.25vw, 44px); }
.sec.sec--contact { padding-bottom: clamp(50px, 6vw, 80px); }
.trust, .sec--page .trust { margin-top: clamp(32px, 4.5vw, 56px); }

/* Team cards: the Focus line sits at the bottom, aligned across cards */
.person { display: flex; flex-direction: column; }
.person .meta-list { margin-top: auto; }
.person > p:last-of-type { margin-bottom: 22px; }
/* Focus areas one per line; room for three keeps the line aligned */
.person .meta-list dd { min-height: calc(3 * 1.6em); line-height: 1.6; }

/* Language switcher: three flags at the far right of the header */
/* Desktop: pinned to the header's right edge, outside the centred content.
   On narrower screens the header content keeps clear of the flags. */
.lang-switch {
  display: flex; align-items: center; gap: 8px; flex: none;
  position: absolute; top: 50%; right: var(--gutter); transform: translateY(-50%);
}
.site-header .wrap {
  position: static;
  padding-right: clamp(var(--gutter), calc(var(--gutter) + 110px - (100vw - var(--wrap)) / 2), calc(var(--gutter) + 110px));
}
.lang-switch a {
  display: block; width: 22px; height: 16px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(14,26,28,.12);
  opacity: .45; filter: saturate(.7);
  transition: opacity .2s var(--ease), filter .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.lang-switch a svg { display: block; width: 100%; height: 100%; }
.lang-switch a:hover, .lang-switch a:focus-visible { opacity: 1; filter: none; transform: translateY(-1px); }
.lang-switch a[aria-current="true"] { opacity: 1; filter: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--brand); }
@media (max-width: 860px) {
  .site-header .wrap { padding-right: var(--gutter); }
  .lang-switch { position: static; transform: none; order: 1; margin-left: auto; margin-right: -10px; gap: 7px; }
  .nav-toggle { order: 2; margin-left: 0; }
  .lang-switch a { width: 24px; height: 17px; }
}
/* Header spacing just above the mobile breakpoint */
@media (min-width: 861px) and (max-width: 1080px) {
  .nav { gap: 20px; }
}
