/* ============================================================
   VIRIBUS — Design System CSS
   Glassmorphism · Copper · Playfair Display + Inter
============================================================ */

/* ============================================================
   1. CSS RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
ul[role="list"] { list-style: none; }
a { text-decoration: none; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   2. DESIGN TOKENS
============================================================ */
:root {
  /* Brand colors */
  --copper:         #B87333;
  --copper-dark:    #8B5423;
  --copper-light:   #D4956A;
  --copper-subtle:  #F0E0D0;

  /* Neutrals */
  --bg:             #F8F7F5;
  --text-primary:   #1A1814;
  --text-secondary: #4A4440;
  --text-tertiary:  #8A8480;
  --white:          #FFFFFF;

  /* Glass */
  --glass-fill:     rgba(255, 255, 255, 0.65);
  --glass-border:   rgba(255, 255, 255, 0.50);

  /* Shadows */
  --shadow-card:  0 8px 32px rgba(184, 115, 51, 0.12);
  --shadow-hover: 0 16px 48px rgba(184, 115, 51, 0.18);
  --shadow-nav:   0 4px 20px rgba(184, 115, 51, 0.08);
  --shadow-btn:   0 4px 16px rgba(184, 115, 51, 0.30);

  /* Border radii */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 9999px;

  /* Spacing (8px grid) */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   32px;
  --sp-2xl:  48px;
  --sp-3xl:  64px;
  --sp-4xl:  96px;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-pad: clamp(16px, 4vw, 64px);
  --nav-height:    80px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   3. TYPOGRAPHY
============================================================ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 5vw + 0.5rem, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw + 0.25rem, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2vw + 0.25rem, 1.625rem); font-weight: 400; }
h4 { font-size: 1rem; font-weight: 600; font-family: var(--font-body); }

p { color: var(--text-secondary); line-height: 1.7; }

::selection {
  background: var(--copper);
  color: #fff;
}

.viribus {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--copper);
}

/* ============================================================
   4. UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--copper);
  text-transform: uppercase;
  margin-bottom: var(--sp-md);
}

.section-label--light { color: rgba(255, 255, 255, 0.5); }
.section-label--copper { color: var(--copper); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-3xl);
}

.section-header h2 { margin-bottom: var(--sp-md); }

.section-subline {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-inline: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(184, 115, 51, 0.10);
  border: 1px solid rgba(184, 115, 51, 0.25);
  font-size: 12px;
  font-weight: 500;
  color: var(--copper-dark);
  letter-spacing: 0.3px;
}

/* Buttons — fluid sizing across viewports */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(11px, 1.6vw, 14px) clamp(18px, 4vw, 28px);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: clamp(0.875rem, 1.2vw + 0.5rem, 0.9375rem);
  line-height: 1.2;
  transition: all 280ms var(--ease-spring);
  white-space: nowrap;
  min-height: clamp(44px, 6vw, 48px);
  text-align: center;
}

.btn--lg {
  padding: clamp(13px, 2vw, 16px) clamp(22px, 5vw, 36px);
  font-size: clamp(0.9375rem, 1.4vw + 0.5rem, 1rem);
  min-height: clamp(48px, 7vw, 54px);
}

.btn--primary {
  background: var(--copper-dark);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover {
  background: #6F421B;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 115, 51, 0.40);
}

.btn--secondary {
  background: var(--glass-fill);
  border: 1px solid rgba(184, 115, 51, 0.50);
  color: var(--copper-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--copper);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--copper);
  background: transparent;
  padding-inline: 0;
}
.btn--ghost:hover { color: var(--copper-dark); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--copper);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: var(--sp-md); }

