/* =====================================================
   CREATIVE HIVE SOLUTIONS, Design System v2
   Per brief: modern African corporate creative-tech.
   Light-first interface, purple lead, orange accents.
   ===================================================== */

:root {
  /* ---- Brand palette: FIXED, identical in both themes ---- */
  --purple: #502B8A;
  --purple-deep: #2E174F;
  --orange: #F37321;
  --orange-warm: #FF8A3D;
  /* Solid purple FILLS (buttons, footer, dark bands). These stay dark in
     both themes so white knockout text on them is always legible; only the
     purple used for TEXT/ICONS lightens in dark mode. */
  --purple-fill: #502B8A;
  --purple-fill-deep: #2E174F;
  --on-purple: #FFFFFF;

  /* ---- Semantic theme tokens: light mode ----
     Everything structural references these, never the raw brand colours,
     so dark mode is a token swap rather than a per-rule rewrite. */
  --bg:          #FFFFFF;   /* page */
  --bg-alt:      #F5F5F7;   /* alternating band */
  --bg-tint:     #F1ECF8;   /* lavender band */
  --surface:     #FFFFFF;   /* cards, nav, inputs */
  --surface-2:   #FFFFFF;   /* raised card on tinted band */
  --text:        #111111;   /* headings */
  --text-body:   #333333;   /* body copy */
  --text-soft:   #6B6B6B;   /* secondary */
  --line:        rgba(46, 23, 79, 0.09);
  --line-strong: rgba(46, 23, 79, 0.18);
  --accent-soft: rgba(80, 43, 138, 0.10);
  --glass:       rgba(46, 23, 79, 0.58);
  --glow:        rgba(80, 43, 138, 0.28);
  --shadow-rgb:  46, 23, 79;
  --field-border: rgba(46, 23, 79, 0.48);
  --field-focus:  rgba(80, 43, 138, 0.16);
  --danger:       #C0392B;

  /* Legacy aliases, kept so older rules keep working */
  --lavender: var(--bg-tint);
  --black: var(--text);
  --grey-dark: var(--text-body);
  --grey-mid: var(--text-soft);
  --grey-light: var(--bg-alt);
  --white: var(--surface);

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  /* Statement face, used for the hero headline only */
  --font-statement: 'Bricolage Grotesque', 'Manrope', sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 2.6vw, 2rem);
  --text-2xl: clamp(1.9rem, 3.6vw, 2.75rem);
  --text-hero: clamp(2.4rem, 5vw, 4rem);

  /* Layout */
  --container: 1240px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 6px 24px rgba(var(--shadow-rgb), 0.07);
  --shadow-lift: 0 18px 44px rgba(var(--shadow-rgb), 0.13);
  --border: 1px solid var(--line);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ================= DARK THEME =================
   Deliberately designed, not an inversion: deep purple-black grounds,
   raised surfaces that sit ABOVE the page rather than below it, and
   borders that read as light-on-dark instead of ink-on-paper. */
[data-theme="dark"] {
  /* Deep purple-black, not pure black. Each step up the stack gets
     measurably lighter so page / section / card stay distinguishable. */
  --bg:          #0B0711;
  --bg-alt:      #120C1B;
  --bg-tint:     #171027;
  --surface:     #1A1228;
  --surface-2:   #221833;
  --text:        #F7F4FC;
  --text-body:   #E2DCEE;
  --text-soft:   #ABA2BE;
  --line:        rgba(196, 173, 255, 0.13);
  --line-strong: rgba(196, 173, 255, 0.26);
  --accent-soft: rgba(160, 120, 235, 0.15);
  --glass:       rgba(8, 5, 14, 0.62);
  --glow:        rgba(150, 106, 235, 0.40);
  --shadow-rgb:  0, 0, 0;
  --field-border: rgba(198, 180, 245, 0.48);
  --field-focus:  rgba(155, 123, 224, 0.30);
  --danger:       #FF8080;
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.40);
  --shadow-lift: 0 18px 44px rgba(0, 0, 0, 0.55);
  /* Lift the purple so it stays legible against a dark ground */
  --purple: #9B7BE0;
  --purple-deep: #C3AEF0;
}
[data-theme="dark"] body { background: var(--bg); }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* <picture> is only a format-switching wrapper; it must not become a box,
   or every layout rule targeting the img's parent breaks. */
picture { display: contents; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
}
p { max-width: 65ch; }
a { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--purple-fill-deep); color: var(--on-purple);
  padding: 0.8rem 1.4rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: 0.9rem 1.7rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled], .btn.is-disabled {
  opacity: 0.45; pointer-events: none;
}

/* White on brand orange is 2.88:1, below WCAG AA. Deep purple ink keeps the
   orange exactly as-is and lifts contrast to 5.39:1. */
