/*
 * Onepct 2026 redesign: site chrome shared by every page.
 * Floating pill nav + mobile menu, poster footer, mobile sticky CTA bar and
 * the cookie-consent banner skin. Markup lives in views/partials/redesign/.
 */

/* ── Floating pill nav ───────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  pointer-events: none;
}
.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--paper);
  transform-origin: 50% 0;
  transition: transform var(--dur-nav) var(--ease-out),
              background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 24px;
  min-height: 44px;
}
.nav__mark { width: 28px; height: 40px; object-fit: contain; }
/* Optical alignment: at 19px the wordmark's baseline sits 2px below the 14px
   link text when both boxes are centred. Lift it so its baseline matches the
   links and its x-height centres on the logomark (measured in Playwright). */
.nav__brand > span:not(.visually-hidden) { position: relative; top: -2px; }
.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; }
.nav__link {
  position: relative;
  display: inline-block;
  padding-block: 13px;
  color: var(--nav-link);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  height: 1px;
  background: currentColor;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 200ms var(--ease-out);
}
.nav__link[aria-current='page'] { color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { color: var(--paper); }
  .nav__link:hover::after { clip-path: inset(0 0 0 0); }
}
.nav__actions { display: flex; align-items: center; }
.nav__menu-btn { display: none; }

/* After 80px of scroll: solid ground, slightly smaller */
.nav.is-scrolled .nav__pill,
.nav--solid .nav__pill {
  background: rgb(14 27 22 / 0.94);
  border-color: rgb(246 248 244 / 0.10);
  box-shadow: var(--shadow-float);
}
.nav.is-scrolled .nav__pill { transform: scale(0.96); }
/* The nav never hides on scroll: it is always there (Jamal, 2026-11-09). */
@supports (backdrop-filter: blur(8px)) {
  .nav.is-scrolled .nav__pill, .nav--solid .nav__pill {
    background: rgb(14 27 22 / 0.86);
    backdrop-filter: blur(12px) saturate(1.2);
  }
}

@media (max-width: 959px) {
  .nav { top: 12px; }
  .nav__pill {
    width: 100%;
    max-width: 560px;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 6px 6px 10px;
  }
  .nav__links { display: none; }
  .nav__brand { gap: 7px; font-size: 17px; line-height: 22px; letter-spacing: 0; }
  .nav__mark { width: 24px; height: 24px; }
  .nav__brand > span:not(.visually-hidden) { top: -1px; }
  .nav__actions { display: flex; align-items: center; gap: 8px; }
  .nav__cta { padding: 9px 14px; font-size: 13px; line-height: 16px; }
  .nav__menu-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    margin: -4px;
    border-radius: 50%;
  }
  .nav__menu-btn::before { /* the 36px glass circle from Paper, inside a 44px target */
    content: '';
    position: absolute;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgb(246 248 244 / 0.10);
  }
  .nav__menu-btn { position: relative; }
  .nav__menu-btn span { position: relative; width: 14px; height: 2px; border-radius: 2px; background: var(--paper); }
  .nav.is-scrolled .nav__pill { transform: none; }
}
@media (min-width: 960px) {
  .nav__cta-short { display: none; }
}
@media (max-width: 959px) {
  .nav__cta-long { display: none; }
}

/* ── Mobile menu (dialog) ────────────────────────────────────────────── */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 200ms ease; }
.menu__top { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 10px; }
.menu__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgb(246 248 244 / 0.10);
  color: var(--paper);
}
.menu__list { list-style: none; padding: 32px 10px 0; display: flex; flex-direction: column; gap: 4px; }
.menu__list a {
  display: block;
  padding-block: 10px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 40px;
  color: var(--paper);
  text-decoration: none;
}
.menu__list li { transform: translateY(12px); opacity: 0; transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out); transition-delay: calc(var(--i, 0) * 40ms); }
.menu.is-open .menu__list li { transform: none; opacity: 1; }
.menu__foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; padding-inline: 10px; }
.menu__mail { color: var(--muted-on-ink); font-size: 15px; }
@media (min-width: 960px) { .menu { display: none; } }