/* ============================================================
   5. NAVIGATION
   Floating glass pill · sliding hover indicator · rolling links
   Services mega panel · hide-on-scroll · scroll progress
============================================================ */
.nav {
  --progress: 0;
  position: fixed;
  top: var(--sp-md);
  left: var(--sp-md);
  right: var(--sp-md);
  max-width: 1240px;
  margin-inline: auto;
  z-index: 100;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 24px rgba(184, 115, 51, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.5s var(--ease-spring), top 0.35s var(--ease-out);
}

.nav--scrolled {
  top: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 40px rgba(26, 24, 20, 0.08), 0 2px 8px rgba(184, 115, 51, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav--hidden { transform: translateY(calc(-100% - 24px)); }

.nav__inner {
  padding-inline: var(--sp-lg) var(--sp-sm);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  transition: height 0.35s var(--ease-out);
}

.nav--scrolled .nav__inner { height: 66px; }

.nav__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-spring);
}

.nav__brand:hover { transform: scale(1.04); }

.nav__logo {
  height: 54px;
  width: auto;
  transition: height 0.35s var(--ease-out);
}

.nav--scrolled .nav__logo { height: 44px; }

/* ---- Desktop links ---- */
.nav__menu {
  display: none;
  position: relative;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Pill that glides to whichever link is hovered */
.nav__indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: 38px;
  width: var(--ind-w, 0px);
  transform: translate(var(--ind-x, 0px), -50%);
  border-radius: var(--radius-pill);
  background: rgba(184, 115, 51, 0.1);
  box-shadow: inset 0 0 0 1px rgba(184, 115, 51, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring), opacity 0.25s ease;
}

.nav__menu.has-indicator .nav__indicator { opacity: 1; }

.nav__link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav__link:hover { color: var(--text-primary); }

/* Rolling text: label slides up, copper copy rolls in */
.nav__roll {
  display: inline-block;
  height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
}

.nav__roll > span {
  display: block;
  text-shadow: 0 1.4em 0 var(--copper);
  transition: transform 0.5s var(--ease-spring);
}

.nav__link:hover .nav__roll > span,
.nav__link:focus-visible .nav__roll > span { transform: translateY(-1.4em); }

/* Current page: copper text + dot */
.nav__link[aria-current="page"],
.nav__link--active { color: var(--copper); }

.nav__link[aria-current="page"]::after,
.nav__link--active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--copper);
  transform: translateX(-50%);
}

.nav__link[aria-current="page"] .nav__roll > span,
.nav__link--active .nav__roll > span { text-shadow: 0 1.4em 0 var(--copper-dark); }

/* ---- CTA: dark pill with copper icon + shine sweep ---- */
.nav__cta {
  position: relative;
  display: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 6px 6px 6px 20px;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(26, 24, 20, 0.18);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease, background 0.3s ease;
}

.nav__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
}

.nav__cta:hover {
  transform: translateY(-1px);
  background: #2a2520;
  box-shadow: 0 10px 28px rgba(184, 115, 51, 0.3);
}

.nav__cta:hover::before { left: 120%; }

.nav__cta-label { position: relative; }

.nav__cta-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--copper);
  color: #fff;
  transition: transform 0.4s var(--ease-spring);
}

.nav__cta:hover .nav__cta-icon { transform: rotate(45deg); }

/* ---- Scroll progress ---- */
.nav__progress {
  position: absolute;
  left: var(--radius-xl);
  right: var(--radius-xl);
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--copper-light), var(--copper), var(--copper-dark));
  transform: scaleX(var(--progress));
  transform-origin: left;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav--scrolled .nav__progress { opacity: 1; }

/* ---- Hamburger: two lines morph into an X ---- */
.nav__hamburger {
  position: relative;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 4px 14px rgba(26, 24, 20, 0.18);
  transition: background 0.25s ease, transform 0.35s var(--ease-spring);
}

.nav__hamburger:hover { background: var(--copper); }
.nav__hamburger:active { transform: scale(0.94); }

.nav__hamburger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring);
}

.nav__hamburger span:nth-child(1) { transform: translate(-50%, -4px); }
.nav__hamburger span:nth-child(2) { width: 12px; transform: translate(calc(-50% + 3px), 3px); }

.nav__hamburger[aria-expanded="true"] { background: var(--copper); }
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { width: 18px; transform: translate(-50%, 0) rotate(-45deg); }

/* ---- Mobile menu: the pill expands into a full card ---- */
.nav__mobile-menu {
  display: grid;
  grid-template-areas: "list" "foot";
  grid-template-rows: 0fr 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease-spring), opacity 0.3s ease;
}

.nav__mobile-menu > * { min-height: 0; overflow: hidden; }

.nav__mobile-menu.is-open {
  grid-template-rows: 1fr auto;
  opacity: 1;
}

.nav__mobile-menu[aria-hidden="true"] { pointer-events: none; }

.nav__mobile-list {
  grid-area: list;
  display: flex;
  flex-direction: column;
  padding-inline: var(--sp-lg);
  max-height: calc(100svh - var(--nav-height) - 200px);
  overflow-y: auto;
}

.nav__mobile-list > li,
.nav__mobile-foot {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.5s var(--ease-spring);
}

.nav__mobile-menu.is-open .nav__mobile-list > li,
.nav__mobile-menu.is-open .nav__mobile-foot {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i) * 60ms + 120ms);
}

/* Collapsed menu must not add height: padding only while open */
.nav__mobile-menu.is-open .nav__mobile-foot { padding-block: var(--sp-lg); }

.nav__mobile-list > li:first-child { border-top: 1px solid rgba(184, 115, 51, 0.12); }

.nav__mobile-link {
  display: flex;
  align-items: baseline;
  width: 100%;
  padding: 18px 0;
  border-bottom: 1px solid rgba(184, 115, 51, 0.12);
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.1;
  color: var(--text-primary);
  text-align: left;
  transition: color 0.2s ease, padding 0.35s var(--ease-spring);
}