.btn-primary { background: var(--orange); color: var(--purple-fill-deep); }
.btn-primary:hover {
  background: var(--orange-warm);
  color: var(--purple-fill-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(243, 115, 33, 0.32);
}

.btn-purple { background: var(--purple-fill); color: var(--on-purple); }
.btn-purple:hover {
  background: var(--purple-fill-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(80, 43, 138, 0.30);
}

.btn-secondary {
  background: var(--surface);
  color: var(--purple);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--purple); transform: translateY(-2px); }

.btn-secondary-dark {
  background: transparent;
  color: var(--on-purple);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-secondary-dark:hover { border-color: var(--on-purple); transform: translateY(-2px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  color: var(--purple);
}
.link-arrow .arr { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arr { transform: translateX(5px); }

/* ---------- Header ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  padding: 18px 0;
  transition: padding 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  padding: 10px 0;
  border-bottom: var(--border);
  box-shadow: 0 2px 18px rgba(var(--shadow-rgb), 0.10);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: flex; align-items: center; padding: 8px 12px 8px 0; flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; max-width: none; }
/* Two real assets, swapped by theme. No CSS inversion or filters. */
.nav-logo .logo-dark  { display: none; }
[data-theme="dark"] .nav-logo .logo-light { display: none; }
[data-theme="dark"] .nav-logo .logo-dark  { display: contents; }
.nav-links {
  display: flex; gap: 1.9rem; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm);
}
.nav-links a { position: relative; padding: 6px 2px; color: var(--grey-dark); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--orange);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--purple); }
.nav-cta { display: flex; gap: 0.7rem; align-items: center; }
.nav-links .menu-cta { display: none; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--purple-deep); padding: 8px;
}

/* ---------- Hero (light, split layout) ---------- */
.hero {
  position: relative;
  padding: 170px 0 90px;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(80, 43, 138, 0.10), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(243, 115, 33, 0.07), transparent 60%),
    var(--lavender);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 1.4rem;
}
.hero-eyebrow::before { content: ''; width: 30px; height: 2px; background: var(--orange); }
.hero h1 {
  font-family: var(--font-statement);
  font-weight: 800;
  font-size: var(--text-hero);
  line-height: 0.96;
  letter-spacing: -0.038em;
  margin-bottom: 1.4rem;
  color: var(--purple-deep);
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero-sub { font-size: var(--text-lg); color: var(--grey-mid); margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.hero-tagline {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-xs);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey-mid);
}
.hero-tagline strong { color: var(--purple); }

/* Hero visual: layered capability cards.
   Image fills the whole card; the label rides on top as a frosted chip,
   so the photograph gets every available pixel. Aspect ratios instead of
   fixed heights keeps crops honest at every width. */
.hero-visual { position: relative; min-height: 560px; }
.hv-card {
  position: absolute;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  background: var(--grey-light);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.hv-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.hv-img { width: 100%; height: 100%; overflow: hidden; }
.hv-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
/* Each card carries its own --rot so hover keeps the rotation instead of
   flattening it (a bare translateY would overwrite the transform). */
.hv-card { transform: rotate(var(--rot, 0deg)); }
.hv-card:hover {
  transform: translateY(-6px) rotate(var(--rot, 0deg));
  box-shadow: 0 26px 60px rgba(46, 23, 79, 0.22);
  z-index: 5;
}
.hv-card:hover .hv-img img { transform: scale(1.06); }

.hv-card .hv-label {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--on-purple);
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: rgba(46, 23, 79, 0.58);
  backdrop-filter: blur(10px);
  display: inline-flex; align-items: center; gap: 0.45rem;
  white-space: nowrap;
}
.hv-card .hv-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); flex: none;
}

/* Four-card cluster. Dominant card leads at left; three supporting cards
   orbit it. Positions chosen so overlaps are deliberate corner-bleeds,
   never a card sitting squarely on another's label. */
.hv-1 { width: 50%; aspect-ratio: 3 / 4; top: 20px;    left: 1%;  --rot: -1.4deg; z-index: 2; }
.hv-3 { width: 42%; aspect-ratio: 3 / 4; top: 8px;     right: 1%; --rot:  1.6deg; z-index: 1; }
.hv-2 { width: 47%; aspect-ratio: 4 / 3; bottom: 44px; right: 4%; --rot:  1.2deg; z-index: 3; }
.hv-4 { width: 36%; aspect-ratio: 1 / 1; bottom: 8px;  left: 4%;  --rot: -2deg;   z-index: 4; }

/* Dominant card labels from the top so the lower cards can overlap its
   base without ever burying its caption. */
.hv-1 .hv-label { top: 12px; bottom: auto; }

/* ---------- Carousel: client meta, crossfade, controls ---------- */
.hv-card { cursor: default; }
.hv-card[data-href]:not([data-href=""]) { cursor: pointer; }

.hv-meta {
  position: absolute; left: 12px; right: 12px; z-index: 2;
  bottom: 12px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--on-purple);
  text-shadow: 0 1px 10px rgba(20, 8, 38, 0.85);
  pointer-events: none;
}
.hv-1 .hv-meta { bottom: 12px; }
.hv-3 .hv-meta, .hv-2 .hv-meta, .hv-4 .hv-meta { bottom: 46px; }

/* Crossfade between slides. Only the photo and text fade; the card,
   its shadow and its position stay put so nothing reflows. */
.hv-img img, .hv-label, .hv-meta { transition: opacity 0.26s var(--ease); }
.hv-card.is-fading .hv-img img,
.hv-card.is-fading .hv-label,
.hv-card.is-fading .hv-meta { opacity: 0; }

.hv-dots {
  position: absolute; left: 2%; bottom: -30px; z-index: 6;
  display: flex; gap: 8px;
}
.hv-dots button {
  width: 26px; height: 4px; padding: 0;
  border: none; border-radius: 999px;
  background: rgba(46, 23, 79, 0.22);
  cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}
.hv-dots button.on { background: var(--orange); width: 40px; }
.hv-dots button:hover { background: rgba(46, 23, 79, 0.45); }
.hv-dots button.on:hover { background: var(--orange); }