/* ── Poster footer ───────────────────────────────────────────────────── */
.footer {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--ink-line);
}
/* Under the final ask: no hairline, contents above the ask's ribbons (ask.css). */
.footer--after-ask { border-top-color: transparent; }
.footer--after-ask .footer__inner { position: relative; z-index: 2; }
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding: 80px var(--gutter) 48px;
  max-width: var(--container);
  margin-inline: auto;
}
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 64px; padding-top: 24px; }
.footer__talk { display: flex; flex-direction: column; gap: 20px; width: 380px; flex-shrink: 0; }
.footer__label {
  color: var(--muted-on-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 16px;
  text-transform: uppercase;
}
.footer__talk .footer__label { color: var(--emerald); }
.footer__mail {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 36px;
  color: var(--paper);
  text-decoration: none;
  align-self: flex-start;
}
@media (hover: hover) and (pointer: fine) {
  .footer__mail:hover { color: var(--emerald); }
}
.footer__address { color: var(--muted-on-ink); font-size: 15px; line-height: 22px; font-style: normal; }
.footer__cols { display: flex; align-items: flex-start; gap: 56px; }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col:nth-child(1) { width: 168px; }
.footer__col:nth-child(2) { width: 140px; }
.footer__col:nth-child(3), .footer__col:nth-child(4) { width: 110px; }
.footer__col .footer__label { padding-bottom: 6px; }
.footer__col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.footer__col a {
  color: var(--paper);
  font-size: 15px;
  line-height: 20px;
  text-decoration: none;
  display: block;
  width: fit-content;
  padding-block: 4px;
  margin-block: -4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  background-size: 0% 1px;
  transition: background-size 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .footer__col a:hover { background-size: 100% 1px; }
}
.footer__wordmark {
  display: block;
  color: var(--emerald);
  font-family: var(--font-display);
  font-size: min(27.9vw, 402px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.945;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}
.footer__base { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer__copy { color: var(--muted-on-ink); font-size: 14px; line-height: 18px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--muted-on-ink);
  font-size: 13px; font-weight: 500; line-height: 16px;
  text-decoration: none;
  transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease;
}
.lang-switch a[aria-current='true'] { background: var(--paper); color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .lang-switch a:not([aria-current='true']):hover { color: var(--paper); }
}

/* 960–1279px: the contact block and the four link columns don't fit on one row */
@media (min-width: 960px) and (max-width: 1279px) {
  .footer__top { flex-wrap: wrap; row-gap: 48px; }
}
@media (max-width: 959px) {
  .footer__inner { gap: 40px; padding: 48px 20px 40px; }
  .footer__top { flex-direction: column-reverse; gap: 36px; padding-top: 0; }
  .footer__talk { width: auto; gap: 14px; border-top: 1px solid var(--ink-line); padding-top: 28px; align-self: stretch; }
  .footer__mail { font-size: 26px; line-height: 30px; }
  .footer__address { font-size: 14px; line-height: 21px; }
  .footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 16px; align-self: stretch; }
  .footer__col, .footer__col:nth-child(n) { width: auto; gap: 12px; }
  .footer__col ul { gap: 12px; }
  .footer__col .footer__label { padding-bottom: 4px; }
  .footer__wordmark { text-align: left; line-height: 0.91; }
  .footer__copy { font-size: 13px; }
  .footer__copy > span { display: block; }
  .footer__sep { display: none; }
}

/* ── Mobile sticky CTA bar ───────────────────────────────────────────── */
.sticky-cta { display: none; }
@media (max-width: 767px) {
  .sticky-cta {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--z-sticky);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgb(246 248 244 / 0.96);
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform var(--dur-nav) var(--ease-drawer), visibility 0s linear var(--dur-nav);
  }
  .sticky-cta.is-shown { transform: none; visibility: visible; transition: transform var(--dur-nav) var(--ease-drawer); }
  @supports (backdrop-filter: blur(8px)) {
    .sticky-cta { background: rgb(246 248 244 / 0.82); backdrop-filter: blur(12px); }
  }
  /* Offer variant (stickyCta.title / .sub): words left, button right. */
  .sticky-cta--offer { display: flex; align-items: center; gap: 12px; padding-block: 12px calc(12px + env(safe-area-inset-bottom)); }
  .sticky-cta__copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
  .sticky-cta__title { font-size: 15px; font-weight: 700; line-height: 20px; }
  .sticky-cta__sub { color: var(--muted); font-size: 13px; line-height: 18px; }
  .sticky-cta__btn { flex-shrink: 0; min-height: 52px; padding: 16px 22px; font-weight: 700; }
}

