/* Site header. Loaded after the Vite bundle so it wins over the old navbar rules
   without needing !important. Motion follows two rules: things that appear use a
   strong ease-out and leave faster than they arrive; plain colour changes use `ease`. */

:root {
  --hd-ink: #0f172a;
  --hd-text: #334155;
  --hd-muted: #64748b;
  --hd-line: #e2e8f0;
  --hd-tint: #f1f5f9;
  --hd-surface: #ffffff;
  --hd-brand: #4c489d;
  --hd-brand-deep: #3b3780;
  --hd-brand-tint: #eef2ff;
  /* WhatsApp green for the WhatsApp buttons, deep enough for white text to read. */
  --hd-wa: #169a4f;
  --hd-wa-deep: #0f7a3d;
  --hd-wa-light: #25b864;

  --hd-ease-out: cubic-bezier(.165, .84, .44, 1);
  --hd-ease-in-out: cubic-bezier(.645, .045, .355, 1);
  --hd-dur-1: 120ms;
  --hd-dur-2: 180ms;
  --hd-dur-3: 240ms;
}

.hd {
  position: fixed;
  inset: 12px 0 auto;
  z-index: 60;
  padding: 0 16px;
  font-family: Inter, system-ui, sans-serif;
}
@media (min-width: 768px) {
  .hd { top: 20px; padding: 0 24px; }
}

.hd-bar {
  position: relative;
  max-width: 1100px;
  height: 60px;
  margin: 0 auto;
  padding: 0 8px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition:
    background-color var(--hd-dur-3) ease,
    box-shadow var(--hd-dur-3) ease,
    max-width 320ms var(--hd-ease-in-out),
    height 320ms var(--hd-ease-in-out);
}
/* Once the page scrolls, the bar tightens: an on-screen change of shape, so it eases
   in and out, and slowly enough to read as the same bar settling rather than a jump. */
.hd.is-scrolled .hd-bar {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 30px -14px rgba(15, 23, 42, .22);
}
@media (min-width: 1024px) {
  .hd.is-scrolled .hd-bar { max-width: 1000px; height: 54px; }
}

/* Scrolling down past the hero tucks the header away; any scroll up brings it back.
   Leaving is quicker than arriving. */
.hd { transition: transform 280ms var(--hd-ease-out); }
.hd.is-tucked { transform: translateY(calc(-100% - 24px)); transition-duration: 200ms; }

/* First paint: the bar drops in, then its links follow one after another. */
.hd.is-entering .hd-bar { opacity: 0; transform: translateY(-14px) scale(.98); }
.hd.is-entered .hd-bar {
  transition:
    opacity 420ms var(--hd-ease-out),
    transform 520ms cubic-bezier(.19, 1, .22, 1),
    background-color var(--hd-dur-3) ease, box-shadow var(--hd-dur-3) ease,
    max-width 320ms var(--hd-ease-in-out), height 320ms var(--hd-ease-in-out);
}
.hd.is-entering .hd-links > li, .hd.is-entering .hd-cta, .hd.is-entering .hd-logo { opacity: 0; transform: translateY(-6px); }
.hd.is-entered .hd-links > li, .hd.is-entered .hd-cta, .hd.is-entered .hd-logo {
  transition: opacity 360ms var(--hd-ease-out), transform 420ms var(--hd-ease-out);
}
.hd.is-entered .hd-logo { transition-delay: 80ms; }
.hd.is-entered .hd-links > li { transition-delay: calc(140ms + var(--i, 0) * 45ms); }
.hd.is-entered .hd-cta { transition-delay: 420ms; }

.hd-logo { display: flex; align-items: center; flex-shrink: 0; border-radius: 8px; }
.hd-logo img { height: 32px; width: auto; display: block; }

/* ---------- Desktop links ---------- */

.hd-nav { display: none; }
.hd-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
/* The links sit above the hover pill. The items themselves stay unpositioned, so the
   services panel measures itself against the whole bar, not the Services item. */
.hd-links > li > .hd-link { position: relative; z-index: 1; }