.hv-1 .hv-img img { object-position: 50% 52%; }
.hv-3 .hv-img img { object-position: 50% 46%; }
.hv-2 .hv-img img { object-position: 50% 50%; }
.hv-4 .hv-img img { object-position: 46% 48%; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-grey { background: var(--bg-alt); }
.section-lavender { background: var(--bg-tint); }
.section-purple { background: var(--purple-fill-deep); color: rgba(255, 255, 255, 0.85); }
.section-purple h2, .section-purple h3 { color: var(--on-purple); }

.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head.centered { margin-inline: auto; text-align: center; }
.eyebrow {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 0.8rem;
}
.section-head h2 { font-size: var(--text-2xl); margin-bottom: 1rem; }
.section-head p { color: var(--grey-mid); }
.section-purple .section-head p { color: rgba(255, 255, 255, 0.72); }
.section-head.centered p { margin-inline: auto; }

/* ---------- Logo strip ---------- */
.logo-strip { padding: 46px 0; border-bottom: var(--border); }
.logo-strip-label {
  text-align: center; font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey-mid); margin-bottom: 26px;
}
.logo-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.4rem, 3.4vw, 2.8rem) clamp(1.8rem, 4vw, 3.2rem); align-items: center;
}
/* Logos are pre-normalised at build time into matched light/dark
   monochrome pairs, so NO css filter is applied. A blanket
   grayscale/invert destroys logos that are solid shapes (PUMA). */
.logo-row img {
  height: 40px; width: auto;
  max-width: 138px;
  object-fit: contain;
  opacity: 0.72;
  transition: opacity 0.3s;
}
.logo-row img:hover { opacity: 1; }
.logo-row .logo-dark { display: none; }
[data-theme="dark"] .logo-row .logo-light { display: none; }
[data-theme="dark"] .logo-row .logo-dark  { display: contents; }
.logo-ph {
  font-size: var(--text-xs); color: var(--grey-mid);
  border: 1.5px dashed rgba(107, 107, 107, 0.4);
  border-radius: 8px; padding: 8px 18px;
}

/* ---------- Service cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.svc-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 0.7rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s;
}
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(80, 43, 138, 0.22);
}
.svc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--lavender);
  display: grid; place-items: center;
  color: var(--purple);
  margin-bottom: 0.4rem;
}
.svc-card:hover .svc-icon { background: var(--orange); color: var(--purple-fill-deep); transition: background 0.3s, color 0.3s; }
.svc-card h3 { font-size: 1.1rem; font-weight: 700; }
.svc-card p { font-size: var(--text-sm); color: var(--grey-mid); flex-grow: 1; }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.work-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--grey-light);
  border: var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.work-media { aspect-ratio: 16 / 10.5; background: var(--grey-light); overflow: hidden; }
.work-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-card:hover .work-media img { transform: scale(1.045); }
.work-media.ph {
  display: grid; place-items: center;
  color: var(--grey-mid); font-size: var(--text-sm);
  border-bottom: 1.5px dashed rgba(107, 107, 107, 0.35);
}
.work-body { background: var(--white); padding: 22px 24px 26px; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag {
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--purple); background: var(--lavender);
  padding: 4px 11px; border-radius: 999px;
}
.work-body h3 { font-size: var(--text-lg); margin-bottom: 4px; }
.work-client { font-size: var(--text-xs); color: var(--grey-mid); margin-bottom: 10px; }
.work-body p { font-size: var(--text-sm); color: var(--grey-mid); margin-bottom: 14px; }

/* ---------- Featured case study ---------- */
.work-card-featured .work-media { aspect-ratio: 21 / 9; }
.work-card-featured .work-body { padding: 32px 36px 36px; }
.work-card-featured h3 { font-size: var(--text-2xl); margin-bottom: 10px; }
.work-card-featured p { font-size: var(--text-base); max-width: 640px; }

/* ---------- Capability cards ---------- */
.cap-card { text-align: left; }
.cap-card p { flex-grow: 0; }
.cap-list {
  list-style: none; padding: 0; margin: 2px 0 4px;
  display: flex; flex-wrap: wrap; gap: 4px 0;
  font-size: var(--text-xs); color: var(--grey-mid);
}
.cap-list li:not(:last-child)::after { content: "·"; margin: 0 8px; color: rgba(107, 107, 107, 0.5); }

/* ---------- Project proof ---------- */
.proof-item {
  background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 20px 16px; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  color: var(--purple-deep);
}

/* ---------- Process timeline ---------- */
.process { counter-reset: step; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.step {
  position: relative;
  background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 26px 18px 22px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem;
  color: var(--on-purple); background: var(--purple-fill);
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.step:hover::before { background: var(--orange); transition: background 0.3s; }
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: 0.85rem; color: var(--grey-mid); }

/* ---------- Benefit blocks ---------- */
.benefit {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 22px;
}
.benefit-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  background: var(--lavender); color: var(--purple);
  display: grid; place-items: center;
}
.benefit h3 { font-size: 1rem; margin-bottom: 4px; }
.benefit p { font-size: var(--text-sm); color: var(--grey-mid); }