.nav__mobile-link:hover,
.nav__mobile-link[aria-current="page"] { color: var(--copper); }

.nav__mobile-num {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--copper);
  margin-right: 14px;
  vertical-align: 0.9em;
}

.nav__mobile-foot {
  grid-area: foot;
  padding: 0 var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.nav__mobile-cta {
  display: flex;
  justify-content: space-between;
  margin-left: 0;
  padding-block: 8px;
}

.nav__mobile-cta .nav__cta-icon { width: 40px; height: 40px; }

.nav__mobile-contact {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
}

.nav__mobile-contact a { color: var(--text-tertiary); }
.nav__mobile-contact a:hover { color: var(--copper); }

.nav a:focus-visible,
.nav button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

/* ---- Desktop ---- */
@media (min-width: 960px) {
  .nav__menu { display: block; }
  .nav__cta { display: inline-flex; }
  .nav__inner { justify-content: space-between; }
  .nav__hamburger,
  .nav__mobile-menu { display: none; }
}

@media (min-width: 960px) and (max-width: 1100px) {
  .nav__link { padding-inline: 12px; }
  .nav__inner { gap: var(--sp-md); }
}

@media (prefers-reduced-motion: reduce) {
  .nav--hidden { transform: none; }
}

/* ============================================================
   6. HERO
============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Three.js animated wave field (sits behind content) */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: var(--sp-4xl);
  gap: var(--sp-3xl);
  position: relative;
  z-index: 1;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.hero__eyebrow { align-self: flex-start; }

.hero__title {
  max-width: 14ch;
  line-height: 1.1;
}

.hero__subline {
  font-size: clamp(1rem, 1.5vw + 0.25rem, 1.125rem);
  color: var(--text-secondary);
  max-width: 48ch;
  line-height: 1.65;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-top: var(--sp-sm);
}

/* Hero visual — interactive 3D copper labyrinth (Three.js) floating over the
   hero on a transparent canvas: the journey inward to inner strength */
.hero__visual {
  display: none;
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.hero__labyrinth {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  /* Soft copper drop-shadow grounds the floating labyrinth */
  filter: drop-shadow(0 12px 26px rgba(139, 84, 35, 0.22));
}

.hero__labyrinth:active { cursor: grabbing; }

/* ============================================================
   8. SERVICES
============================================================ */
.services {
  padding-block: var(--sp-4xl);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

.service-card {
  border-radius: var(--radius-xl);
  padding: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  transition: transform 300ms var(--ease-spring), box-shadow 300ms var(--ease-spring), background 300ms ease;
  will-change: transform, box-shadow;

  /* Stacking / glow scaffolding */
  position: relative;
  isolation: isolate;
  overflow: visible;

  /* Glow tracking vars (overridden by JS on pointermove) */
  --edge-proximity: 0;
  --cursor-angle: 45deg;
  --edge-sensitivity: 5;
  --color-sensitivity: 30;
  --glow-padding: 18px;
  --cone-spread: 9;

  /* Copper glow colours (intensity ≈ 0.55) */
  --glow-color:    hsl(30deg 55% 46% / 55%);
  --glow-color-60: hsl(30deg 55% 46% / 33%);
  --glow-color-50: hsl(30deg 55% 46% / 28%);
  --glow-color-40: hsl(30deg 55% 46% / 22%);
  --glow-color-30: hsl(30deg 55% 46% / 17%);
  --glow-color-20: hsl(30deg 55% 46% / 11%);
  --glow-color-10: hsl(30deg 55% 46% /  6%);

  /* Copper mesh-gradient swatches */
  --gradient-one:   radial-gradient(at 80% 55%, rgba(184,115, 51,.65) 0px, transparent 50%);
  --gradient-two:   radial-gradient(at 69% 34%, rgba(212,149,106,.55) 0px, transparent 50%);
  --gradient-three: radial-gradient(at  8%  6%, rgba(139, 84, 35,.45) 0px, transparent 50%);
  --gradient-four:  radial-gradient(at 41% 38%, rgba(184,115, 51,.50) 0px, transparent 50%);
  --gradient-five:  radial-gradient(at 86% 85%, rgba(212,149,106,.45) 0px, transparent 50%);
  --gradient-six:   radial-gradient(at 82% 18%, rgba(139, 84, 35,.40) 0px, transparent 50%);
  --gradient-seven: radial-gradient(at 51%  4%, rgba(212,149,106,.50) 0px, transparent 50%);
  --gradient-base:  linear-gradient(rgba(184,115,51,.25) 0 100%);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1; /* keep hovered card's outer glow above siblings */
}

.service-card--featured {
  background: rgba(240, 224, 208, 0.45);
  border-color: rgba(184, 115, 51, 0.20);
}

.service-card--featured:hover {
  background: rgba(240, 224, 208, 0.70);
}

.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(184, 115, 51, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--copper);
  flex-shrink: 0;
}

.service-card__badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--copper-dark);
  background: rgba(184, 115, 51, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(184, 115, 51, 0.25);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 400;
  color: var(--text-primary);
}

.service-card__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--copper);
  margin-top: var(--sp-sm);
  transition: gap 0.2s ease, color 0.2s ease;
}

