:root {
  /* Theme — change these to recolour the whole site */
  --ground: #F2FBFD;
  --ink: #0B2230;
  --muted: #2F5566;
  --line: #BFE7F0;
  --pebble: #CDEFF6;
  --hero: rgba(0,180,216,.5);
  --hero-text: #022233;
  --hero-muted: #053B52;
  --hero-line: #4FC3DD;
  --hero-glow: rgba(217,255,74,.6);
  --wave-1: #A6E5F2;
  --wave-2: #C6EFF7;
  --accent: #0077B6;
  --accent-on-dark: #D9FF4A;
  --accent-2-on-dark: #03304A;
  --dot: #A6D41C;
  --flow: #48CAE4;
  --on-lime: #022233;
  --glow: rgba(166,212,28,.25);
  --pebble-soft: #DDF3F8;
  --halo-rgb: 140, 190, 20;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .8; }
.navlink:hover { text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 7px; opacity: 1; }

/* Index preview: fixed navigation with a feathered glass backdrop. */
.page-home { --index-header-height: 96px; }
.index-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px); color: var(--hero-text);
}
.index-header::before {
  content: ""; position: absolute; inset: 0 0 -24px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,.08), rgba(255,255,255,.02));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 24px), transparent 100%);
}
.index-nav {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 26px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.index-nav > a { min-width: 0; }
.index-nav > a > svg { flex: none; stroke: var(--accent); }
.index-nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; font-size: 15px; }
.index-contact { color: var(--accent); }
.index-hero { padding-top: var(--index-header-height); }
.page-home [id] { scroll-margin-top: calc(var(--index-header-height) + 16px); }

/* Cursor glow (sits behind the page) */
.halo {
  position: absolute; left: 0; top: 0; width: 364px; height: 364px; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0; filter: blur(28px); will-change: transform;
  background: radial-gradient(circle closest-side,
    rgba(var(--halo-rgb), .75) 0%, rgba(var(--halo-rgb), .615) 12%, rgba(var(--halo-rgb), .45) 26%,
    rgba(var(--halo-rgb), .285) 42%, rgba(var(--halo-rgb), .135) 60%, rgba(var(--halo-rgb), .045) 78%,
    rgba(var(--halo-rgb), 0) 100%);
  transition: transform .12s ease-out, opacity .5s ease;
}
.halo.is-on { opacity: 1; }

/* Animated caustic water photo, kept beneath the index page content */
.water-filter-defs {
  position: absolute; width: 1px; height: 1px; overflow: visible; left: -10px; top: -10px;
  pointer-events: none;
}
.water-reflection {
  position: fixed; inset: -3%; z-index: 0; pointer-events: none;
  opacity: .34;
  background: url("water-caustics.jpeg") center 52% / cover no-repeat;
  filter: url(#water-ripple);
  animation: water-drift 34s ease-in-out infinite alternate;
  will-change: background-position;
}
@keyframes water-drift {
  from { background-position: 49% 53%; }
  to { background-position: 53% 47%; }
}

/* Case filter */
.chip {
  font: inherit; font-size: 16px; font-weight: 500; min-height: 44px; padding: 6px 2px;
  background: none; border: none; cursor: pointer; color: var(--muted);
  text-decoration-thickness: 1.5px; text-underline-offset: 8px;
}
.chip.is-active { color: var(--accent); font-weight: 600; text-decoration: underline wavy; }
.case-item[hidden] { display: none !important; }
.caserow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 40px; padding: 30px 0; }
.featured-case-list .caserow { width: 95%; }
.caserow:hover .casetitle { text-decoration: underline; text-decoration-style: wavy; text-decoration-thickness: 1.5px; text-underline-offset: 8px; }
.tag { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.tag-strategy { color: #0077B6; }
.tag-marketing { color: #00708A; }
.tag-finance { color: #023E8A; }
.tag-operations { color: #4F7300; }

@media (prefers-reduced-motion: reduce) {
  .halo { display: none; }
  .water-reflection { animation: none; filter: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  .page-home { --index-header-height: 138px; }
  .index-nav { padding: 16px 20px; gap: 12px; }
  .index-nav > a > span { font-size: 20px !important; }
  .index-nav-links { flex-basis: 100%; justify-content: space-between; gap: 8px 16px; font-size: 14px; }
  .index-nav-links > a { display: inline-flex; align-items: center; min-height: 36px; }
  .flowline { display: none; }
  .approach-grid, .grid3 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
  .stepdot { margin-top: 0 !important; }
  .steplabel { padding-top: 0 !important; }
  .caserow { margin-left: 0 !important; }
  .featured-case-list .caserow { width: 100%; }
}