/* ---------- Ecosystem diagram ---------- */
.eco {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.eco-node {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  background: var(--white); border: var(--border);
  padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.eco-node.hub {
  background: var(--purple-fill); color: var(--on-purple);
  padding: 16px 28px; font-size: var(--text-base);
}
.eco-arrow { color: var(--orange); flex-shrink: 0; }
.eco-cluster { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Testimonials ---------- */
.testi {
  background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.testi blockquote { font-size: var(--text-base); color: var(--grey-dark); }
.testi-person { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--lavender); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; color: var(--purple);
}
.testi-person strong { font-family: var(--font-display); font-size: var(--text-sm); color: var(--black); display: block; }
.testi-person span { font-size: var(--text-xs); color: var(--grey-mid); }
.ph-note {
  font-size: var(--text-xs); color: var(--grey-mid);
  border: 1.5px dashed rgba(107, 107, 107, 0.4);
  border-radius: 8px; padding: 6px 12px; display: inline-block;
}

/* ---------- Story / G-Hive split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-media {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--grey-light); border: var(--border);
  aspect-ratio: 4 / 3;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media.ph { display: grid; place-items: center; color: var(--grey-mid); font-size: var(--text-sm); border-style: dashed; }
.split-content h2 { font-size: var(--text-2xl); margin-bottom: 1.1rem; }
.split-content p { color: var(--grey-mid); margin-bottom: 1.1rem; }

/* ---------- Insights ---------- */
.article-card {
  background: var(--white); border: var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.article-media { aspect-ratio: 16 / 9; background: var(--lavender); display: grid; place-items: center; color: var(--purple); }
.article-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.article-body h3 { font-size: var(--text-lg); }
.article-body p { font-size: var(--text-sm); color: var(--grey-mid); flex-grow: 1; }

/* ---------- Final CTA ---------- */
.cta-final {
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(243, 115, 33, 0.16), transparent 55%),
    var(--purple-fill-deep);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 6vw, 5.5rem);
  text-align: center;
  color: var(--on-purple);
}
.cta-final h2 { color: var(--on-purple); font-size: var(--text-2xl); margin-bottom: 0.9rem; }
.cta-final p { color: rgba(255, 255, 255, 0.75); margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  /* minmax(0,1fr) removes the min-content floor so a wide intrinsic control
     (notably input[type=file]) can no longer force the grid past its container */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
}
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  color: var(--black);
}
.form-field .hint { font-size: var(--text-xs); color: var(--grey-mid); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; max-width: 100%; min-width: 0;
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--field-focus);
}
.form-note { font-size: var(--text-sm); color: var(--grey-mid); margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { background: var(--purple-fill-deep); color: rgba(255, 255, 255, 0.75); padding: 72px 0 0; }
.footer a:hover { color: var(--orange-warm); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px; padding-bottom: 48px;
}
.footer-brand img { height: 40px; margin-bottom: 18px; }
.footer-brand p { font-size: var(--text-sm); }
.footer h4 {
  color: var(--on-purple); font-size: var(--text-sm); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: var(--text-xs);
}
.footer-legal { display: flex; gap: 1.4rem; }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid; place-items: center;
  transition: border-color 0.25s, background 0.25s;
}
.social-row a:hover { border-color: var(--orange); background: rgba(243, 115, 33, 0.15); }

/* ---------- Reveal on scroll (safe default: visible) ---------- */
.js-reveal .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .reveal-d1 { transition-delay: 0.08s; }
.js-reveal .reveal-d2 { transition-delay: 0.16s; }
.js-reveal .reveal-d3 { transition-delay: 0.24s; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  padding: 160px 0 70px;
  background: var(--lavender);
}
.page-hero h1 { font-size: var(--text-2xl); color: var(--purple-deep); margin-bottom: 0.8rem; }
.page-hero p { color: var(--grey-mid); font-size: var(--text-lg); }

/* ---------- Filter tabs (Work page) ---------- */
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 44px; }
.filter-tab {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  padding: 0.55rem 1.25rem; border-radius: 999px;
  background: var(--white); color: var(--grey-dark);
  border: 1.5px solid rgba(46, 23, 79, 0.15);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab:hover { border-color: var(--purple); color: var(--purple); }
.filter-tab.active {
  background: var(--purple-fill); color: var(--on-purple); border-color: var(--purple-fill);
}

/* ---------- Accordion (FAQ) ---------- */
.accordion { border: var(--border); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.accordion + .accordion { margin-top: 14px; }
.accordion summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-base);
  color: var(--black);
  padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: '+'; font-size: 1.4rem; font-weight: 600; color: var(--orange);
  transition: transform 0.3s var(--ease);
}
.accordion[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 24px 22px; color: var(--grey-mid); font-size: var(--text-sm); }

/* ---------- Values (About page) ---------- */
.value-card {
  background: var(--white); border: var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
}
.value-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.value-card p { font-size: var(--text-sm); color: var(--grey-mid); margin-inline: auto; }
.value-num {
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  color: var(--orange); margin-bottom: 10px; letter-spacing: 0.1em;
}

/* ---------- Service detail blocks ---------- */
.svc-detail {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: 56px 0; border-bottom: var(--border);
  align-items: start;
}
.svc-detail:last-of-type { border-bottom: none; }
.svc-detail h3 { font-size: var(--text-xl); margin: 0.4rem 0 0.9rem; }
.svc-detail .svc-problem { color: var(--grey-mid); margin-bottom: 1.2rem; }
.svc-detail ul { list-style: none; display: grid; gap: 9px; font-size: var(--text-sm); color: var(--grey-dark); }
.svc-detail ul li { display: flex; gap: 10px; align-items: baseline; }
.svc-detail ul li::before { content: '✓'; color: var(--orange); font-weight: 700; flex-shrink: 0; }
.svc-detail-side {
  background: var(--grey-light); border-radius: var(--radius);
  padding: 26px; font-size: var(--text-sm);
}
.svc-detail-side h4 {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--grey-mid); margin-bottom: 12px;
}
.svc-detail-side p { color: var(--grey-dark); margin-bottom: 18px; }

