/* =========================================================
   OSSLER CONSENT GATE
   Mirrors the land-check / hero-form visual language.
   ========================================================= */

.consent-gate {
  --consent-orange: var(--orange);
  --consent-ink: var(--ink);
  --consent-muted: var(--muted);

  width: min(760px, calc(100vw - 34px));
  max-height: min(880px, calc(100dvh - 34px));
  margin: auto;
  padding: 30px 32px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--consent-ink);
  background: rgba(249, 250, 249, 0.985);
  border: 1px solid rgba(24, 34, 29, 0.08);
  border-radius: 29px;
  box-shadow: 0 30px 100px rgba(24, 34, 29, 0.24);
  font-family: "DM Sans", Arial, sans-serif;
  isolation: isolate;
}

.consent-gate[open] { display: block; }

.consent-gate::backdrop {
  background: rgba(19, 27, 23, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.consent-gate__accent {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  width: 31%;
  height: 2px;
  background: var(--consent-orange);
}

.consent-gate__technical-art {
  position: absolute;
  z-index: -1;
  right: -80px;
  bottom: -22px;
  width: 72%;
  height: 30%;
  overflow: hidden;
  opacity: 0.18;
  pointer-events: none;
}

.consent-gate__technical-art svg { width: 100%; height: 100%; }
.consent-gate__terrain-line { fill: none; stroke: rgba(24,34,29,.16); stroke-width: 1; }
.consent-gate__grid-lines { stroke: rgba(242,110,63,.26); stroke-width: 1; }

.consent-gate__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.consent-gate__brand { display: flex; align-items: center; gap: 10px; }
.consent-gate__index { font-size: 9px; font-weight: 600; line-height: 1; letter-spacing: 1.2px; }
.consent-gate__index-line { width: 22px; height: 1px; background: var(--consent-orange); }
.consent-gate__eyebrow,
.consent-gate__required {
  font-size: 7px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 2.3px;
  text-transform: uppercase;
}
.consent-gate__eyebrow { color: var(--consent-orange); }
.consent-gate__required { color: rgba(24,34,29,.36); }

.consent-gate__progress {
  position: relative;
  z-index: 2;
  height: 1px;
  margin: 20px 0 25px;
  overflow: hidden;
  background: rgba(24,34,29,.09);
}
.consent-gate__progress span { display:block; width: 26%; height:100%; background: var(--consent-orange); }

.consent-gate__heading { position: relative; z-index: 2; }
.consent-gate__heading h2 {
  max-width: 620px;
  color: var(--consent-ink);
  font-size: clamp(31px, 3vw, 43px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.05em;
}
.consent-gate__heading p {
  max-width: 650px;
  margin-top: 13px;
  color: var(--consent-muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
}
.consent-gate__heading p a,
.consent-category__panel a {
  color: var(--consent-orange);
  text-decoration: none;
}
.consent-gate__heading p a:hover,
.consent-category__panel a:hover { text-decoration: underline; text-underline-offset: 3px; }

.consent-gate__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 15px;
}
.consent-gate__legal a {
  position: relative;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}
.consent-gate__legal a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: rgba(24,34,29,.16);
}

.consent-gate__categories {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.consent-category {
  overflow: hidden;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(24,34,29,.085);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.consent-category__bar {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 17px;
}

.consent-category__trigger {
  min-width: 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1 1 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--consent-ink);
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.consent-category__chevron {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.consent-category__chevron::before,
.consent-category__chevron::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 8px;
  height: 1.5px;
  border-radius: 99px;
  background: var(--consent-ink);
  transition: transform .35s var(--ease-out);
}
.consent-category__chevron::before { left: 0; transform: rotate(45deg); }
.consent-category__chevron::after { right: 0; transform: rotate(-45deg); }
.consent-category.is-open .consent-category__chevron::before { transform: rotate(-45deg); }
.consent-category.is-open .consent-category__chevron::after { transform: rotate(45deg); }

.consent-category__control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--consent-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.consent-switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}
.consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.consent-switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  display: block;
  border: 1px solid rgba(24,34,29,.13);
  border-radius: 999px;
  background: var(--consent-track);
  transition: background-color .28s ease, border-color .28s ease, opacity .28s ease;
}
.consent-switch__track > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(24,34,29,.14);
  transition: transform .32s var(--ease-out);
}
.consent-switch input:checked + .consent-switch__track {
  background: var(--consent-orange);
  border-color: var(--consent-orange);
}
.consent-switch input:checked + .consent-switch__track > span { transform: translateX(20px); }
.consent-switch input:disabled + .consent-switch__track { opacity: .55; }
.consent-switch--locked { cursor: default; }
.consent-switch--locked input:checked + .consent-switch__track { opacity: .68; }

.consent-category__panel {
  height: auto;
  overflow: hidden;
}
.consent-category__panel[hidden] { display: none; }
.consent-category__panel-inner {
  padding: 0 17px 17px 44px;
  border-top: 1px solid rgba(24,34,29,.065);
}
.consent-category__panel p {
  padding-top: 14px;
  color: var(--consent-muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.62;
}

.consent-category__suboption {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(24,34,29,.075);
  border-radius: 12px;
  background: rgba(247,249,248,.74);
}
.consent-category__suboption > div { display: grid; gap: 3px; }
.consent-category__suboption strong { color: var(--ink); font-size: 11px; font-weight: 600; }
.consent-category__suboption span { color: var(--muted); font-size: 8px; letter-spacing: 1.1px; text-transform: uppercase; }

.consent-gate__note {
  position: relative;
  z-index: 2;
  margin-top: 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.consent-gate__actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(0,.85fr);
  gap: 10px;
  margin-top: 18px;
}

.consent-gate__accept,
.consent-gate__save {
  min-height: 52px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.consent-gate__accept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 7px 6px 21px;
  border: 1px solid var(--consent-orange);
  background: var(--consent-orange);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(242,110,63,.16);
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.consent-gate__accept:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); }
.consent-gate__action-circle {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}
.consent-gate__save {
  padding: 0 19px;
  border: 1px solid var(--line-strong);
  background: rgba(24,34,29,.88);
  color: var(--white);
  transition: border-color .25s ease, background-color .25s ease;
}
.consent-gate__save:hover { border-color: var(--ink); background: var(--ink); }

.consent-gate :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}