.service-card__link:hover {
  color: var(--copper-dark);
  gap: 12px;
}

/* Let pointer events fall through text to the card so the glow
   tracking always fires on the card element itself */
.service-card__title,
.service-card__desc,
.service-card__icon {
  pointer-events: none;
}

/* Content wrapper — sits at z-index:1 so it always renders above
   the z-index:0 glow layer, regardless of will-change compositing */
.service-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  flex: 1;
}

/* ============================================================
   SERVICE CARD — Border Glow (adapted from react-bits BorderGlow)
   Tracks cursor proximity to card edges using CSS custom props
   updated via JS pointermove. Copper palette, glass-friendly.
============================================================ */

/* Shared fade timing on edge-light span */
.service-card > .edge-light {
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

/* Snap opacity to 0 (slow fade) whenever the card isn't hovered */
.service-card:not(:hover) > .edge-light {
  opacity: 0 !important;
  transition: opacity 0.75s ease-in-out;
}

/* ── Outer halo ───────────────────────────────────────────────
   Extends 18 px outside the card box. ::before inside it sits
   back at the card's border to create copper box-shadow rings.
   Masking narrows it to a tight wedge near the cursor.         */
.service-card > .edge-light {
  position: absolute;
  border-radius: inherit;
  inset: calc(var(--glow-padding) * -1);
  z-index: 2; /* above card content; pointer-events: none keeps it non-blocking */

  opacity: calc(
    (var(--edge-proximity) - var(--edge-sensitivity))
    / (100 - var(--edge-sensitivity))
  );

  mask-image: conic-gradient(
    from var(--cursor-angle) at center,
    black 2.5%, transparent 10%, transparent 90%, black 97.5%
  );

  mix-blend-mode: plus-lighter;
}

.service-card > .edge-light::before {
  content: "";
  position: absolute;
  inset: var(--glow-padding); /* step back inside → sits at the card's border */
  border-radius: inherit;
  box-shadow:
    /* inset rings (glowing border inner side) */
    inset 0 0  0  1px  var(--glow-color),
    inset 0 0  1px 0   var(--glow-color-60),
    inset 0 0  3px 0   var(--glow-color-50),
    inset 0 0  6px 0   var(--glow-color-40),
    inset 0 0 15px 0   var(--glow-color-30),
    inset 0 0 25px 2px var(--glow-color-20),
    inset 0 0 50px 2px var(--glow-color-10),
    /* outer rings (halo outside the card) */
          0 0  1px 0   var(--glow-color-60),
          0 0  3px 0   var(--glow-color-50),
          0 0  6px 0   var(--glow-color-40),
          0 0 15px 0   var(--glow-color-30),
          0 0 25px 2px var(--glow-color-20),
          0 0 50px 2px var(--glow-color-10);
}

/* ============================================================
   14. CONTACT FORM
============================================================ */
.contact {
  position: relative;
  padding-block: var(--sp-4xl);
  overflow: hidden;
  background: var(--text-primary);
}

/* Decorative gradient orbs */
.contact__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.contact__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
}

.contact__orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--copper) 0%, transparent 70%);
  top: -10%;
  left: -8%;
  animation: contactOrbFloat 14s ease-in-out infinite;
}

.contact__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--copper-light) 0%, transparent 70%);
  bottom: -15%;
  right: -5%;
  animation: contactOrbFloat 18s ease-in-out infinite reverse;
}

@keyframes contactOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.95); }
}

.contact__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3xl);
}

/* ---- Info column ---- */
.contact__info {
  color: rgba(255, 255, 255, 0.92);
}

.contact__info .section-label {
  color: var(--copper-light);
}

.contact__heading {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: var(--sp-lg);
}

.contact__subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 380px;
  margin-bottom: var(--sp-2xl);
}

/* Contact detail rows */
.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  transition: background 0.3s ease, border-color 0.3s ease;
}

a.contact__detail:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(184, 115, 51, 0.25);
}

.contact__detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(184, 115, 51, 0.12);
  color: var(--copper-light);
  flex-shrink: 0;
}

.contact__detail-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact__detail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.contact__detail-value {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---- Spotlight card ---- */
.contact__card {
  position: relative;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px;
  overflow: hidden;
}

.contact__card-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 115, 51, 0.35) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  z-index: 0;
}

.contact__card:hover .contact__card-glow {
  opacity: 1;
}