/* ---------- Form states ---------- */
.form-field input.error, .form-field select.error, .form-field textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.10);
}
.field-error { font-size: var(--text-xs); color: var(--danger); display: none; }
.form-field.has-error .field-error { display: block; }
.form-success {
  display: none;
  background: #EAF7EF; border: 1.5px solid #2E7D4F; color: #205A39;
  border-radius: var(--radius); padding: 22px 26px; margin-top: 24px;
  font-size: var(--text-sm);
}
.form-success.show { display: block; }

/* ---------- Article / legal prose ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: var(--text-xl); margin: 2.4rem 0 0.9rem; }
.prose h3 { font-size: var(--text-lg); margin: 1.8rem 0 0.7rem; }
.prose p { margin-bottom: 1.1rem; color: var(--grey-dark); }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.3rem; color: var(--grey-dark); }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--black); }
.prose .lead { font-size: var(--text-lg); color: var(--grey-mid); }
.article-meta {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-mid);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid, .split, .svc-detail { grid-template-columns: 1fr; }

  /* Selected work becomes one-card-at-a-time swipe. Native scroll-snap:
     no JS, keyboard-scrollable via the tabindex on the region. */
  .work-scroller {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 24px;
    gap: 14px;
    margin-inline: -24px;
    padding: 4px 24px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .work-scroller::-webkit-scrollbar { display: none; }
  .work-scroller > .work-card {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
  .work-scroller:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
  /* Once the hero stacks, the overlapping collage would grow far too tall
     (absolute children don't extend the parent), so it becomes a tidy grid. */
  .hero-visual {
    min-height: 0; margin-top: 1.4rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  /* relative, NOT static: each card must stay its own containing block or the
     absolutely positioned labels all collapse onto .hero-visual's corner */
  /* relative, NOT static: each card must stay its own containing block or the
     absolutely positioned labels all collapse onto .hero-visual's corner */
  .hero-visual .hv-card { position: relative; inset: auto; width: 100%; --rot: 0deg; }
  .hero-visual .hv-1 { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .hero-visual .hv-3 { aspect-ratio: 1 / 1; }
  .hero-visual .hv-2 { aspect-ratio: 1 / 1; }
  /* One primary card plus two supporting cards is the mobile brief;
     the fourth would force a lone orphan on a two-column row. */
  .hero-visual .hv-4 { display: none; }
  .hero-visual .hv-1 .hv-label { top: auto; bottom: 12px; }
  .hero-visual .hv-1 .hv-meta { bottom: 46px; }
  /* Dots rejoin the flow under the stacked cards */
  .hv-dots {
    position: static; grid-column: 1 / -1;
    justify-content: center; margin-top: 4px;
  }
  .work-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  /* backdrop-filter creates a containing block that traps the
     fixed-position menu overlay, so disable it on mobile.
     Background must follow the theme token, not a hardcoded white,
     or the dark-mode logo lands on a white bar. */
  .nav { backdrop-filter: none; background: var(--surface); }
  .nav-links {
    position: fixed; inset: 0;
    background: var(--purple-fill-deep);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2rem; font-size: var(--text-lg); color: var(--on-purple);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  /* Explicit states at (0,2,2) so nothing, including the
     [aria-current] rule at (0,2,1) or a :visited default, can
     turn a link dark against the purple overlay. */
  .nav-links li a,
  .nav-links li a:link,
  .nav-links li a:visited { color: var(--on-purple); opacity: 1; }
  .nav-links li a:hover,
  .nav-links li a:focus { color: var(--orange); }
  .nav-links li a:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; border-radius: 4px; }
  .nav-links li a[aria-current="page"],
  .nav-links li a[aria-current="page"]:link,
  .nav-links li a[aria-current="page"]:visited { color: var(--orange); }
  .nav-links a::after { display: none; }
  /* Menu control must stay legible on the purple overlay in BOTH themes */
  .nav.menu-open .nav-toggle { color: #fff; border-color: rgba(255, 255, 255, 0.42); }
  .nav-links.open { transform: none; }
  .nav-toggle { display: block; z-index: 101; }
  .nav-cta { display: none; }
  .nav-logo img { height: 32px; }
  .nav-links .menu-cta { display: block; margin-top: 0.8rem; }
  .menu-cta .btn { font-size: 1rem; padding: 0.95rem 2.2rem; }
}
@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .grid-4, .grid-2, .process { grid-template-columns: 1fr; }

  /* Process becomes a connected vertical timeline rather than six loose boxes.
     The rail is drawn behind the numbered nodes, which sit outside each card. */
  .process {
    position: relative;
    gap: 14px;
    padding-left: 52px;
  }
  .process::before {
    content: '';
    position: absolute;
    left: 19px; top: 12px; bottom: 12px;
    width: 2px;
    background: linear-gradient(to bottom,
      var(--purple) 0%, var(--purple) 82%, rgba(80, 43, 138, 0.15) 100%);
  }
  .step { padding: 18px 18px 18px 20px; }
  .step::before {
    position: absolute;
    left: -52px; top: 16px;
    margin-bottom: 0;
    width: 38px; height: 38px;
    box-shadow: 0 0 0 5px var(--white);
  }
  .step:hover { transform: none; box-shadow: none; }
  .step h3 { font-size: 1.02rem; }
  .step p { font-size: 0.92rem; line-height: 1.55; }
  .footer-grid { grid-template-columns: 1fr; }
  /* Tighten the upper hero so the top of the carousel reaches the first
     viewport. Values tuned against 375/390/393/430 stacks. */
  .hero { padding: 96px 0 48px; }
  .hero-eyebrow { letter-spacing: 0.1em; margin-bottom: 0.75rem; }
  .hero h1 { margin-bottom: 1.12rem; }
  .hero-sub { font-size: 1rem; line-height: 1.48; margin-bottom: 1.38rem; }
  .hero-actions { margin-bottom: 1.25rem; }
  .hero-carousel { margin-top: 1.12rem; }
  body { font-size: 1rem; }

  /* Phone: taller lead image, tighter seams, smaller chips */
  .hero-visual { gap: 8px; }
  .hero-visual .hv-1 { aspect-ratio: 4 / 3; }
  .hv-card .hv-label { font-size: 0.62rem; left: 9px; bottom: 9px; padding: 6px 10px 6px 9px; }
}

/* =====================================================
   THEME TOGGLE
   ===================================================== */
.theme-toggle {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.theme-toggle:hover { background: var(--accent-soft); border-color: var(--purple); color: var(--purple); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* =====================================================
   DARK-MODE COMPONENT ADJUSTMENTS
   Targeted fixes where a light-mode value cannot simply
   be re-tokenised.
   ===================================================== */
[data-theme="dark"] .hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(155, 123, 224, 0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(243, 115, 33, 0.10), transparent 60%),
    var(--bg-tint);
}
/* Client logos are dark artwork: invert so they read on a dark ground */

[data-theme="dark"] .svc-card,
[data-theme="dark"] .step,
[data-theme="dark"] .benefit,
[data-theme="dark"] .proof-item,
[data-theme="dark"] .eco-node,
[data-theme="dark"] .article-card,
[data-theme="dark"] .work-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .section-lavender .svc-card,
[data-theme="dark"] .section-lavender .benefit { background: var(--surface-2); }
[data-theme="dark"] .work-body { background: var(--surface); }
[data-theme="dark"] .svc-icon, [data-theme="dark"] .benefit-icon { background: var(--accent-soft); color: var(--purple); }
[data-theme="dark"] .tag { background: var(--accent-soft); color: var(--purple-deep); }
[data-theme="dark"] .split-media.ph, [data-theme="dark"] .work-media.ph { background: var(--bg-alt); }
[data-theme="dark"] .btn-secondary:hover { background: var(--accent-soft); }
[data-theme="dark"] .filter-tab { border-color: var(--line-strong); color: var(--text-soft); }

/* =====================================================
   HERO CAROUSEL, 3D coverflow
   Side cards rotate away in perspective rather than merely
   scaling, which is what gives the composition real depth.
   ===================================================== */
.hero-carousel {
  position: relative;
  min-height: 560px;
  perspective: 1500px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  user-select: none;
}
.hc-card {
  position: absolute;
  top: 50%; left: 50%;
  width: 56%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition:
    transform 0.7s var(--ease),
    opacity 0.7s var(--ease),
    box-shadow 0.7s var(--ease),
    filter 0.7s var(--ease);
  will-change: transform;
}

/* --- positions --- */
.hc-card.is-prev {
  transform: translate(-50%, -50%) translateX(-58%) rotateY(26deg) scale(0.84);
  z-index: 1; opacity: 0.85;
  filter: brightness(0.72) saturate(0.9);
  box-shadow: 0 18px 40px rgba(var(--shadow-rgb), 0.35);
}
.hc-card.is-next {
  transform: translate(-50%, -50%) translateX(58%) rotateY(-26deg) scale(0.84);
  z-index: 1; opacity: 0.85;
  filter: brightness(0.72) saturate(0.9);
  box-shadow: 0 18px 40px rgba(var(--shadow-rgb), 0.35);
}
.hc-card.is-active {
  transform: translate(-50%, -50%) rotateY(0deg) scale(1);
  z-index: 3; opacity: 1;
  filter: none;
  cursor: default;
  box-shadow:
    0 30px 70px rgba(var(--shadow-rgb), 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 5px rgba(255, 255, 255, 0.06),
    0 0 60px var(--glow);
}
.hc-card.is-prev:hover, .hc-card.is-next:hover {
  filter: brightness(0.86) saturate(1);
  opacity: 1;
}
.hc-card.is-prev:hover { transform: translate(-50%, -50%) translateX(-56%) rotateY(22deg) scale(0.87); }
.hc-card.is-next:hover { transform: translate(-50%, -50%) translateX(56%) rotateY(-22deg) scale(0.87); }
.hc-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }

.hc-img { width: 100%; height: 100%; }
.hc-img img { width: 100%; height: 100%; object-fit: cover; }

/* --- caption: pill + title, glass, active card only --- */
.hc-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 40px 18px 18px;
  background: linear-gradient(to top, rgba(10, 6, 18, 0.92) 12%, rgba(10, 6, 18, 0.55) 55%, transparent 100%);
  color: #fff;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.hc-card.is-active .hc-cap { opacity: 1; transform: none; }
.hc-cat {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff;
  background: var(--purple-fill);
  padding: 5px 11px; border-radius: 999px;
  margin-bottom: 10px;
}
.hc-title {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.06rem; line-height: 1.25; color: #fff;
  max-width: 78%;
}
.hc-client {
  display: block; margin-top: 5px;
  font-size: 0.74rem; color: rgba(255, 255, 255, 0.72);
}
/* small side-card label so inactive cards still read */
.hc-card:not(.is-active) .hc-cap {
  opacity: 1; transform: none;
  padding: 30px 12px 12px;
  background: linear-gradient(to top, rgba(10, 6, 18, 0.88), transparent 78%);
}
.hc-card:not(.is-active) .hc-cat { font-size: 0.54rem; padding: 4px 8px; margin-bottom: 6px; }
.hc-card:not(.is-active) .hc-title { font-size: 0.78rem; max-width: 100%; }
.hc-card:not(.is-active) .hc-client { display: none; }

/* --- circular action button on the active card --- */
.hc-go {
  position: absolute; right: 16px; bottom: 18px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--purple-fill-deep);
  border: none; cursor: pointer;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), background 0.25s;
}
.hc-card.is-active .hc-go { opacity: 1; transform: none; }
.hc-go:hover { background: #fff; transform: scale(1.08); }
.hc-go:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.hc-card:not(.is-active) .hc-go { pointer-events: none; }

/* --- controls --- */
.hc-nav {
  position: absolute; bottom: 0; z-index: 6;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}
.hc-nav:hover { background: var(--accent-soft); border-color: var(--purple); color: var(--purple); transform: scale(1.06); }
.hc-nav:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.hc-prev { left: 4%; }
.hc-next { right: 4%; }

.hc-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 8px; z-index: 6;
  display: flex; gap: 8px; align-items: center;
}
.hc-dots button {
  width: 8px; height: 8px; padding: 0;
  border: none; border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}
.hc-dots button.on { background: var(--purple); width: 30px; }
.hc-dots button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

@media (max-width: 900px) {
  .hero-carousel { min-height: 460px; margin-top: 1.6rem; perspective: 1100px; }
  .hc-card { width: 62%; }
  .hc-card.is-prev { transform: translate(-50%, -50%) translateX(-54%) rotateY(24deg) scale(0.8); }
  .hc-card.is-next { transform: translate(-50%, -50%) translateX(54%) rotateY(-24deg) scale(0.8); }
}
@media (max-width: 560px) {
  .hero-carousel { min-height: 400px; perspective: 900px; }
  .hc-card { width: 66%; border-radius: 18px; }
  .hc-card.is-prev { transform: translate(-50%, -50%) translateX(-52%) rotateY(22deg) scale(0.76); }
  .hc-card.is-next { transform: translate(-50%, -50%) translateX(52%) rotateY(-22deg) scale(0.76); }
  .hc-title { font-size: 0.95rem; }
  .hc-go { width: 38px; height: 38px; right: 12px; bottom: 14px; }
  .hc-nav { width: 36px; height: 36px; }
  .hc-prev { left: 0; } .hc-next { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-card, .hc-cap, .hc-go { transition-duration: 0.01ms !important; }
}

/* Work cards: premium hover lift + restrained glow */
.work-card { cursor: pointer; }
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 52px rgba(var(--shadow-rgb), 0.20), 0 0 0 1px var(--line-strong), 0 0 32px var(--glow);
}
.work-card:focus-within { outline: 3px solid var(--orange); outline-offset: 3px; }

/* =====================================================
   HEADER LAYOUT
   Desktop: logo left, nav centre-right, actions right.
   Mobile: three EQUAL regions so the logo is mathematically
   centred rather than eyeballed.
   ===================================================== */
.nav-inner > .theme-toggle { order: 4; }          /* desktop: sits with the actions */
.nav-inner > .nav-logo     { order: 1; }
.nav-inner > nav           { order: 2; }
.nav-inner > .nav-cta      { order: 3; }
.nav-inner > .nav-toggle   { order: 5; }

@media (max-width: 860px) {
  .nav { padding: 10px 0; }
  .nav.scrolled { padding: 8px 0; }
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;   /* equal outer regions => true centre */
    align-items: center;
    gap: 0;
  }
  .nav-inner > .theme-toggle { order: 1; justify-self: start; }
  .nav-inner > .nav-logo     { order: 2; justify-self: center; padding: 4px 0; }
  .nav-inner > .nav-toggle   { order: 3; justify-self: end; }
  .nav-inner > nav           { order: 4; }
  .nav-logo img { height: 30px; }
  /* Matching visual weight left and right */
  .theme-toggle, .nav-toggle {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 10px;
  }
  .nav-toggle { border: 1px solid var(--line-strong); color: var(--text); padding: 0; }
  /* The open menu overlay must sit above the header row */
  .nav-inner > nav { position: static; }
}
@media (max-width: 360px) {
  .nav-logo img { height: 26px; }
  .theme-toggle, .nav-toggle { width: 38px; height: 38px; }
}

/* =====================================================
   FOOTER, dark-mode contrast
   The footer is always deep purple, so its headings need
   knockout treatment in BOTH themes.
   ===================================================== */
.footer h4 {
  color: #FFFFFF;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.footer a { color: rgba(255, 255, 255, 0.80); transition: color 0.25s; }
.footer a:hover { color: var(--orange); }
.footer li { color: rgba(255, 255, 255, 0.80); }
.footer-brand p { color: rgba(255, 255, 255, 0.72); }
.footer-bottom, .footer-bottom span { color: rgba(255, 255, 255, 0.66); }
.footer-brand img { height: 40px; width: auto; max-width: 260px; object-fit: contain; }

/* =====================================================
   G-HIVE, no placeholder container
   ===================================================== */
.ghive-note {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--purple);
  background: var(--accent-soft);
  padding: 9px 15px; border-radius: 999px;
}
.ghive-note::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange); flex: none;
}