.hd-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hd-text);
  font: 600 14px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.hd-link[aria-current="page"],
.hd-link.is-current { color: var(--hd-ink); background: var(--hd-tint); }
/* With the script running, one pill does the highlighting: it rests on the current
   page and glides to whichever link the pointer is on. It moves across the bar, so it
   eases in and out; appearing from nothing is just a fade. */
.hd.has-pill .hd-link[aria-current="page"], .hd.has-pill .hd-link.is-current { background: transparent; }
.hd-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  height: 40px;
  width: var(--pw, 0);
  border-radius: 999px;
  background: var(--hd-tint);
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--px, 0), var(--py, 0));
  transition: transform 260ms var(--hd-ease-in-out), width 260ms var(--hd-ease-in-out), opacity 150ms ease;
}
.hd-pill.is-on { opacity: 1; }
.hd-pill.no-move { transition: opacity 150ms ease; }

.hd-chevron { font-size: 10px; transition: transform var(--hd-dur-2) var(--hd-ease-in-out); }
.hd-services.is-open .hd-chevron { transform: rotate(180deg); }

.hd-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--hd-brand);
  color: #fff;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, transform var(--hd-dur-1) var(--hd-ease-out);
}
.hd-cta:active { transform: scale(.97); }
.hd-cta i { font-size: 16px; }

/* The one call to action in the header gets a little shine: a lit gradient, a soft
   glow, and a streak of light that crosses it every few seconds. The sweep is
   ambient and repeats, so it's quick (about a second) and then rests for longer. */
.hd-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--hd-wa-light) 0%, var(--hd-wa) 50%, var(--hd-wa-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -8px rgba(22, 154, 79, .7);
  transition: box-shadow 200ms ease, filter 200ms ease, transform var(--hd-dur-1) var(--hd-ease-out);
}
.hd-cta > * { position: relative; z-index: 1; }
.hd-cta::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -50%;
  width: 34%;
  z-index: 2;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(0) skewX(-22deg);
  pointer-events: none;
  animation: hd-shine 4.8s cubic-bezier(.45, 0, .2, 1) 1.4s infinite;
}
@keyframes hd-shine {
  0% { transform: translateX(0) skewX(-22deg); }
  22%, 100% { transform: translateX(520%) skewX(-22deg); }
}
@media (hover: hover) {
  .hd-cta:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 10px 24px -8px rgba(22, 154, 79, .85); }
}
@media (prefers-reduced-motion: reduce) { .hd-cta::after { animation: none; opacity: 0; } }

/* ---------- Services mega menu ---------- */

.hd-services { position: static; }

.hd-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px;
  background: var(--hd-surface);
  border: 1px solid var(--hd-line);
  border-radius: 24px;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .22);
  transform-origin: top center;

  /* Closed: leaves quicker than it arrives, then drops out of hit-testing. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transition:
    opacity var(--hd-dur-1) var(--hd-ease-out),
    transform var(--hd-dur-1) var(--hd-ease-out),
    visibility 0s linear var(--hd-dur-1);
}
.hd-services.is-open .hd-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--hd-dur-2) var(--hd-ease-out),
    transform var(--hd-dur-2) var(--hd-ease-out),
    visibility 0s;
}
/* Covers the gap between bar and panel so the pointer can cross it without closing. */
.hd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }

.hd-group-title {
  margin: 0 0 8px;
  padding: 0 10px;
  color: var(--hd-muted);
  font: 600 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hd-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.hd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--hd-ink);
  text-decoration: none;
  transition: background-color 150ms ease;
}
.hd-item-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--hd-tint);
  color: var(--hd-text);
  font-size: 15px;
  transition: background-color 150ms ease, color 150ms ease;
}
.hd-item-name { display: block; font: 600 14px/1.3 Inter, system-ui, sans-serif; }
.hd-item-desc { display: block; margin-top: 2px; color: var(--hd-muted); font: 400 12.5px/1.35 Inter, system-ui, sans-serif; }
.hd-item[aria-current="page"] { background: var(--hd-brand-tint); }
.hd-item[aria-current="page"] .hd-item-icon { background: var(--hd-surface); color: var(--hd-brand); }

