/* ============================================
   Clínica — Design System
   Brand color: #165A4C (deep emerald)
   ============================================ */

/* Tipos de letra auto-alojados (subset latin — cobre os diacríticos do
   português). Poppins e Montserrat não têm eixo variável no Google Fonts,
   por isso um @font-face estático por peso. Poppins é também o tipo de
   letra do corpo de texto (--font-sans), tal como no site original. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/montserrat-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/montserrat-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/montserrat-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/montserrat-700-latin.woff2") format("woff2");
}

:root {
  /* Color */
  --emerald-900: #143634;
  --emerald-700: #165A4C;
  --emerald-500: #2d7a68;
  --emerald-300: #88b5a8;
  --emerald-100: #d6e6e0;
  --emerald-50:  #ecf2ee;

  --cream-50:    #faf6ef;
  --cream-100:   #f5efe6;
  --cream-200:   #ebe2d3;

  --clay-700:    #a86a52;
  --clay-500:    #c4856a;
  --clay-200:    #e6cdbe;

  --ink-900:     #1a201d;
  --ink-700:     #3a4441;
  --ink-500:     #6b7570;
  --ink-300:     #a4ada8;
  --ink-200:     #c8cfcb;
  --line:        #e3e0d6;

  --bg:          #ffffff;
  --bg-soft:     #f0f0f0;
  --fg:          var(--ink-900);
  --fg-muted:    var(--ink-500);

  /* Type */
  --font-sans: "Poppins", -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Poppins", var(--font-sans);
  --font-nav: "Montserrat", var(--font-sans);

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius-sm: 6px;
  --radius:    14px;
  --radius-lg: 24px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: color .2s var(--ease);
}
a:hover { color: var(--emerald-900); }

button { font-family: inherit; cursor: pointer; border: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-900);
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; }
h4 { font-size: 1.05rem; line-height: 1.3; font-family: var(--font-sans); font-weight: 500; letter-spacing: 0; }

p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--emerald-700);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--emerald-700);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

section { padding: clamp(56px, 9vw, 120px) 0; }

/* ----- Page banner (páginas interiores: imagem full-bleed + título) -----
   Usar em páginas de listagem (servicos, equipa, acordos, contacto,
   política de privacidade): <section class="page-head" style="background-image:
   url('/assets/images/xxx.jpg')"><div class="container"><h1>Título</h1></div></section> */
.page-head {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(220px, 30vw, 340px);
  padding: 32px 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-900);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .59) 100%);
}
.page-head h1 {
  color: #fff;
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* ----- Service cards (ícone + nome + preço) -----
   Usadas na homepage e em /servicos: grelha de <a class="sp-card"> dentro de
   <div class="sp-grid">. */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sp-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 40px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.sp-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); transform: translateY(-2px); color: inherit; }
.sp-card:hover .sp-name { color: var(--emerald-700); }
.sp-icon { color: var(--emerald-700); display: grid; place-items: center; }
.sp-icon svg { width: 44px; height: 44px; fill: currentColor; }
.sp-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0; transition: color .2s var(--ease); }
.sp-price { font-size: 13px; color: var(--ink-500); margin: 0; }
@media (max-width: 1000px) { .sp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sp-grid { grid-template-columns: 1fr; } }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 32px;
  transition: min-height .3s var(--ease), padding .3s var(--ease);
}
.site-header.is-scrolled .nav {
  min-height: 54px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-badge-img {
  height: 100px;
  width: auto;
  display: block;
  transition: height .3s var(--ease);
}
.site-header.is-scrolled .logo-badge-img {
  height: 52px;
}
.footer-brand .logo-badge-img {
  width: 70px;
  height: 75px;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-700);
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--emerald-700);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--emerald-700);
}
/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--emerald-700);
  color: var(--cream-50);
}
.btn-primary:hover {
  background: var(--emerald-500);
  color: var(--cream-50);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-200);
}
.btn-ghost:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-700);
}
.btn-text {
  background: transparent;
  padding: 8px 0;
  color: var(--emerald-700);
  border-radius: 0;
}
.btn-text:hover {
  color: var(--emerald-900);
  gap: 14px;
}
.btn-text::after {
  content: "→";
  transition: transform .2s var(--ease);
}
.btn-text:hover::after { transform: translateX(3px); }

/* ----- Footer -----
   Solid colors on purpose (not rgba(255,255,255,X)) — alpha-white over the
   dark green background blends into a muddy green-gray instead of reading
   as light gray/white. */