/* =====================================================
   CREATIVE HIVE MODEL, clear vertical flow
   ===================================================== */
.flow { max-width: 720px; margin-inline: auto; display: grid; gap: 0; }
.flow-step {
  background: var(--surface); border: var(--border);
  border-radius: var(--radius);
  padding: 20px 24px; text-align: center;
}
.flow-step h3 {
  font-size: 1.02rem; margin-bottom: 4px;
}
.flow-step p { font-size: var(--text-sm); color: var(--text-soft); margin-inline: auto; }
.flow-step.is-hub {
  background: var(--purple-fill); border-color: var(--purple-fill);
}
.flow-step.is-hub h3, .flow-step.is-hub p { color: #fff; }
.flow-step.is-hub p { color: rgba(255,255,255,0.78); }
.flow-arrow {
  justify-self: center;
  width: 2px; height: 26px;
  background: linear-gradient(to bottom, var(--line-strong), var(--purple));
  position: relative;
}
.flow-arrow::after {
  content: ''; position: absolute; bottom: -1px; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid var(--purple);
}
.flow-net {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 12px;
}
.flow-net span {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-xs);
  background: var(--accent-soft); color: var(--purple);
  padding: 6px 13px; border-radius: 999px;
}

/* =====================================================
   PROJECT GALLERY LIGHTBOX
   ===================================================== */