/* Form inside card */
.contact__form {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--radius-xl) - 2px);
  background: rgba(26, 24, 20, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

/* Floating-label form groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--float {
  position: relative;
}

.form-group--float .form-label {
  position: absolute;
  top: 16px;
  left: 0;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.3px;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
  transform-origin: left center;
}

.form-group--float .form-input:focus ~ .form-label,
.form-group--float .form-input:not(:placeholder-shown) ~ .form-label,
.form-group--float .form-textarea:focus ~ .form-label,
.form-group--float .form-textarea:not(:placeholder-shown) ~ .form-label {
  top: -2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--copper-light);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: transparent;
}

.form-input:focus,
.form-textarea:focus {
  border-color: transparent;
}

/* Animated underline */
.form-line {
  display: block;
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: -1px;
}

.form-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--copper-light), var(--copper));
  transition: width 0.4s var(--ease-spring), left 0.4s var(--ease-spring);
}

.form-input:focus ~ .form-line::after,
.form-textarea:focus ~ .form-line::after {
  width: 100%;
  left: 0;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Submit button — extends .btn.btn--primary from the design system */
.contact__submit {
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.contact__submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.6s ease;
}

.contact__submit:hover::before {
  left: 100%;
}

.contact__submit-icon {
  display: flex;
  transition: transform 0.3s var(--ease-spring);
}

.contact__submit:hover .contact__submit-icon {
  transform: translateX(4px);
}

/* Success state */
.contact__submit--sent {
  background: #3a6b4a;
  pointer-events: none;
}

.contact__submit--sent:hover {
  background: #3a6b4a;
  transform: none;
}

.contact__submit--sent::before {
  display: none;
}

/* ============================================================
   15. FOOTER
   Marquee · cursor spotlight · rolling links · magnetic CTA
   Giant outline wordmark with copper reveal under the cursor
============================================================ */
.footer {
  --mx: 50%;
  --my: 120%;
  background: #0f0e0c;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Copper glow that follows the cursor across the whole footer */
.footer__spotlight {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px circle at var(--mx) var(--my), rgba(184, 115, 51, 0.16), transparent 60%),
    radial-gradient(900px 400px at 15% 0%, rgba(184, 115, 51, 0.08), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(212, 149, 106, 0.06), transparent 70%);
  transition: background 0.2s linear;
}

/* Film grain */
.footer__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Marquee ---- */
.footer__marquee {
  border-block: 1px solid rgba(184, 115, 51, 0.18);
  background: linear-gradient(90deg, rgba(184, 115, 51, 0.06), rgba(184, 115, 51, 0.02), rgba(184, 115, 51, 0.06));
  overflow: hidden;
  padding-block: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.footer__marquee-track {
  display: flex;
  width: max-content;
  animation: footer-marquee 38s linear infinite;
}

.footer__marquee:hover .footer__marquee-track { animation-play-state: paused; }

.footer__marquee-set {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(22px, 3vw, 34px);
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.footer__marquee-star {
  font-style: normal;
  font-size: 0.5em;
  color: var(--copper);
}

@keyframes footer-marquee {
  to { transform: translateX(-50%); }
}

/* ---- Main body ---- */
.footer__body {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--sp-4xl) var(--container-pad) var(--sp-3xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3xl);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.6);
}

.footer__status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fcf8a;
}

.footer__status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: footer-ping 2s var(--ease-out) infinite;
}

@keyframes footer-ping {
  from { transform: scale(1); opacity: 0.7; }
  to   { transform: scale(3); opacity: 0; }
}

.footer__headline {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -1px;
  color: #fff;
  margin-top: var(--sp-lg);
}

.footer__headline em {
  font-style: italic;
  background: linear-gradient(100deg, var(--copper-light) 0%, var(--copper) 40%, #f3c79d 55%, var(--copper) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: footer-shine 6s ease-in-out infinite;
}

@keyframes footer-shine {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}

.footer__description {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-top: var(--sp-lg);
  max-width: 380px;
}

/* Magnetic pill CTA */
.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: var(--sp-xl);
  padding: 8px 8px 8px 24px;
  border-radius: var(--radius-pill);
  background: var(--copper);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(184, 115, 51, 0.35);
  transition: transform 0.4s var(--ease-spring), background 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.footer__cta:hover {
  background: var(--copper-light);
  box-shadow: 0 14px 50px rgba(184, 115, 51, 0.5);
}

.footer__cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0f0e0c;
  color: var(--copper-light);
  transition: transform 0.4s var(--ease-spring);
}

.footer__cta:hover .footer__cta-icon { transform: rotate(45deg); }

/* ---- Link columns ---- */
.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl) var(--sp-xl);
}

.footer__col--contact { grid-column: 1 / -1; }

.footer__col-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__col-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 115, 51, 0.35), transparent);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
}