/* ── Cookie consent (skin for public/js/cookie-consent.js) ───────────── */
/* cookie-consent.js skips its own CSS when <html data-cc-skin="redesign">. */
#cc-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: var(--z-consent);
  width: min(380px, calc(100vw - 32px));
  padding: 22px 24px 24px;
  border: 1px solid var(--card-line);
  border-radius: 20px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 6px rgb(14 27 22 / 0.06), 0 20px 50px rgb(14 27 22 / 0.18);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
#cc-banner.cc-show { opacity: 1; transform: none; pointer-events: auto; }
#cc-banner-icon { display: none; }
#cc-banner h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
#cc-banner p { color: var(--text-2); font-size: 14px; margin-bottom: 16px; }
#cc-banner p a { color: var(--deep-green); font-weight: 600; text-underline-offset: 2px; }
#cc-banner .cc-actions { display: flex; gap: 8px; }
#cc-banner .cc-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease, border-color var(--dur-hover) ease;
}
#cc-banner .cc-btn:active { transform: scale(0.97); }
#cc-banner .cc-btn-accept { background: var(--emerald); color: var(--ink); border: 0; }
#cc-banner .cc-btn-essential { background: transparent; color: var(--ink); border: 1px solid var(--line-input); }
@media (hover: hover) and (pointer: fine) {
  #cc-banner .cc-btn-accept:hover { background: #13A96B; }
  #cc-banner .cc-btn-essential:hover { border-color: var(--ink); }
}
#cc-toggle {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: calc(var(--z-sticky) - 1);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--card-line);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  box-shadow: 0 4px 16px rgb(14 27 22 / 0.12);
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
}
#cc-toggle.cc-show { opacity: 1; transform: none; pointer-events: auto; }
/* The redesign hides the floating cookie button: the footer "Cookies" link
   ([data-cc-open]) reopens the banner instead, so nothing covers the page. */
#cc-toggle { display: none; }
#cc-toggle svg { width: 18px; height: 18px; }
@media (max-width: 767px) {
  #cc-banner { left: 16px; right: 16px; bottom: 16px; width: auto; }
  body.has-sticky #cc-banner { bottom: 84px; }
  body.has-sticky #cc-toggle { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  #cc-banner, #cc-toggle { transform: none !important; }
}

/* ── Hover, press and focus states for the chrome ────────────────────── */
.nav__brand { transition: opacity var(--dur-hover) ease; }
.nav__brand:active { opacity: 0.72; }
.nav__link:active { opacity: 0.72; }
.nav__menu-btn::before { transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.nav__menu-btn:active::before { transform: scale(0.92); }
.menu__close { transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.menu__close:active { transform: scale(0.94); }
.menu__list a { transition: color var(--dur-hover) ease, opacity var(--dur-hover) ease; }
.menu__list a:active { opacity: 0.72; }
.menu__list a[aria-current='page'] { color: var(--emerald); }
.menu__mail { text-decoration: underline 1px; text-underline-position: from-font; }
.footer__col a:active, .footer__mail:active, .menu__mail:active { opacity: 0.72; }
.lang-switch a:active { opacity: 0.72; }
.sticky-cta .btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .nav__brand:hover { opacity: 0.85; }
  .menu__close:hover, .nav__menu-btn:hover::before { background: rgb(246 248 244 / 0.18); }
  .menu__list a:hover { color: var(--emerald); }
  .menu__mail:hover, .footer__address a:hover { color: var(--paper); }
  .lang-switch a:not([aria-current='true']):hover { background: rgb(246 248 244 / 0.10); }
}
.nav__link:focus-visible, .footer__col a:focus-visible, .lang-switch a:focus-visible { outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .nav__menu-btn:active::before, .menu__close:active, .sticky-cta .btn:active { transform: none; }
}