.hd-promo {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--hd-ink);
  color: #fff;
}
.hd-promo p { margin: 0; font: 400 13px/1.45 Inter, system-ui, sans-serif; color: #cbd5e1; }
.hd-promo strong { display: block; margin-bottom: 4px; font: 600 14px/1.3 Inter, system-ui, sans-serif; color: #fff; }
.hd-promo a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #c7d2fe;
  font: 600 13px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
}
.hd-promo a i { font-size: 11px; transition: transform var(--hd-dur-2) var(--hd-ease-out); }

/* ---------- Mobile ---------- */

.hd-toggle {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--hd-tint);
  color: var(--hd-ink);
  cursor: pointer;
}
.hd-toggle-lines { position: relative; width: 18px; height: 12px; }
.hd-toggle-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--hd-dur-2) var(--hd-ease-in-out), opacity var(--hd-dur-1) ease;
}
.hd-toggle-lines span:nth-child(1) { top: 0; }
.hd-toggle-lines span:nth-child(2) { top: 5px; }
.hd-toggle-lines span:nth-child(3) { top: 10px; }
.hd.is-menu-open .hd-toggle-lines span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hd.is-menu-open .hd-toggle-lines span:nth-child(2) { opacity: 0; }
.hd.is-menu-open .hd-toggle-lines span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.hd .hd-cta { height: 44px; padding: 0 16px; }
.hd-cta-label { display: none; }
@media (min-width: 420px) { .hd-cta-label { display: inline; } }

.hd-sheet {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  background: var(--hd-surface);
  border: 1px solid var(--hd-line);
  border-radius: 24px;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .28);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transition:
    opacity var(--hd-dur-2) var(--hd-ease-out),
    transform var(--hd-dur-2) var(--hd-ease-out),
    visibility 0s linear var(--hd-dur-2);
}
.hd.is-menu-open .hd-sheet {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity var(--hd-dur-3) var(--hd-ease-out),
    transform var(--hd-dur-3) var(--hd-ease-out),
    visibility 0s;
}

.hd-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--hd-dur-2) ease, visibility 0s linear var(--hd-dur-2);
}
.hd.is-menu-open .hd-scrim { opacity: 1; visibility: visible; transition: opacity var(--hd-dur-3) ease, visibility 0s; }

.hd-sheet-links { list-style: none; margin: 0; padding: 0; }
.hd-sheet-link {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--hd-ink);
  font: 600 16px/1 Inter, system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.hd-sheet-link[aria-current="page"] { background: var(--hd-tint); }
.hd-sheet-link .hd-chevron { color: var(--hd-muted); font-size: 12px; }
.hd-sheet-services.is-open .hd-chevron { transform: rotate(180deg); }

/* Accordion: animating grid rows keeps the real content height without measuring it. */
.hd-accordion {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--hd-dur-3) var(--hd-ease-in-out);
}
.hd-sheet-services.is-open .hd-accordion { grid-template-rows: 1fr; }
.hd-accordion > div { min-height: 0; overflow: hidden; }
.hd-accordion ul { list-style: none; margin: 0; padding: 4px 0 8px; }
.hd-accordion .hd-item { padding: 8px 16px; }
.hd-accordion .hd-item-icon { width: 32px; height: 32px; font-size: 14px; }
.hd-accordion .hd-item-name { font-weight: 500; font-size: 15px; }
.hd-accordion .hd-group-title { margin: 12px 0 4px; padding: 0 16px; }

.hd-sheet-cta {
  margin: 8px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hd-wa-light), var(--hd-wa-deep));
  color: #fff;
  font: 600 15px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
}
.hd-sheet-meta { margin: 4px 0 8px; text-align: center; font: 400 13px/1.4 Inter, system-ui, sans-serif; color: var(--hd-muted); }
.hd-sheet-meta a { color: var(--hd-ink); font-weight: 600; text-decoration: none; }