.footer__link-num {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.3s ease;
}

/* Rolling text: the label slides up and a copper copy rolls in */
.footer__roll {
  display: inline-block;
  height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
}

.footer__roll > span {
  display: block;
  text-shadow: 0 1.4em 0 var(--copper-light);
  transition: transform 0.5s var(--ease-spring);
}

.footer__link:hover .footer__roll > span,
.footer__link:focus-visible .footer__roll > span { transform: translateY(-1.4em); }
.footer__link:hover .footer__link-num { color: var(--copper); }

.footer__link[aria-current="page"] { color: var(--copper-light); }
.footer__link[aria-current="page"] .footer__link-num { color: var(--copper); }

/* Contact rows */
.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.footer__contact-list li:first-child .footer__contact { padding-top: 0; }

a.footer__contact::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-spring);
}

a.footer__contact:hover::after { transform: scaleX(1); }

.footer__contact-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.footer__contact-value {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.25s ease;
}

.footer__contact-value svg {
  flex-shrink: 0;
  color: var(--copper);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-spring);
}

a.footer__contact:hover .footer__contact-value { color: #fff; }
a.footer__contact:hover .footer__contact-value svg { opacity: 1; transform: none; }

.footer__socials {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-lg);
}

.footer__social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.35s var(--ease-spring);
}

.footer__social:hover {
  color: #0f0e0c;
  background: var(--copper-light);
  border-color: var(--copper-light);
  transform: translateY(-3px) rotate(-6deg);
}

/* ---- Giant wordmark ---- */
.footer__mega {
  position: relative;
  display: block;
  width: fit-content;
  margin-inline: auto;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(72px, 22vw, 340px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  user-select: none;
  padding-bottom: 0.06em;
}

/* The letters' glyph boxes reach far above and below the 0.8 line-height and
   would catch clicks meant for LinkedIn and "back to top": only the link box is clickable */
.footer__mega-text {
  pointer-events: none;
  display: flex;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
}

.footer__mega-text > span {
  display: inline-block;
  transform: translateY(40%);
  opacity: 0;
  transition: transform 1.1s var(--ease-spring), opacity 0.8s ease;
  transition-delay: calc(var(--i) * 70ms);
}

.footer--in-view .footer__mega-text > span { transform: none; opacity: 1; }

/* Copper-filled copy, masked to a circle around the cursor */
.footer__mega-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f3c79d 0%, var(--copper) 55%, var(--copper-dark) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  --r: 0px;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--wx, 50%) var(--wy, 50%), #000 35%, transparent 100%);
          mask-image: radial-gradient(circle var(--r) at var(--wx, 50%) var(--wy, 50%), #000 35%, transparent 100%);
  transition: --r 0.5s var(--ease-out);
  pointer-events: none;
}

@property --r {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

.footer__mega:hover .footer__mega-fill,
.footer__mega:focus-visible .footer__mega-fill { --r: clamp(120px, 14vw, 240px); }

/* Touch devices: slow copper sweep instead of cursor reveal */
@media (hover: none) {
  .footer__mega-fill {
    --r: 160px;
    animation: footer-sweep 7s ease-in-out infinite alternate;
  }
}

@keyframes footer-sweep {
  from { --wx: 0%; }
  to   { --wx: 100%; }
}

@property --wx {
  syntax: '<length-percentage>';
  inherits: true;
  initial-value: 50%;
}

/* ---- Bottom bar ---- */
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.25);
}

.footer__bottom-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--sp-lg) var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md) var(--sp-xl);
}

.footer__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__logo { height: 22px; width: auto; opacity: 0.8; }

.footer__copy,
.footer__meta,
.footer__etymology {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.52); /* ≥ 4.5:1 on the bottom bar (QA of 23 October 2026: 0.35 gave 3.12:1) */
}

.footer__etymology em { color: var(--copper-light); }

.footer__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__meta a { color: inherit; transition: color 0.2s ease; }
.footer__meta a:hover { color: var(--copper-light); }

.footer__time {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.65);
}

.footer__legal-sep { color: rgba(255, 255, 255, 0.15); }

.footer__top {
  width: 36px;
  height: 36px;
  margin-left: 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.35s var(--ease-spring);
}

.footer__top:hover {
  color: #0f0e0c;
  background: var(--copper-light);
  border-color: var(--copper-light);
  transform: translateY(-3px);
}

