/* ==========================================================================
   Layout chrome: sticky header, navigation (desktop + mobile panel),
   footer with sitemap, cookie banner.
   ========================================================================== */

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
}
/* backdrop lives on a pseudo element so the fixed mobile panel is not trapped */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 12, 15, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.hdr {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0 24px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 22px/1 var(--font-display);
  letter-spacing: .02em;
}
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-mark .lm-top { transform-origin: 17px 17px; transition: transform .5s var(--ease); }
.logo:hover .lm-top { transform: rotateX(180deg); }
.logo b { color: var(--amber); font-weight: 700; }

.burger {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.burger-lines { position: relative; width: 20px; height: 14px; }
.burger-lines span {
  position: absolute; left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease);
}
.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 6px; }
.burger-lines span:nth-child(3) { top: 12px; }
.burger[aria-expanded="true"] .burger-lines span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-lines span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.nav-list { list-style: none; display: flex; }
.nav-pages a, .nav-anchors a { text-decoration: none; }

/* mobile + tablet: fixed panel under the header */
@media (max-width: 1079px) {
  .hdr { grid-template-columns: 1fr auto; }
  .nav-panel {
    position: fixed;
    left: 0; right: 0;
    top: var(--header-h);
    bottom: 0;
    z-index: 99;
    overflow-y: auto;
    padding: 22px var(--gutter) 40px;
    background: #0b0c0f;
    border-top: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav-open .nav-panel {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s;
  }
  .nav-pages .nav-list { flex-direction: column; gap: 4px; }
  .nav-pages a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font: 700 28px/1.1 var(--font-display);
    text-transform: uppercase;
  }
  .nav-pages a::after { content: '→'; font-family: var(--font-body); color: var(--amber); font-size: 20px; }
  .nav-pages a[aria-current="page"] { color: var(--amber); }
  .nav-anchors { margin-top: 26px; }
  .nav-anchors .nav-label { display: block; margin-bottom: 10px; }
  .nav-anchors .nav-list { flex-wrap: wrap; gap: 8px; }
  .nav-anchors a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    color: var(--ink-dim);
    font-size: 15px;
  }
  .hdr-cta { margin-top: 26px; width: 100%; }
}

.nav-label { font: 500 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.nav-anchors a .gl {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 4px;
  border-radius: 4px;
  background: var(--panel-3);
  color: var(--amber);
  font: 700 11px var(--font-mono);
}

/* desktop: one row of pages + CTA, a second "platform strip" of in-page anchors */
@media (min-width: 1080px) {
  .burger { display: none; }
  .nav-panel { display: contents; }
  .logo { grid-column: 1; grid-row: 1; }
  .nav-pages { grid-column: 2; grid-row: 1; justify-self: center; }
  .hdr-cta { grid-column: 3; grid-row: 1; }
  .nav-pages .nav-list { gap: 6px; }
  .nav-pages a {
    position: relative;
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--ink-dim);
    font: 600 15px/1 var(--font-body);
    letter-spacing: .02em;
    transition: color .2s, background-color .2s;
  }
  .nav-pages a:hover { color: var(--ink); background: var(--panel-2); }
  .nav-pages a[aria-current="page"] { color: var(--ink); }
  .nav-pages a[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 16px; right: 16px; bottom: 2px;
    height: 2px;
    background: var(--amber);
    border-radius: 2px;
  }
  .hdr-cta { min-height: 42px; padding: 9px 18px; font-size: 15px; }
  .nav-anchors {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 40px;
    border-top: 1px solid var(--line);
  }
  .nav-anchors .nav-list { gap: 4px; }
  .nav-anchors a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--ink-dim);
    font-size: 14px;
    transition: color .2s, background-color .2s;
  }
  .nav-anchors a:hover, .nav-anchors a.is-active { color: var(--ink); background: var(--panel-2); }
  .nav-anchors a.is-active .gl { background: var(--amber); color: #17130a; }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: 0;
  background: #08090b;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 15px;
}
.site-footer::before {
  /* perforation line */
  content: '';
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 10px, transparent 10px 20px);
  opacity: .55;
}
.ft-top {
  display: grid;
  gap: 40px;
  padding: clamp(56px, 7vw, 88px) 0 40px;
}
@media (min-width: 900px) { .ft-top { grid-template-columns: 1.3fr 2fr; gap: 64px; } }
.ft-brand p { max-width: 380px; }
.ft-brand .logo { margin-bottom: 18px; }