.gal-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.06em;
  color: #fff;
  background: rgba(12, 8, 20, 0.62);
  backdrop-filter: blur(8px);
  padding: 6px 11px; border-radius: 999px;
  pointer-events: none;
}
.work-card { position: relative; }

.lb {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  background: rgba(6, 4, 11, 0.94);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.lb.open { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.lb-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; color: #fff;
  max-width: 1100px; width: 100%; margin-inline: auto;
}
.lb-meta .lb-cat {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--purple-fill); color: #fff;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 8px;
}
.lb-meta h3 { color: #fff; font-size: 1.15rem; margin-bottom: 2px; }
.lb-meta p { color: rgba(255,255,255,0.68); font-size: var(--text-sm); margin: 0; }
.lb-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.24);
  color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background 0.25s;
}
.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 0;
  max-width: 1100px; width: 100%; margin-inline: auto;
  touch-action: pan-y;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  border-radius: 12px;
  object-fit: contain;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.24);
  color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background 0.25s;
}
.lb-nav:hover { background: rgba(255,255,255,0.24); }
.lb-prev { left: 4px; } .lb-next { right: 4px; }

.lb-foot {
  max-width: 1100px; width: 100%; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.lb-count {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-sm); color: rgba(255,255,255,0.82);
  flex: none;
}
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumbs button {
  flex: 0 0 auto; width: 62px; height: 46px;
  border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; padding: 0; cursor: pointer; background: none;
  opacity: 0.5; transition: opacity 0.25s, border-color 0.25s;
}
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button.on { opacity: 1; border-color: var(--orange); }
.lb-thumbs button:hover { opacity: 0.85; }
.lb :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (max-width: 620px) {
  .lb { padding: 12px; }
  .lb-meta h3 { font-size: 1rem; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-thumbs button { width: 52px; height: 40px; }
  .lb-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .lb-count { text-align: center; }
}

/* =====================================================
   SHORT PHONE SCREENS (e.g. 375x667)
   Height-targeted so taller phones keep their generous
   hero spacing. Headline stays large; only gaps tighten.
   ===================================================== */
@media (max-width: 620px) and (max-height: 720px) {
  .hero { padding: 80px 0 40px; }
  .hero h1 { font-size: clamp(2.05rem, 8.8vw, 2.4rem); margin-bottom: 0.75rem; }
  .hero-eyebrow { margin-bottom: 0.5rem; }
  .hero-sub { font-size: 0.97rem; line-height: 1.42; margin-bottom: 0.88rem; }
  .hero-actions { margin-bottom: 0.75rem; }
  .hero-carousel { margin-top: 0.62rem; min-height: 330px; }
  /* touch targets must not shrink */
  .hero-actions .btn { padding: 0.85rem 1.5rem; }
}

/* ---------- Form overflow guards ---------- */
.form-field textarea { resize: vertical; }
/* The file picker is the widest intrinsic control; let it wrap and shrink. */
.form-field input[type="file"] {
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
}
.form-field input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 0.45rem 0.8rem;
  border: 1px solid var(--field-border); border-radius: 8px;
  background: var(--bg-alt); color: var(--text-body);
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  cursor: pointer; max-width: 60%;
}
.form-field .field-error, .form-field .hint {
  overflow-wrap: anywhere;   /* long validation text wraps inside the field */
}
#enquiry-form { max-width: 100%; }
#enquiry-form button[type="submit"] { max-width: 100%; }
@media (max-width: 620px) {
  #enquiry-form button[type="submit"] { width: 100%; }
}
