/* Shared site chrome for pages that keep their own stylesheet (the
   Spares pages): the pill nav, mobile menu card, footer, legal links and
   cookie banner. COPIED from styles.css (NAV, MOBILE MENU, FOOTER and
   COOKIE CONSENT blocks): when you change those blocks, copy the change
   here too. The main site's tokens are scoped to the chrome elements, so
   the host page's own :root tokens are not touched. */
:root { --nav-h: 64px; }
nav, .mobile-menu, .menu-backdrop, .footer, .consent {
  --logo: url("images/jss-logo.svg");
  --yellow: #FFF3B0;
  --gold: #E09F3E;
  --maroon: #9E2A2B;
  --teal: #355C67;
  --wa: #25D366;
  --wa-dark: #1DA851;
  --wa-ink: #0B3B22;      /* text on WhatsApp green (6.4:1) */
  --wa-hover: #3EDC7B;    /* lighter on hover so dark text keeps contrast */
  --gold-text: #F4C77F;   /* gold for small text on teal or maroon (4.6:1) */
  --maroon-deep: #6E1A1B; /* maroon for small text on gold (5.0:1) */
  --hairline: rgba(50,50,50,0.12);
  --grid: rgba(50,50,50,0.05);
  --paper: #FFFFFF;
  --soft: #F6F4EE;
  --ink: #2B2620;
  --body-text: #4A4438;
  --font: 'Montserrat', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --maxw: 1280px;
  font-family: var(--font); font-size: 16px; line-height: normal; letter-spacing: normal; color: var(--ink);
}
.footer h2 { letter-spacing: .12em; line-height: normal; text-wrap: initial; }
.footer a.link { text-decoration: none; padding: 0; font-size: .95rem; }

/* -- NAV: floating pill, identical on every page and hero colour --
   One white bar, 12px from the top. It gains a deeper shadow once the page
   scrolls (nav.scrolled, set in site.js). The mobile menu is a card that
   drops from the pill's top-right corner, where the menu button lives. */
nav {
  position: fixed; top: 12px; left: 50%; z-index: 105;
  width: min(calc(100% - 24px), calc(var(--maxw) + 32px)); height: var(--nav-h);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 10px 0 22px;
  background: var(--paper); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(43,38,32,.06), 0 6px 20px rgba(43,38,32,.07);
  transition: box-shadow .25s var(--ease-out);
}
nav.scrolled { box-shadow: 0 1px 2px rgba(43,38,32,.08), 0 10px 30px rgba(43,38,32,.13); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 8px; }
.brand img { display: block; width: 104px; height: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 999px;
  font-weight: 500; font-size: .9rem; color: var(--ink); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { background: var(--soft); color: var(--teal); }
}
.nav-links a[aria-current="page"] { color: var(--teal); font-weight: 600; background: rgba(53,92,103,.08); }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-quote {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--teal); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .16s var(--ease-out);
}
.nav-quote svg { width: 16px; height: 16px; }
.nav-wa {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--wa); color: var(--wa-ink);
  transition: background-color .15s ease, transform .16s var(--ease-out);
}
.nav-wa svg { width: 21px; height: 21px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .nav-quote:hover { background: #2c4d57; }
  .nav-wa:hover { background: var(--wa-hover); }
}
.nav-quote:active, .nav-wa:active { transform: scale(0.97); }

/* WhatsApp button (mobile menu, CTAs) */
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--wa); color: var(--wa-ink); font-weight: 600; font-size: .9rem; padding: 12px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, transform .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .wa-btn:hover { background: var(--wa-hover); } }
.wa-btn:active { transform: scale(0.97); }
.wa-btn svg { width: 17px; height: 17px; fill: var(--wa-ink); flex-shrink: 0; }


