/* ============================================================
   WELLNESS NAVIGATORS · shared stylesheet · v5 (July 2026)
   Palette, type and voice kept from the project style guide.
   ============================================================ */

:root {
  --teal: #0F8B8D;
  --teal-700: #0a6e70;
  --teal-50: #E6F2F2;
  --coral: #F26C5C;
  --coral-700: #d24f3f;
  --coral-50: #FCEAE6;
  --ink: #1F2937;
  --ink-2: #4b5563;
  --paper: #FAFAFA;
  --white: #FFFFFF;
  --border: #e6e8eb;
  --cream: #FBF5EC;
  --cream-2: #F4EADB;
  --sage: #87A586;
  --earth: #B68A5A;
  --plum: #5C3A55;

  --display: "Montserrat", system-ui, sans-serif;
  --body: "Lato", system-ui, sans-serif;

  --container: 1200px;
  --section-y: clamp(72px, 9vw, 124px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --z-nav: 50;
  --z-backdrop: 200;
  --z-modal: 201;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }
::selection { background: var(--coral); color: #fff; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(38px, 5.4vw, 66px); }
h2 { font-weight: 800; font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-weight: 700; font-size: clamp(20px, 2vw, 24px); }
h4 { font-weight: 700; font-size: 17px; }
p  { font-size: 17px; color: var(--ink-2); max-width: 68ch; text-wrap: pretty; }

/* Waypoint label — a trail marker, not a shouty kicker */
.wp {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  color: var(--coral); letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 9px;
}
.wp::before {
  content: ""; width: 11px; height: 11px; flex-shrink: 0;
  background: var(--coral);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(0deg);
}
.wp.teal { color: var(--teal-700); }
.wp.teal::before { background: var(--teal); }
.wp.plum { color: var(--plum); }
.wp.plum::before { background: var(--plum); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Hand-drawn coral underline for one emphasised phrase */
.u-mark { position: relative; display: inline-block; font-style: normal; color: var(--ink); }
.u-mark svg {
  position: absolute; left: -1%; right: -1%; bottom: -0.16em;
  width: 102%; height: 0.34em; overflow: visible; pointer-events: none;
}
.u-mark svg path {
  fill: none; stroke: var(--coral); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
}
html.js .u-mark.draw svg path { animation: draw-under 1s var(--ease-out) .55s forwards; }
html.js .u-mark.draw-on-reveal svg path { stroke-dashoffset: 620; }
html.js .u-mark.draw-on-reveal.visible svg path { animation: draw-under .9s var(--ease-out) .25s forwards; }
html:not(.js) .u-mark svg path { stroke-dashoffset: 0; }
@keyframes draw-under { to { stroke-dashoffset: 0; } }

/* ---------- MOTION PRIMITIVES ---------- */
/* JS-gated reveals: without JS everything is simply visible */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .7s var(--ease-out); }
html.js .rv.visible { opacity: 1; transform: none; }
html.js .rv-group > * { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .65s var(--ease-out); }
html.js .rv-group.visible > * { opacity: 1; transform: none; }
html.js .rv-group.visible > :nth-child(1) { transition-delay: 0s; }
html.js .rv-group.visible > :nth-child(2) { transition-delay: .07s; }
html.js .rv-group.visible > :nth-child(3) { transition-delay: .14s; }
html.js .rv-group.visible > :nth-child(4) { transition-delay: .21s; }
html.js .rv-group.visible > :nth-child(5) { transition-delay: .28s; }
html.js .rv-group.visible > :nth-child(6) { transition-delay: .35s; }
html.js .rv-group.visible > :nth-child(n+7) { transition-delay: .4s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes breath { 0%,100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.14); opacity: .95; } }
@keyframes blink { 0%,96%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse-soft { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- TRIANGLE BAND (project style guide) ---------- */
.tri-band {
  height: 16px; width: 100%; display: block; border: 0; line-height: 0; margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpolygon points='0,16 8,1 16,16' fill='%230F8B8D'/%3E%3C/svg%3E");
  background-size: 16px 16px; background-repeat: repeat-x; background-position: left bottom;
}
.tri-band.coral { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpolygon points='0,16 8,1 16,16' fill='%23F26C5C'/%3E%3C/svg%3E"); }
.tri-band.flip { transform: scaleY(-1); }

/* ---------- HEADER ---------- */
header.site {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(251,245,236,0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
header.site.scrolled {
  background: rgba(255,255,255,0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(31,42,61,0.05);
}
header.site .inner {
  height: 76px; display: flex; align-items: center; gap: 28px;
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
}
header.site .brand img { height: 44px; width: auto; }
header.site nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
header.site nav a {
  font-family: var(--display); font-weight: 600; font-size: 13.5px;
  color: var(--ink); letter-spacing: 0.01em; position: relative;
}
header.site nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--coral); border-radius: 2px; transition: width .3s var(--ease-out);
}
header.site nav a:hover { color: var(--coral-700); }
header.site nav a:hover::after, header.site nav a[aria-current]::after { width: 100%; }
header.site nav.cta-only { margin-left: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  border-radius: 999px;
  transition: transform .3s var(--ease-out), box-shadow .3s ease, background .2s ease;
  cursor: pointer; border: 0; letter-spacing: 0.01em;
}
.btn svg { transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 4px 14px rgba(242,108,92,0.3); }
.btn-primary:hover { background: var(--coral-700); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(242,108,92,0.32); }
.btn-secondary { background: transparent; color: var(--teal-700); border: 2px solid var(--teal); }
.btn-secondary:hover { background: var(--teal); color: #fff; }
.btn.disabled { background: var(--cream-2); color: var(--ink-2); box-shadow: none; cursor: not-allowed; pointer-events: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---------- CONTOUR-LINE BACKDROP (navigation map) ---------- */
.contours {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  color: var(--teal); opacity: .55;
}
.contours svg { position: absolute; width: 900px; height: 900px; }
.contours svg path { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .10; }
.contours .c-r { right: -260px; top: -180px; }
.contours .c-l { left: -320px; bottom: -320px; transform: rotate(160deg); }

/* ---------- SECTIONS ---------- */
section.s { padding: var(--section-y) 0; position: relative; }
section.s.alt { background: var(--white); }
section.s.coral-soft { background: var(--coral-50); }
.section-head { max-width: 740px; margin-bottom: 52px; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 18px; font-size: 18.5px; }

/* ---------- EU STRIP ---------- */
.eu-strip { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 36px 0; }
.eu-strip .container { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: space-between; }
.eu-strip .partners-block { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.eu-strip .partners-block .p-item { text-align: center; }
.eu-strip .partners-block img { height: 54px; width: auto; }
.eu-strip .partners-block .role { font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); margin-top: 8px; }
.eu-strip .partners-block .role.coord { color: var(--teal); }
.eu-strip .eu-block { display: flex; align-items: center; gap: 14px; max-width: 480px; }
.eu-strip .eu-block img { height: 46px; }
.eu-strip .eu-block span { font-size: 12px; color: var(--ink-2); line-height: 1.5; }

.eu-chip {
  display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 16px; max-width: 340px;
}
.eu-chip img { height: 36px; width: auto; }
.eu-chip span { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; font-family: var(--display); font-weight: 600; }

/* ---------- FOOTER ---------- */
footer.site { background: var(--ink); color: rgba(255,255,255,0.78); padding: 72px 0 36px; position: relative; }
footer.site h4 { color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
footer.site .grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
footer.site .brand-blk img { height: 60px; margin-bottom: 16px; }
footer.site .brand-blk p { color: rgba(255,255,255,0.66); font-size: 14.5px; max-width: 320px; }
footer.site nav a { display: block; color: rgba(255,255,255,0.78); font-size: 14.5px; padding: 5px 0; font-family: var(--display); font-weight: 600; }
footer.site nav a:hover { color: var(--coral); }
footer.site .partners-foot { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
footer.site .partners-foot .chip { background: #fff; border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; height: 46px; }
footer.site .partners-foot .chip img { height: 26px; width: auto; }
footer.site .legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 52px auto 0; padding: 24px 24px 0; max-width: var(--container);
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
}
footer.site .eu-block { display: flex; align-items: center; gap: 14px; }
footer.site .eu-block img { height: 38px; background: #fff; padding: 4px 8px; border-radius: 6px; }
footer.site .eu-block span { font-size: 11.5px; color: rgba(255,255,255,0.55); max-width: 380px; line-height: 1.4; }
footer.site .legal-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
footer.site .legal-links a { font-size: 12px; color: rgba(255,255,255,0.6); }
footer.site .copy { font-size: 12px; color: rgba(255,255,255,0.5); text-align: right; }
/* the two NVC companions quietly watching over the footer */
.footer-duo {
  position: absolute; right: 4%; top: -74px; display: flex; align-items: flex-end; gap: 6px;
  pointer-events: none;
}
.footer-duo img { height: 92px; width: auto; }
.footer-duo img:first-child { height: 78px; animation: float-y 7s ease-in-out infinite; }
.footer-duo img:last-child { animation: float-y 8s ease-in-out infinite -3s; }

@media (max-width: 960px) {
  footer.site .grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  footer.site .legal { grid-template-columns: 1fr; text-align: center; }
  footer.site .copy { text-align: center; }
  footer.site .eu-block { justify-content: center; }
  header.site nav { display: none; }
  header.site nav.cta-only { display: flex; margin-left: auto; }
  .footer-duo { display: none; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  html.js .rv, html.js .rv-group > * { opacity: 1 !important; transform: none !important; }
  .u-mark svg path { stroke-dashoffset: 0 !important; }
}
