/* Navigation bar and footer, shared by every page (home page and blog.css pages).
   When the full bar doesn't fit (it depends on the screen width and the language), layout.js adds .collapsed
   and the links, CTA, social icons and language switcher move into a full-screen menu behind the ☰ button. */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled {
  border-color: var(--line-dark);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 80px;
  max-width: 1440px;
}
.nav-logo {
  display: block;
  flex: none;
}
.nav-logo img {
  height: 50px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.nav-links a {
  color: var(--paper);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 10px;
  white-space: nowrap;
  border-radius: 999px;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-links a:hover {
  background: var(--ink-3);
}
.nav-links a.active,
.nav-links a[aria-current='page'] {
  color: var(--orange);
}
.nav .btn {
  padding: 11px 18px;
  font-size: 15px;
  white-space: nowrap;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.nav-social {
  display: flex;
  gap: 6px;
}
.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink-3);
  color: var(--paper);
  border: 1px solid var(--line-dark);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.nav-social a:hover {
  border-color: var(--orange);
  color: var(--orange);
}
/* wraps the links and the CTA/social/language group; only becomes a box when it is the mobile menu */
.nav-panel {
  display: contents;
}
.menu-stars {
  display: none;
}
.lang {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--paper);
  border: 1px solid var(--line-dark);
  font: 700 14px/1 var(--body, var(--sans));
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-btn:hover,
.lang-btn[aria-expanded='true'] {
  border-color: var(--orange);
}
.lang-btn .chev {
  transition: transform 0.25s;
}
.lang-btn[aria-expanded='true'] .chev {
  transform: rotate(180deg);
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  min-width: 180px;
  z-index: 70;
  animation: pop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.lang-menu button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: none;
  border-radius: 10px;
  font: 600 15px/1 var(--body, var(--sans));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.lang-menu button:hover,
.lang-menu button:focus-visible {
  background: var(--peach);
  outline: none;
}
.lang-menu button[aria-selected='true'] {
  color: var(--orange-text);
}
.lang-menu button small {
  color: var(--grey-text);
  font-weight: 700;
  font-size: 12px;
}
.menu-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--paper);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px auto;
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.nav.open .menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.open .menu-btn span:nth-child(2) {
  opacity: 0;
}
.nav.open .menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* before layout.js has measured the bar, small screens start with the ☰ so the full bar never flashes */
@media (max-width: 1240px) {
  .nav:not(.measured) .nav-panel {
    display: none;
  }
  .nav:not(.measured) .menu-btn {
    display: block;
  }
}
.nav.collapsed .menu-btn {
  display: block;
}
/* full-screen menu below the bar, with the CTA, social and language group at the bottom */
.nav.collapsed .nav-panel {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: calc(100vh - 80px);
  height: calc(100dvh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-direction: column;
  gap: 12px;
  background: var(--ink);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  display: none;
}
.nav.collapsed.open .nav-panel {
  display: flex;
}
body:has(.nav.collapsed.open) {
  overflow: hidden;
}
.nav.collapsed .menu-stars {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.nav.collapsed .nav-links,
.nav.collapsed .nav-right {
  position: relative;
}
.nav.collapsed .nav-links {
  flex-direction: column;
  align-items: stretch;
}
.nav.collapsed .nav-links a {
  padding: 14px 12px;
  font-size: 17px;
}
.nav.collapsed .nav-right {
  flex-wrap: wrap;
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid var(--line-dark);
}
.nav.collapsed .nav-right .nav-cta {
  flex: 1 1 100%;
  justify-content: center;
  margin-bottom: 6px;
}
.nav.collapsed .nav-right .lang {
  margin-left: auto;
}
.nav.collapsed .nav-right .lang-menu {
  top: auto;
  bottom: calc(100% + 10px);
}

/* footer */
footer {
  background: var(--ink);
  color: var(--grey-on-dark);
  padding-block: 56px 40px;
  font-size: 14.5px;
}
footer .wrap {
  display: grid;
  gap: 36px;
}
.foot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.foot-top img {
  height: 84px;
  width: auto;
}
.foot-links {
  display: flex;
  gap: 0 22px;
  flex-wrap: wrap;
}
.foot-links a {
  display: inline-block;
  padding: 8px 0;
  text-decoration: none;
  color: var(--paper);
}
.foot-links a:hover,
.foot-links a[aria-current='page'] {
  color: var(--orange);
}
.foot-legal {
  margin-top: 14px;
  font-size: 13.5px;
}
.foot-bot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
}

/* cookie banner, shown by analytics.js */
.jd-consent {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 36px));
  padding: 16px 18px 18px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--orange);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  animation: jdConsentIn 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.jd-consent-t {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.jd-consent-t::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--ink);
}
.jd-consent p {
  margin: 0;
}
.jd-consent-l {
  display: inline-block;
  margin-top: 4px;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.jd-consent-l:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
.jd-consent-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.jd-consent button {
  flex: 1;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1),
    box-shadow 0.2s;
}
.jd-consent button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--ink);
}
.jd-consent button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.jd-consent-no {
  background: transparent;
}
.jd-consent-yes {
  background: var(--orange);
}
@keyframes jdConsentIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@media (max-width: 600px) {
  .jd-consent {
    left: calc(8px + env(safe-area-inset-left, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 16px);
    padding: 12px 14px 14px;
    font-size: 13.5px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--orange);
  }
  .jd-consent-t {
    font-size: 15px;
  }
  .jd-consent-row {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jd-consent {
    animation: none;
  }
  .jd-consent button {
    transition: none;
  }
}