.site-footer {
  background: var(--emerald-900);
  color: #ffffff;
  padding: 80px 0 40px;
  margin-top: 0;
}
.site-footer h4 {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: normal;
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 18px;
}
.site-footer a {
  color: #ffffff;
}
.site-footer a:hover { color: #cfe6de; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid > div:last-child ul { font-size: 16px; font-weight: 500; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 14px;
  color: #ffffff;
}
.footer-brand p { font-size: 14px; color: #cfe0da; max-width: 320px; }

.ftr-line { display: flex; align-items: flex-start; gap: 10px; }
.ftr-icon { flex: 0 0 auto; margin-top: 3px; color: #cfe0da; }
.ftr-sub { display: block; font-size: 12.5px; color: #a9c4bb; margin-top: 2px; }

.ftr-social-heading { margin-top: 20px; margin-bottom: 14px; }
.ftr-social { display: flex; gap: 10px; }
.ftr-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; color: #ffffff; transition: background .2s var(--ease), border-color .2s var(--ease); }
.ftr-social a:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #ffffff; }

.cookie-manage-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-manage-link:hover { color: #cfe6de; }

/* ----- Cookie consent banner -----
   Same solid-color-over-dark-green treatment as the footer above (see its
   note) — alpha-white would blend into a muddy green-gray on this bg. */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  background: var(--emerald-900);
  color: #ffffff;
  padding: 22px 0;
  transform: translateY(100%);
  transition: transform .3s var(--ease);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #cfe0da;
  max-width: 64ch;
}
.cookie-banner a { color: #ffffff; }
.cookie-banner a:hover { color: #cfe6de; }
.cookie-banner-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn { padding: 11px 22px; font-size: 13px; }
.cookie-banner .btn-ghost { border-color: rgba(255,255,255,.3); color: #ffffff; }
.cookie-banner .btn-ghost:hover { border-color: #ffffff; color: #ffffff; }

/* ----- WhatsApp chat widget ----- */
.wa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
  transition: bottom .3s var(--ease);
}
body.has-cookie-banner .wa-widget { bottom: 108px; }
.wa-float {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  padding: 0;
  pointer-events: auto;
}
.wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.45);
}
.wa-float::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.4);
  animation: wa-pulse 2s ease-out infinite;
  pointer-events: none;
}
.wa-float-icon { transition: opacity .15s ease, transform .2s ease; }
.wa-icon-close { position: absolute; opacity: 0; transform: rotate(-90deg); }
.wa-float[aria-expanded="true"] .wa-icon-chat  { opacity: 0; transform: rotate(90deg); }
.wa-float[aria-expanded="true"] .wa-icon-close { opacity: 1; transform: rotate(0); }
.wa-float[aria-expanded="true"]::after { animation: none; opacity: 0; }

@keyframes wa-pulse {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

.wa-panel {
  width: 320px;
  max-width: calc(100vw - 48px);
  /* No background-color here on purpose: the head (teal) and CTA (green)
     fill the full rounded shape between them, and Chromium's rounded-corner
     clip bleeds the CLIPPING ELEMENT'S OWN background through the corner's
     anti-aliased pixels rather than what's actually behind it. A solid
     background here would show as a seam against whichever child's color
     it doesn't match. */
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(26, 36, 52, 0.18);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.wa-panel.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.wa-panel-head {
  background: #075E54;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wa-panel-id { display: flex; align-items: center; gap: 12px; }
.wa-panel-avatar {
  position: relative;
  width: 46px; height: 46px;
  flex: 0 0 auto;
}
.wa-panel-avatar-img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.wa-panel-avatar-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.wa-panel-online {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #075E54;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: wa-online 1.6s ease-out infinite;
}
.wa-panel-meta { display: flex; flex-direction: column; line-height: 1.2; }
.wa-panel-title { font-weight: 600; font-size: 15px; }
.wa-panel-status {
  font-size: 12px;
  opacity: 0.85;
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
@keyframes wa-online {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  100% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}
.wa-panel-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #fff;
  display: grid; place-items: center;
  opacity: 0.85;
  transition: opacity .15s ease, background .15s ease;
}
.wa-panel-close:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.wa-panel-body {
  position: relative;
  background-color: #ECE5DD;
  padding: 18px 16px 80px;
  isolation: isolate;
}
.wa-panel-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/assets/images/wa-bg.png");
  opacity: .07;
}
.wa-bubble {
  display: inline-block;
  background: #DCF8C6;
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
  font-size: 14.5px;
  color: var(--ink-900);
  line-height: 1.55;
  box-shadow: 0 1px 1px rgba(26, 36, 52, 0.10);
  max-width: 240px;
  position: relative;
}
.wa-bubble::before {
  content: "";
  position: absolute;
  top: 0; left: -8px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent #DCF8C6 transparent transparent;
}
.wa-bubble-greet {
  font-weight: 600;
  display: block;
}
.wa-bubble-greet .wa-wave {
  display: inline-block;
  margin-left: 2px;
  transform-origin: 70% 70%;
  animation: wa-wave 2.4s ease-in-out 1s 2;
}
@keyframes wa-wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(14deg); }
  20%, 40%      { transform: rotate(-8deg); }
}
.wa-panel-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  text-decoration: none;
  transition: background .15s ease;
}
.wa-panel-cta:hover { background: #1FB855; color: #fff; }

@media (max-height: 500px) {
  .wa-widget { display: none; }
}
@media (max-width: 640px) {
  .wa-widget { bottom: 16px; right: 16px; }
  .wa-float { width: 52px; height: 52px; }
}

/* ----- Real photo helper ----- */
.photo {
  position: relative;
  background: var(--emerald-100);
  overflow: hidden;
  border-radius: var(--radius);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo.portrait {
  background: linear-gradient(180deg, var(--emerald-50) 0%, var(--cream-200) 100%);
}
.photo.portrait img { object-fit: cover; object-position: top center; }

/* ----- Image placeholders ----- */
.placeholder {
  position: relative;
  background-color: var(--emerald-100);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklab, var(--emerald-700) 8%, transparent) 14px,
      color-mix(in oklab, var(--emerald-700) 8%, transparent) 15px
    );
  display: grid;
  place-items: center;
  color: var(--emerald-700);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: .05em;
  overflow: hidden;
  border-radius: var(--radius);
}
.placeholder span {
  background: var(--cream-50);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--emerald-100);
}
.placeholder.clay {
  background-color: var(--clay-200);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklab, var(--clay-700) 12%, transparent) 14px,
      color-mix(in oklab, var(--clay-700) 12%, transparent) 15px
    );
  color: var(--clay-700);
}
.placeholder.clay span { border-color: var(--clay-200); }
.placeholder.cream {
  background-color: var(--cream-200);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      color-mix(in oklab, var(--ink-700) 6%, transparent) 14px,
      color-mix(in oklab, var(--ink-700) 6%, transparent) 15px
    );
  color: var(--ink-700);
}
.placeholder.cream span { border-color: var(--cream-200); }