html.hd-lock, html.hd-lock body { overflow: hidden; }
/* The cookie banner and floating chat button sit above normal page chrome; an open menu must cover them. */
.hd.is-menu-open { z-index: 10000; }

/* ---------- Desktop breakpoint ---------- */

@media (min-width: 1024px) {
  .hd-bar { padding-left: 24px; }
  .hd-nav { display: block; margin: 0 auto; }
  .hd-cta { margin-left: 0; }
  .hd-cta-label { display: inline; }
  .hd-toggle, .hd-sheet, .hd-scrim { display: none; }
}

/* ---------- Hover (pointer devices only, so taps don't leave sticky states) ---------- */

@media (hover: hover) {
  .hd-link:hover { color: var(--hd-ink); background: var(--hd-tint); }
  .hd.has-pill .hd-link:hover { background: transparent; }
  .hd-sheet-cta:hover { filter: brightness(1.06); }
  .hd-item:hover { background: var(--hd-tint); }
  .hd-item:hover .hd-item-icon { background: var(--hd-surface); color: var(--hd-brand); }
  .hd-item[aria-current="page"]:hover { background: var(--hd-brand-tint); }
  .hd-promo a:hover i { transform: translateX(3px); }
}

/* ---------- Focus ---------- */

.hd a:focus-visible,
.hd button:focus-visible {
  outline: 2px solid var(--hd-brand);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hd, .hd *, .hd *::before, .hd *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ==========================================================================
   Site footer. Shares the header's tokens: a frosted card on the page's own
   pastel background, the same width as the header bar, indigo for actions.
   Only colours change on hover.
   ========================================================================== */

.ft {
  position: relative;
  z-index: 1;
  padding: 64px 16px 16px;
  font-family: Inter, system-ui, sans-serif;
}
@media (min-width: 768px) { .ft { padding: 96px 24px 24px; } }

.ft-card {
  max-width: 1232px;
  margin: 0 auto;
  padding: 32px 24px 20px;
  border-radius: 32px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  color: var(--hd-text);
}
@media (min-width: 768px) { .ft-card { padding: 48px 48px 24px; } }

.ft-top { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
.ft-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .ft-top { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ft-top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; } .ft-brand { grid-column: auto; } }

.ft-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--hd-ink); text-decoration: none; }
.ft-logo img { width: 36px; height: 36px; display: block; }
.ft-logo span { font: 800 22px/1 Inter, system-ui, sans-serif; letter-spacing: -0.03em; }
.ft-brand p { margin: 16px 0 0; max-width: 360px; font-size: 14.5px; line-height: 1.6; color: var(--hd-text); }

.ft-social { margin-top: 20px; display: flex; gap: 8px; }
.ft-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--hd-line);
  background: #fff;
  color: var(--hd-ink);
  font-size: 15px;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ft h2 {
  margin: 0;
  /* The bundle forces every h2 to 30px on phones with !important. */
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hd-brand);
}
.ft-links { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ft-links a { font-size: 14.5px; color: var(--hd-text); text-decoration: none; transition: color 150ms ease; }

/* Ways to reach us, as a row of tiles: the thing most people scroll down here for. */
.ft-contact {
  margin-top: 40px;
  display: grid;
  gap: 12px;
}
@media (min-width: 768px) { .ft-contact { grid-template-columns: 1.5fr 1fr 1fr; } }
.ft-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--hd-surface);
  border: 1px solid var(--hd-line);
  color: var(--hd-ink);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.ft-tile i {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--hd-brand-tint);
  color: var(--hd-brand);
  font-size: 16px;
}
.ft-tile small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hd-muted); }
.ft-tile span { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }

.ft-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hd-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--hd-muted);
}

@media (hover: hover) {
  .ft-links a:hover { color: var(--hd-brand); }
  .ft-social a:hover { background: var(--hd-brand); border-color: var(--hd-brand); color: #fff; }
  a.ft-tile:hover { border-color: rgba(76, 72, 157, .4); }
}
.ft a:focus-visible { outline: 2px solid var(--hd-brand); outline-offset: 2px; border-radius: 8px; }