.footer a:focus-visible,
.footer button:focus-visible {
  outline: 2px solid var(--copper-light);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (min-width: 640px) {
  .footer__cols { grid-template-columns: 1fr 1fr 1.4fr; }
  .footer__col--contact { grid-column: auto; }
}

@media (min-width: 1024px) {
  .footer__body {
    grid-template-columns: 1fr 1.25fr;
    gap: var(--sp-4xl);
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__marquee-track,
  .footer__headline em,
  .footer__status-dot::after,
  .footer__mega-fill { animation: none !important; }
  .footer__mega-text > span { transform: none; opacity: 1; }
}

/* ============================================================
   15b. HERO EMBLEM — animated page icon (service pages + over ons)
   Dial + orbits · glass core with page-specific icon · keyword chips
   Layers drift with the cursor (--tx / --ty set in main.js)
============================================================ */
.emblem {
  --tx: 0;
  --ty: 0;
  position: relative;
  width: 340px;
  aspect-ratio: 1;
  flex-shrink: 0;
  color: var(--copper);
}

.emblem__layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translate3d(calc(var(--tx) * var(--depth) * 14px), calc(var(--ty) * var(--depth) * 14px), 0);
  transition: transform 0.8s var(--ease-out);
}

.emblem__glow {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 149, 106, 0.35), rgba(184, 115, 51, 0.08) 55%, transparent 72%);
  filter: blur(20px);
  animation: emblem-breathe 6s ease-in-out infinite;
}

@keyframes emblem-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.8; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* ---- Orbit layer ---- */
.emblem__orbits {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.emblem__orbits * { transform-box: view-box; transform-origin: 170px 170px; }

.emblem__dial {
  stroke: rgba(184, 115, 51, 0.22);
  stroke-width: 1;
  stroke-linecap: round;
  animation: emblem-spin 120s linear infinite;
}

.emblem__tick--major { stroke: rgba(184, 115, 51, 0.5); stroke-width: 1.4; }

.emblem__ring {
  stroke: rgba(184, 115, 51, 0.2);
  stroke-width: 1;
}

.emblem__ring--dash {
  stroke-dasharray: 2 7;
  stroke: rgba(184, 115, 51, 0.35);
  animation: emblem-spin 80s linear infinite reverse;
}

.emblem__ring--faint { stroke: rgba(184, 115, 51, 0.12); }

.emblem__arc {
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 28 72;
}

.emblem__orbit--a { animation: emblem-spin 34s linear infinite; }
.emblem__orbit--b { animation: emblem-spin 14s linear infinite reverse; }

.emblem__sat {
  fill: var(--copper);
  filter: drop-shadow(0 0 6px rgba(184, 115, 51, 0.6));
}

.emblem__sat--soft { fill: var(--copper-light); opacity: 0.6; }

@keyframes emblem-spin {
  to { transform: rotate(360deg); }
}

/* ---- Glass core ---- */
.emblem__core {
  width: 160px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55) 45%, rgba(240, 224, 208, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 50px rgba(184, 115, 51, 0.22),
    0 2px 6px rgba(184, 115, 51, 0.12),
    inset 0 -8px 20px rgba(184, 115, 51, 0.1),
    inset 0 2px 0 #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.emblem__icon {
  width: 100px;
  height: 100px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emblem__icon * { transform-box: view-box; transform-origin: 32px 32px; }

/* Shared draw-in for stroked paths (pathLength="1") */
.emblem__draw,
.emblem__links path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: emblem-draw 1.6s var(--ease-out) 0.3s forwards;
}

.emblem__links path:nth-child(2) {
  stroke: rgba(184, 115, 51, 0.45);
  animation-delay: 0.9s;
}

@keyframes emblem-draw {
  to { stroke-dashoffset: 0; }
}

.emblem__faint { stroke: rgba(184, 115, 51, 0.4); stroke-width: 1; }

/* Teamcoaching: nodes pop in, then pulse one after another */
.emblem__nodes circle {
  fill: #fff;
  transform-origin: center;
  transform-box: fill-box;
  animation:
    emblem-pop 0.6s var(--ease-spring) calc(0.6s + var(--d, 0) * 0.12s) both,
    emblem-node 5s ease-in-out calc(2s + var(--d, 0) * 1s) infinite;
}

.emblem__node-core {
  fill: var(--copper);
  animation: emblem-pop 0.6s var(--ease-spring) 0.4s both, emblem-glow 3s ease-in-out 1.5s infinite !important;
}

@keyframes emblem-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

@keyframes emblem-node {
  0%, 20%, 100% { fill: #fff; transform: scale(1); }
  8%            { fill: var(--copper-light); transform: scale(1.3); }
}

@keyframes emblem-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(184, 115, 51, 0)); }
  50%      { filter: drop-shadow(0 0 5px rgba(184, 115, 51, 0.8)); }
}

