/* ─── Cookie consent — banner + preferences modal ──────────────────────────
   Boutique, quiet, photo-first house style: cream card, hairline rules,
   gold accent, Fraunces heads / Afacad body. No dark overlay on the banner —
   it sits low-left so the hero stays untouched.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Shared buttons ────────────────────────────────────────────────────── */

.cc-btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.cc-btn--solid {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: #fff;
}
.cc-btn--solid:hover { background: var(--c-gold-dk); border-color: var(--c-gold-dk); }

.cc-btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.cc-btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold); }

.cc-btn--text {
  background: none;
  padding-inline: 0.25rem;
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line);
}
.cc-btn--text:hover { color: var(--c-gold); text-decoration-color: currentColor; }

.cc-btn:focus-visible,
.cc-modal__close:focus-visible,
.cc-switch input:focus-visible + .cc-switch__track {
  outline: 2px solid var(--c-sea);
  outline-offset: 3px;
}

/* ── Banner ────────────────────────────────────────────────────────────── */

.cc-banner {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  /* Lifted clear of the GTranslate globe, which is fixed in this corner. */
  bottom: 5.5rem;
  z-index: 9000;
  width: min(30rem, calc(100vw - 2rem));
  background: var(--c-cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -12px rgba(42, 38, 34, 0.28);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-banner.is-in { opacity: 1; transform: none; }

/* Gold hairline along the top edge — the brand tell. */
.cc-banner::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  background: var(--c-gold);
  border-radius: var(--radius) var(--radius) 0 0;
}

.cc-banner__inner { padding: clamp(1.25rem, 2.5vw, 1.75rem); }

.cc-banner__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.cc-banner__text {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

.cc-banner__policy {
  color: var(--c-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.cc-banner__policy:hover { color: var(--c-gold-dk); }

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.cc-banner__actions .cc-btn--text { margin-right: auto; }

/* ── Preferences modal ─────────────────────────────────────────────────── */

/* `display` below out-specifies the UA's [hidden] rule, so restore it
   explicitly — otherwise the closed modal's scrim swallows every click. */
.cc-banner[hidden],
.cc-modal[hidden] { display: none !important; }

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.cc-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(42, 38, 34, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cc-modal.is-in .cc-modal__scrim { opacity: 1; }

.cc-modal__panel {
  position: relative;
  width: min(38rem, 100%);
  max-height: min(86vh, 44rem);
  overflow-y: auto;
  background: var(--c-cream);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 30px 70px -20px rgba(42, 38, 34, 0.45);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-modal.is-in .cc-modal__panel { opacity: 1; transform: none; }

.cc-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.cc-modal__close svg { width: 14px; height: 14px; }
.cc-modal__close:hover { color: var(--c-gold); border-color: var(--line); }

.cc-modal__kicker {
  font-family: var(--font-sans);
  font-size: var(--step-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin: 0 0 0.5rem;
}

.cc-modal__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.cc-modal__intro {
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 1.75rem;
  max-width: 46ch;
}

/* ── Category rows ─────────────────────────────────────────────────────── */

.cc-cats { list-style: none; margin: 0 0 1.75rem; padding: 0; }

.cc-cat {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.cc-cat:last-child { border-bottom: 1px solid var(--line); }

.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.cc-cat__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
}

.cc-cat__locked {
  font-family: var(--font-sans);
  font-size: var(--step-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-sea);
}

.cc-cat__desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  max-width: 52ch;
}

/* ── Switch ────────────────────────────────────────────────────────────── */

.cc-switch {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc-switch__track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 13px;
  background: var(--c-sand-dk);
  transition: background-color 0.3s ease;
}

.cc-switch__knob {
  display: block;
  width: 20px;
  height: 20px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(42, 38, 34, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-switch input:checked + .cc-switch__track { background: var(--c-gold); }
.cc-switch input:checked + .cc-switch__track .cc-switch__knob { transform: translateX(20px); }

/* ── Modal actions + footnote ──────────────────────────────────────────── */

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cc-modal__actions .cc-btn { flex: 1 1 12rem; text-align: center; }

.cc-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  font-family: var(--font-sans);
  font-size: var(--step-small);
}
.cc-modal__foot a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-modal__foot a:hover { color: var(--c-gold); }

/* ── Body lock while the modal is open ─────────────────────────────────── */

body.cc-lock { overflow: hidden; }

/* ── Footer "Cookie settings" trigger ──────────────────────────────────── */

.site-footer__legal .cc-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ── Narrow screens: full-width banner, stacked actions ────────────────── */

@media (max-width: 560px) {
  .cc-banner {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
  .cc-banner__actions .cc-btn--text { margin-right: 0; order: 3; width: 100%; text-align: center; }
  .cc-banner__actions .cc-btn--ghost,
  .cc-banner__actions .cc-btn--solid { flex: 1 1 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal__panel,
  .cc-modal__scrim,
  .cc-switch__track,
  .cc-switch__knob,
  .cc-btn { transition: none; }
  .cc-banner { transform: none; }
}

/* Visually-hidden helper (theme has no global one). */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