/* ----- Cards ----- */
.card {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover {
  border-color: var(--emerald-300);
}

/* ----- Forms (contacto.php e formulário embutido da homepage) ----- */
.form-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 48px); }
.form-card h2 { margin: 0 0 8px; font-size: 1.6rem; }
.form-card p.muted { margin: 0 0 32px; color: var(--ink-500); font-size: 14.5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field label { font-size: 12px; color: var(--ink-700); font-weight: 500; letter-spacing: .02em; }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit; font-size: 15px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink-900);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--emerald-700); background: #fff; }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23165A4C' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: #b94c3a; }
.field-error { font-size: 12.5px; color: #b94c3a; margin: 0; }

.form-radio-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.form-radio { position: relative; cursor: pointer; }
.form-radio input { position: absolute; opacity: 0; }
.form-radio span { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; text-align: center; background: var(--bg-soft); transition: all .2s var(--ease); }
.form-radio:hover span { border-color: var(--emerald-300); }
.form-radio input:checked + span { border-color: var(--emerald-700); background: var(--emerald-50); color: var(--emerald-900); }

.form-actions { margin-top: 28px; }
.form-actions .btn { width: 100%; justify-content: center; padding: 16px 24px; }
.form-disclaimer { font-size: 12px; color: var(--ink-500); margin-top: 14px; text-align: center; }

.form-global-error {
  margin-bottom: 24px; padding: 14px 16px; border: 1px solid #b94c3a;
  background: #fdf2ef; color: #7d2a1a; border-radius: var(--radius-sm); font-size: 14px;
}

/* Honeypot, hidden from humans, visible to naive bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 880px) {
  .form-row { grid-template-columns: 1fr; }
  .form-radio-group { grid-template-columns: 1fr 1fr; }
}

/* ----- Mobile menu (basic) ----- */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink-900);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav { min-height: 72px; padding: 8px 0; }
  .logo-badge-img { height: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
  body.has-cookie-banner .wa-widget { bottom: 200px; }

  /* Mobile menu open state: nav slides down below the header bar. */
  .site-header.is-menu-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 8px var(--gutter);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 100;
  }
  .site-header.is-menu-open .nav-links li {
    border-bottom: 1px solid var(--line);
  }
  .site-header.is-menu-open .nav-links li:last-child {
    border-bottom: none;
  }
  .site-header.is-menu-open .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 16px;
  }
  .site-header.is-menu-open .nav-links a[aria-current="page"]::after {
    display: none; /* underline doesn't read well in a vertical list */
  }

  /* Hamburger to X animation */
  .site-header.is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ----- Utility ----- */
.muted { color: var(--fg-muted); }
.serif { font-family: var(--font-display); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-700); line-height: 1.55; }

/* ----- Reveal on scroll (subtle) ----- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* More dramatic variant: slides in from the left (matches the original's
   fadeInLeft entrance on the info card). */
.reveal-left {
  opacity: 0;
  transform: translateX(-70px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-left.is-visible {
  opacity: 1;
  transform: none;
}