/* The page is deliberately inaccessible until a consent choice is saved. */
body.consent-gated { overflow: hidden !important; }
body.consent-gated .land-check-sticky { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

@media (max-width: 700px) {
  .consent-gate {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 23px 20px 20px;
    border-radius: 23px;
  }
  .consent-gate__required { display: none; }
  .consent-gate__progress { margin: 16px 0 20px; }
  .consent-gate__heading h2 { font-size: clamp(29px, 8.2vw, 37px); }
  .consent-gate__heading p { font-size: 12px; line-height: 1.55; }
  .consent-gate__categories { margin-top: 19px; gap: 8px; }
  .consent-category__bar { min-height: 56px; padding-inline: 13px; gap: 8px; }
  .consent-category__trigger { min-height: 56px; gap: 10px; font-size: 12px; }
  .consent-category__control > span { display: none; }
  .consent-switch { width: 42px; height: 24px; }
  .consent-switch__track { width: 42px; height: 24px; }
  .consent-switch__track > span { width: 16px; height: 16px; }
  .consent-switch input:checked + .consent-switch__track > span { transform: translateX(18px); }
  .consent-category__panel-inner { padding: 0 13px 14px 36px; }
  .consent-category__panel p { padding-top: 12px; font-size: 10.5px; line-height: 1.55; }
  .consent-gate__actions { grid-template-columns: 1fr; }
  .consent-gate__accept,
  .consent-gate__save { min-height: 50px; }
  .consent-gate__save { order: 2; }
  .consent-gate__technical-art { width: 100%; height: 24%; opacity: .12; }
}

@media (max-width: 420px) {
  .consent-gate { padding-inline: 16px; }
  .consent-gate__legal { gap: 7px 13px; }
  .consent-gate__legal a { font-size: 9px; }
  .consent-category__bar { padding-inline: 11px; }
  .consent-category__trigger { font-size: 11px; }
  .consent-category__panel-inner { padding-left: 32px; padding-right: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-gate * { transition: none !important; }
}