/* Coaching: compass needle searching for direction */
.emblem__glyph {
  fill: var(--copper);
  stroke: none;
  font-family: var(--font-body);
  font-size: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.emblem__needle {
  animation: emblem-needle 7s var(--ease-out) infinite;
}

.emblem__needle-n { fill: var(--copper); stroke: none; }
.emblem__needle-s { fill: rgba(184, 115, 51, 0.22); stroke: none; }
.emblem__needle-pin { fill: #fff; stroke: var(--copper); stroke-width: 1.2; }

@keyframes emblem-needle {
  0%, 100% { transform: rotate(-14deg); }
  22%      { transform: rotate(38deg); }
  34%      { transform: rotate(18deg); }
  46%      { transform: rotate(30deg); }
  64%      { transform: rotate(26deg); }
  80%      { transform: rotate(-20deg); }
}

/* Consultancy: two meshing gears (10 : 7 teeth) */
.emblem__gear path { fill: rgba(255, 255, 255, 0.85); }
.emblem__gear circle { fill: rgba(184, 115, 51, 0.12); }
.emblem__gear--a { transform-origin: 25px 27px; animation: emblem-spin 14s linear infinite; }
.emblem__gear--b { transform-origin: 46px 45px; animation: emblem-spin 9.8s linear infinite reverse; }
.emblem__gear--b path { fill: var(--copper); stroke: var(--copper); }
.emblem__gear--b circle { fill: #fff; stroke: none; }

/* Over ons: strength radiating from the core */
.emblem__wave {
  stroke: var(--copper);
  stroke-width: 1;
  opacity: 0;
  animation: emblem-wave 4.5s var(--ease-out) calc(var(--d) * 1.5s) infinite;
}

@keyframes emblem-wave {
  from { transform: scale(0.8); opacity: 0.8; }
  to   { transform: scale(2.4); opacity: 0; }
}

.emblem__orb {
  fill: var(--copper);
  stroke: none;
  filter: drop-shadow(0 4px 10px rgba(184, 115, 51, 0.5));
}

.emblem__monogram {
  fill: #fff;
  stroke: none;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

/* ---- Keyword chips ---- */
.emblem__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(184, 115, 51, 0.14);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  animation: emblem-pop-chip 0.8s var(--ease-spring) both, emblem-bob 6s ease-in-out infinite;
}

.emblem__chip em { font-family: var(--font-heading); color: var(--copper); }

.emblem__chip--a { top: 12%; right: -8%; animation-delay: 1s, 1.8s; }
.emblem__chip--b { bottom: 14%; left: -10%; animation-delay: 1.2s, 0s; }

.emblem__chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
}

.emblem__chip--stat {
  flex-direction: column;
  gap: 2px;
  padding: 12px 22px;
}

.emblem__stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
}

.emblem__stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

@keyframes emblem-pop-chip {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}

@keyframes emblem-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

@media (max-width: 1024px) {
  .emblem { width: 290px; }
  .emblem__core { width: 136px; }
  .emblem__icon { width: 84px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .emblem *, .emblem *::before { animation: none !important; }
  .emblem__draw, .emblem__links path { stroke-dashoffset: 0; }
  .emblem__needle { transform: rotate(24deg); }
  .emblem__wave { opacity: 0; }
  .emblem__layer { transform: none; }
}

/* ============================================================
   16. FLOATING CTA BADGE
============================================================ */
.floating-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--copper-dark);
  border-radius: var(--radius-pill);
  padding: 12px 20px 12px 16px;
  box-shadow: 0 8px 24px rgba(184, 115, 51, 0.4);
  z-index: 50;
  animation: slide-up 0.4s var(--ease-spring) both;
}

.floating-cta.is-visible { display: flex; }
/* Out of the way while the footer (with its own CTA) is on screen */
.floating-cta.is-visible.is-over-footer { animation: none; opacity: 0; visibility: hidden; pointer-events: none; }

.floating-cta__link {
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.floating-cta__close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  margin-left: 4px;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.floating-cta__close:hover {
  color: white;
  background: rgba(0,0,0,0.15);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   17. SCROLL REVEAL ANIMATIONS
============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease var(--stagger-delay, 0ms),
              transform 0.55s ease var(--stagger-delay, 0ms);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { --stagger-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { --stagger-delay: 100ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { --stagger-delay: 200ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { --stagger-delay: 300ms; }

.js [data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   18. MEDIA QUERIES — Mobile first
============================================================ */

/* Tablet 768px+ */
@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 55fr 45fr;
  }

  .hero__visual { display: block; justify-self: end; }

  .services__grid {
    grid-template-columns: 1fr 1fr;
  }

  .services__grid > *:first-child {
    grid-column: 1 / -1;
  }

  .contact__inner {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

}

/* Desktop 1024px+ */
@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services__grid > *:first-child {
    grid-column: auto;
  }

}


/* ============================================================
   19. REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .contact__orb { animation: none !important; }
  .lab__walls,
  .lab__core,
  .lab__core-aura,
  .lab__seeker { animation: none !important; }
  .lab__wall { stroke-dashoffset: 0 !important; }
  .lab__trail { opacity: 1 !important; }
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
