/* Cookie consent banner (consent.js). A dark card in the style of the page's
   own cards, floating at the bottom over the photograph; it never blocks the
   page. The three choices share one button style: accepting and refusing must
   be equally easy to see and reach. Tokens come from the design system; the
   fallbacks keep it readable on a page that has not loaded them. */

.as-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; justify-content: center;
  padding: 0 16px max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .42s var(--ease-out, ease), transform .42s var(--ease-out, ease), visibility 0s linear .42s;
}
.as-consent.is-shown {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .42s var(--ease-out, ease), transform .42s var(--ease-out, ease), visibility 0s;
}
.as-consent__card {
  pointer-events: auto;
  width: 100%; max-width: 760px; max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px); overflow-y: auto;
  box-sizing: border-box;
  padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.6vw, 30px);
  background: rgba(12, 16, 23, 0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--r-lg, 10px);
  box-shadow: 0 34px 90px rgba(6, 9, 15, 0.5);
  color: var(--stone-200, #dde1e6);
  font-family: var(--font-sans, "Hanken Grotesk", system-ui, sans-serif);
}
.as-consent__eyebrow {
  margin: 0;
  font-family: var(--font-mono, "Spline Sans Mono", ui-monospace, monospace);
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-300, #fba542);
}
.as-consent__text {
  margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--stone-200, #dde1e6);
  text-wrap: pretty;
}
.as-consent__policy {
  color: var(--stone-50, #f6f7f8);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(246, 247, 248, 0.35);
}
.as-consent__policy:hover { text-decoration-color: var(--stone-50, #f6f7f8); }

/* Categories: a soft expand and fade, with the same hairlines the cards use. */
.as-consent__panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .36s var(--ease-out, ease), opacity .42s var(--ease-out, ease);
}
.as-consent__panel.is-open { grid-template-rows: 1fr; opacity: 1; }
.as-consent__panel-inner { min-height: 0; overflow: hidden; }
.as-consent__panel-inner > :first-child { margin-top: 14px; }
.as-consent__cat {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.09);
}
label.as-consent__cat { cursor: pointer; }
.as-consent__cat-text { display: flex; flex-direction: column; gap: 3px; }
.as-consent__cat-name {
  font-family: var(--font-display, "Newsreader", Georgia, serif); font-weight: 500; font-size: 16px; line-height: 1.35;
  color: var(--stone-50, #f6f7f8);
}
.as-consent__cat-desc { font-size: 13.5px; line-height: 1.5; color: var(--stone-300, #c3c9d0); }
.as-consent__always {
  flex: none; margin-top: 3px;
  font-family: var(--font-mono, "Spline Sans Mono", ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  color: var(--stone-400, #9aa3ad);
}

/* Switch: a checkbox drawn as a track and knob; on is the page's light ink,
   never the ember accent, so no choice looks like the recommended one. */
.as-consent__switch {
  -webkit-appearance: none; appearance: none; flex: none;
  position: relative; width: 40px; height: 22px; margin: 1px 0 0;
  border-radius: var(--r-pill, 999px); border: 1px solid rgba(246, 247, 248, 0.35);
  background: transparent; cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.as-consent__switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: rgba(246, 247, 248, 0.6);
  transition: transform .16s ease, background .16s ease;
}
.as-consent__switch:checked { background: var(--stone-50, #f6f7f8); border-color: var(--stone-50, #f6f7f8); }
.as-consent__switch:checked::before { transform: translateX(18px); background: rgba(12, 16, 23, 0.9); }

.as-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.as-consent__btn {
  flex: 1 1 0; min-width: max-content;
  padding: 11px 20px; border-radius: var(--r-pill, 999px);
  border: 1px solid rgba(246, 247, 248, 0.35); background: rgba(246, 247, 248, 0.06);
  color: var(--stone-50, #f6f7f8); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 14.5px; line-height: 1.2;
  transition: background .16s ease, border-color .16s ease;
}
.as-consent__btn:hover { background: rgba(246, 247, 248, 0.14); border-color: rgba(246, 247, 248, 0.6); }
.as-consent__btn:focus-visible,
.as-consent__switch:focus-visible,
.as-consent__policy:focus-visible {
  outline: 2px solid var(--focus-ring, #c87a2e); outline-offset: 2px;
}

@media (max-width: 560px) {
  .as-consent { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
  .as-consent__card { padding: 16px 18px 18px; }
  .as-consent__text { margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
  .as-consent__actions { gap: 8px; margin-top: 14px; }
  .as-consent__btn { flex-basis: 100%; padding: 10px 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .as-consent, .as-consent.is-shown, .as-consent__panel { transition: none; }
}