/* -- MOBILE MENU: toggle in the pill + a card that drops from it --
   The pill (z 125) stays above the backdrop (z 110) and the card (z 120),
   so the same button opens and closes the menu. Exit is faster than enter. */
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--soft); color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, transform .16s var(--ease-out);
}
.nav-toggle:active { transform: scale(0.96); }
.nav-toggle svg {
  position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), filter .2s var(--ease-out);
}
.nav-toggle .i-close { opacity: 0; transform: rotate(-45deg) scale(.8); filter: blur(2px); }
.nav-toggle[aria-expanded="true"] .i-menu { opacity: 0; transform: rotate(45deg) scale(.8); filter: blur(2px); }
.nav-toggle[aria-expanded="true"] .i-close { opacity: 1; transform: none; filter: none; }

.menu-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(33,29,23,.32); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.menu-backdrop.open { opacity: 1; visibility: visible; transition: opacity .25s ease, visibility 0s; }
.mobile-menu {
  position: fixed; z-index: 120; top: calc(12px + var(--nav-h) + 8px); right: 12px;
  width: min(calc(100% - 24px), 380px); padding: 8px;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; box-shadow: 0 2px 4px rgba(43,38,32,.06), 0 24px 60px rgba(43,38,32,.22);
  transform-origin: top right; opacity: 0; transform: translateY(-6px) scale(.96); visibility: hidden;
  transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s linear .15s;
}
.mobile-menu.open {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity .2s var(--ease-out), transform .26s var(--ease-out), visibility 0s;
}
.mobile-menu > a { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-radius: 14px; font-weight: 500; font-size: 1.02rem; color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
.mobile-menu > a[aria-current="page"] { color: var(--teal); font-weight: 600; background: rgba(53,92,103,.08); }
.mobile-menu > a:active { background: var(--soft); }
.mobile-menu > a svg { width: 16px; height: 16px; color: var(--gold); }
.mobile-menu-foot { display: flex; gap: 8px; margin-top: 6px; padding: 10px 8px 6px; border-top: 1px solid var(--hairline); }
.mobile-menu-foot .wa-btn { flex: 1; justify-content: center; }


/* Nav breakpoints: links fold into the menu card below 1120px; on phones
   the round WhatsApp button goes too (the floating one stays). */
@media (max-width: 1120px) {
  nav { z-index: 125; padding: 0 8px 0 18px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  :root { --nav-h: 58px; }
  nav { top: 10px; width: calc(100% - 20px); padding: 0 7px 0 16px; gap: 10px; }
  .brand img { width: 88px; }
  .nav-wa { display: none; }
  .nav-quote { height: 42px; padding: 0 16px; font-size: .86rem; }
  .nav-quote svg { display: none; }
  .nav-toggle { width: 42px; height: 42px; }
  .mobile-menu { top: calc(10px + var(--nav-h) + 8px); right: 10px; width: calc(100% - 20px); }
}
@media (min-width: 1121px) { .mobile-menu, .menu-backdrop { display: none; } }



/* -- FOOTER: light paper, so the full-colour logo sits on it as designed -- */
.footer { background: var(--soft); border-top: 1px solid var(--hairline); padding: 72px 4vw 30px; }
.footer-top { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; }
.foot-logo { display: inline-block; margin-bottom: 18px; border-radius: 6px; }
.foot-logo img { display: block; width: 140px; height: auto; }
.foot-about p { font-weight: 400; font-size: .95rem; line-height: 1.65; color: var(--body-text); max-width: 340px; }
.foot-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.foot-badges span { font-weight: 600; font-size: .72rem; letter-spacing: .03em; color: var(--teal); background: var(--paper); border: 1px solid var(--hairline); padding: 6px 11px; border-radius: 999px; }
.foot-col h2 { font-family: var(--font); font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon); margin-bottom: 16px; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-weight: 400; font-size: .95rem; color: var(--ink); text-decoration: none; transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) { .foot-col a:hover { color: var(--maroon); } }
.foot-contact a.link { color: var(--teal); font-weight: 500; }
.foot-addr { font-weight: 400; font-size: .95rem; color: var(--body-text); }
.footer-bottom { max-width: var(--maxw); margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-weight: 400; font-size: .82rem; color: #6B6357; }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } .footer { padding: 56px 6vw 28px; } }
/* legal links and the cookie settings button in the bottom bar */
.foot-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-legal a, .foot-cookie { display: inline-block; padding: 4px 0; font: inherit; color: #6B6357; text-decoration: none; background: none; border: 0; cursor: pointer; transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) { .foot-legal a:hover, .foot-cookie:hover { color: var(--maroon); } }
.foot-legal a[aria-current="page"] { color: var(--teal); font-weight: 600; }

/* -- COOKIE CONSENT --
   Built by site.js when no choice is stored. Analytics stays denied (Google
   Consent Mode, set in each page's analytics loader) until "Accept". Both
   buttons are the same size.
   Motion: transitions, not keyframes, so a quick open then close retargets
   smoothly. site.js adds [data-open] a beat after the hero settles; the card
   rises from its own corner (origin bottom left) with a short stagger on its
   contents. Exit is faster than entry and skips the stagger. On phones the
   card spans the width and the WhatsApp button lifts above it with the same
   curve (--consent-h is set by site.js). */
.consent { position: fixed; left: 22px; bottom: 22px; z-index: 102; width: min(440px, calc(100vw - 44px)); background: var(--paper); border-radius: 16px; box-shadow: 0 1px 2px rgba(16,36,42,.08), 0 18px 48px rgba(16,36,42,.22); padding: 22px 22px 20px; transform-origin: bottom left;
  opacity: 0; transform: translateY(14px) scale(.98); filter: blur(4px);
  transition: opacity .3s var(--ease-out), transform .36s var(--ease-out), filter .3s var(--ease-out); }
.consent[data-open] { opacity: 1; transform: none; filter: none; }
.consent > * { opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
.consent[data-open] > * { opacity: 1; transform: none; }
.consent[data-open] > :nth-child(1) { transition-delay: .06s; }
.consent[data-open] > :nth-child(2) { transition-delay: .1s; }
.consent[data-open] > :nth-child(3) { transition-delay: .14s; }
.consent.is-leaving { opacity: 0; transform: translateY(8px) scale(.99); transition-duration: .18s; pointer-events: none; }
.consent-title { font-weight: 700; font-size: .95rem; color: var(--teal); margin-bottom: 6px; }
.consent-text { font-size: .88rem; line-height: 1.55; color: var(--body-text); }
.consent-text a { color: var(--maroon); font-weight: 600; text-underline-offset: 3px; white-space: nowrap; }
.consent-actions { display: flex; gap: 10px; margin-top: 16px; }
.consent-actions button { flex: 1; font: 600 .92rem var(--font); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--teal); cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .14s var(--ease-out); }
.consent-reject { background: var(--paper); color: var(--teal); }
.consent-accept { background: var(--teal); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .consent-reject:hover { background: var(--soft); } .consent-accept:hover { background: #2A4A53; } }
.consent-actions button:active { transform: scale(0.97); }
.consent-actions button:focus-visible { outline-color: var(--gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px 18px 16px; transform-origin: bottom center; }
  /* the transition on the destination state wins: lift slow (here), drop fast (base .wa-float rule) */
  .has-consent .wa-float { translate: 0 calc(-1 * (var(--consent-h, 0px) + 8px)); transition: transform .16s var(--ease-out), background-color .15s ease, translate .36s var(--ease-out); }
}
/* reduced motion: a plain fade, no rise, scale or blur */
@media (prefers-reduced-motion: reduce) {
  .consent, .consent > *, .consent.is-leaving { transform: none; filter: none; }
  .consent > * { transition: none; opacity: 1; }
  .wa-float { translate: none !important; }
  .has-consent .wa-float { bottom: calc(var(--consent-h, 0px) + 24px); }
}



/* Phones: 44px tap targets in the footer (as in styles.css PHONE POLISH) */
@media (max-width: 560px) {
  .foot-col ul { gap: 0; }
  .foot-col li > a, .footer .foot-col li > a.link { display: inline-block; padding: 11px 0; }
  .foot-legal { gap: 0 22px; }
  .foot-legal a, .foot-cookie { padding: 12px 0; }
}