/* contact block: a small information-desk ticket */
.ft-contact {
  display: grid;
  gap: 10px;
  max-width: 380px;
  margin-top: 24px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--amber);
  border-radius: 12px;
  background: linear-gradient(180deg, #111318, #0c0d10);
  font-style: normal;
}
.ft-brand .ft-contact p { margin: 0; }
.ft-contact-label { font: 700 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.ft-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font: 600 16px/1.25 var(--font-body);
  overflow-wrap: anywhere;
}
.ft-contact-row:hover { color: var(--amber); }
.ft-contact-row svg {
  flex: none;
  width: 36px; height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel-3);
  color: var(--amber);
}
.ft-contact-row small { display: block; font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ft-responsible {
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
}
.ft-responsible span { display: block; margin-bottom: 4px; font: 500 11px/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ft-map { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .ft-map { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ft-map h3 {
  font: 700 15px/1.2 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.ft-map h3 a { color: inherit; text-decoration: none; }
.ft-map ul { list-style: none; display: grid; gap: 8px; }
.ft-map a { color: var(--ink-dim); text-decoration: none; }
.ft-map a:hover { color: var(--ink); text-decoration: underline; }

.ft-independence {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  margin-bottom: 28px;
  border: 1px dashed rgba(255, 182, 39, .45);
  border-radius: 12px;
  background: rgba(255, 182, 39, .05);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.ft-independence svg { flex: none; width: 26px; height: 26px; color: var(--amber); margin-top: 2px; }
.ft-independence p { margin: 0; }

.ft-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.ft-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ft-legal span { color: var(--muted); cursor: not-allowed; }
.ft-legal button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- cookie banner: a little ticket at the bottom ---------- */
.cookie {
  position: fixed;
  z-index: 150;
  left: 12px; right: 12px; bottom: 12px;
  max-width: 560px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  color: var(--paper-ink);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.2);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .35s var(--ease);
}
.cookie.is-visible { transform: none; opacity: 1; }
@media (min-width: 768px) { .cookie { left: 24px; bottom: 24px; } }
.cookie-stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 2px dashed rgba(30, 27, 22, .25);
  font: 700 12px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-muted);
  position: relative;
}
.cookie-stub::before, .cookie-stub::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
}
.cookie-stub::before { left: -9px; }
.cookie-stub::after { right: -9px; }
.cookie-body { padding: 18px 20px 20px; }
.cookie h2 {
  font-size: 26px;
  text-transform: none;
  margin-bottom: 6px;
  color: var(--paper-ink);
}
.cookie p { font-size: 15px; line-height: 1.5; color: #3b352c; margin-bottom: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { min-height: 44px; padding: 10px 16px; font-size: 15px; flex: 1 1 auto; }
.cookie .btn--line { --b-bg: transparent; --b-ink: var(--paper-ink); border-color: rgba(30,27,22,.35); }
.cookie .btn--line:hover { border-color: var(--paper-ink); }
.cookie-settings { margin: 4px 0 14px; display: grid; gap: 8px; }
.cookie-settings[hidden] { display: none; }
.toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--paper-2);
  cursor: pointer;
}
.toggle strong { color: var(--paper-ink); font-size: 15px; }
.toggle small { grid-column: 1; color: var(--paper-muted); font-size: 13px; line-height: 1.35; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw {
  grid-row: 1 / span 2; grid-column: 2;
  position: relative;
  width: 46px; height: 26px;
  border-radius: 999px;
  background: #b9ad94;
  transition: background-color .25s;
}
.toggle .sw::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .25s var(--ease);
}
.toggle input:checked + .sw { background: var(--paper-ink); }
.toggle input:checked + .sw::after { transform: translateX(20px); background: var(--amber); }
.toggle input:focus-visible + .sw { outline: 3px solid var(--stamp); outline-offset: 2px; }
.toggle input:disabled + .sw { opacity: .6; }
