/* Header, navigation, search bar, footer, cookie notice. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(49, 49, 49, .5); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; margin-right: auto; }
.brand img { width: 138px; }
.brand-tag { font: 500 .62rem/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-left: .9rem; border-left: 1px solid var(--line); }
.primary ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.primary a {
  position: relative; display: block; padding: .55rem .8rem;
  font: 600 .86rem/1 var(--display); color: var(--ink-2); text-decoration: none; border-radius: 4px;
  transition: color .2s;
}
.primary a::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.primary a:hover { color: var(--blue); }
.primary a:hover::after, .primary a[aria-current="page"]::after, .primary a.is-section::after { transform: scaleX(1); }
.primary a[aria-current="page"], .primary a.is-section { color: var(--ink); }
.primary a[data-cta] { background: var(--blue); color: #ffffff; margin-left: .5rem; padding: .7rem 1rem; transition: background .2s; }
.primary a[data-cta]::after { display: none; }
.primary a[data-cta]:hover { background: var(--blue-deep); color: #ffffff; }
.primary a[data-cta][aria-current="page"] { background: var(--ink); color: #ffffff; }
.header-tools { display: flex; gap: .35rem; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 18px; height: 1.6px; background: currentColor; transition: transform .3s var(--ease); }
.menu-btn span + span { transform: translateY(4px); }
.menu-btn span:first-child { transform: translateY(-4px); }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span + span { transform: translateY(0) rotate(-45deg); }
.menu-btn { grid-template-rows: 1fr; }
.menu-btn span { grid-area: 1 / 1; margin: 0 !important; }

.search-bar { border-top: 1px solid var(--line); background: var(--paper); }
.search-bar:not([hidden]) { animation: drop .3s var(--ease); }
.search-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 0; color: var(--muted); }
.search-row input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 1.05rem var(--body); color: var(--ink); padding: .5rem 0; }
.search-row input:focus { outline: none; }
.search-row:focus-within { color: var(--blue); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

@media (max-width: 980px) {
  .menu-btn { display: grid; }
  .brand-tag { display: none; }
  .primary { position: absolute; left: 0; right: 0; top: 100%; }
  .primary ul {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1.5rem 1.25rem;
    box-shadow: 0 20px 30px -24px rgba(49, 49, 49, .45);
  }
  .primary ul.open { display: flex; animation: drop .3s var(--ease); }
  .primary a { padding: .95rem .25rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .primary a::after { left: 0; right: auto; width: 3px; top: 30%; bottom: 30%; height: auto; transform: scaleY(0); }
  .primary a:hover::after, .primary a[aria-current="page"]::after, .primary a.is-section::after { transform: scaleY(1); }
  .primary a[aria-current="page"], .primary a.is-section { padding-left: .9rem; }
  .primary a[data-cta] { margin: 1rem 0 0; text-align: center; border: 0; border-radius: 4px; padding: .95rem; }
}

/* Footer */
.site-footer { background: var(--ink); color: #d0d0d0; padding: 4.5rem 0 0; font-size: .93rem; }
.site-footer a { color: #eeeeee; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 3rem; padding-bottom: 3.5rem; }
.footer-brand img { width: 140px; background: var(--paper); padding: .55rem .7rem; border-radius: 4px; margin-bottom: 1.25rem; }
.footer-brand p { max-width: 38ch; }
.footer-sister { color: #bdbdbd; font-size: .86rem; }
.footer-h { font: 500 .7rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #ffffff; margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-info { border-top: 1px solid rgba(208, 208, 208, .16); padding: 1.4rem 0 1.6rem; font-size: .82rem; color: #bdbdbd; }
.footer-info p { margin: 0; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Cookie notice */
.cookie {
  position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem; margin-inline: auto; max-width: 720px;
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--ink); color: #eeeeee; padding: 1rem 1.15rem 1rem 1.4rem; border-radius: 6px;
  box-shadow: 0 18px 40px -16px rgba(49, 49, 49, .6); font-size: .88rem; line-height: 1.5;
}
.cookie[hidden] { display: none; }
.cookie:not([hidden]) { animation: rise .5s var(--ease); }
.cookie p { margin: 0; flex: 1; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie .btn--ghost { background: transparent; color: #eeeeee; border-color: rgba(238, 238, 238, .35); }
.cookie .btn--ghost:hover { color: #fff; border-color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 600px) { .cookie { flex-direction: column; align-items: stretch; } }
