/* Legal pages */

.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 8%, rgba(121, 184, 74, 0.15), transparent 26rem),
    radial-gradient(circle at 3% 34%, rgba(20, 184, 176, 0.11), transparent 30rem),
    var(--ivory);
}

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(18px);
}

.legal-header__inner,
.legal-brand,
.legal-header__links,
.legal-footer__inner {
  display: flex;
  align-items: center;
}

.legal-header__inner {
  min-height: 92px;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand__logo {
  width: 136px;
  display: inline-flex;
}

.legal-brand__logo img {
  width: 100%;
  height: auto;
}

.legal-header__links {
  gap: 10px;
  color: var(--navy-950);
  font-size: 0.86rem;
  font-weight: 740;
}

.legal-header__links a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.legal-header__links a:hover,
.legal-header__links a:focus-visible {
  border-color: var(--line);
  background: var(--white);
  color: var(--teal-700);
}

.legal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 82px 0 72px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.78), rgba(239, 250, 248, 0.65)),
    var(--ivory);
}

.legal-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 410px;
  height: 410px;
  right: -120px;
  top: -180px;
  border: 72px solid rgba(0, 164, 160, 0.08);
  border-radius: 50%;
}

.legal-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  left: 4%;
  bottom: -95px;
  border-radius: 48% 52% 61% 39% / 46% 44% 56% 54%;
  background: rgba(121, 184, 74, 0.12);
  transform: rotate(24deg);
}

.legal-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.legal-hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(3.4rem, 6.4vw, 6.2rem);
  font-weight: 820;
  letter-spacing: -0.072em;
  line-height: 0.92;
}

.legal-hero h1 span {
  background: linear-gradient(105deg, var(--teal-600), var(--green-500));
  background-clip: text;
  color: transparent;
}

.legal-hero__copy > p:not(.section-kicker) {
  max-width: 670px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.17rem);
  line-height: 1.72;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 6vw, 78px);
  padding-block: 74px 104px;
}

.legal-sidebar {
  position: sticky;
  top: 126px;
}

.legal-sidebar > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-nav {
  display: grid;
  gap: 8px;
}

.legal-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--navy-950);
  font-size: 0.85rem;
  font-weight: 720;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.legal-nav a span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--aqua-100);
  color: var(--teal-700);
  font-size: 0.66rem;
  font-weight: 840;
}

.legal-nav a.is-active,
.legal-nav a:hover,
.legal-nav a:focus-visible {
  border-color: var(--line);
  background: var(--white);
  transform: translateX(3px);
}

.legal-nav a.is-active {
  box-shadow: 0 8px 20px rgba(5, 35, 61, 0.06);
}

.legal-help {
  display: grid;
  gap: 7px;
  margin-top: 30px;
  border-radius: 20px;
  background: var(--navy-950);
  padding: 20px;
  color: var(--white);
}

.legal-help span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
}

.legal-help a {
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 740;
}

.legal-documents {
  display: grid;
  gap: 26px;
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(28px, 4.4vw, 54px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.legal-document__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-bottom: 38px;
}

.legal-document__number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--aqua-100);
  color: var(--teal-700);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.08em;
}

.legal-document h2 {
  margin: 8px 0 14px;
  color: var(--navy-950);
  font-size: clamp(2.35rem, 4.7vw, 4.4rem);
  font-weight: 820;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.legal-document__intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-document h3 {
  margin: 0 0 9px;
  color: var(--navy-950);
  font-size: 1rem;
}

.legal-document p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.legal-document a {
  color: var(--teal-700);
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--line);
}

.legal-data > div {
  min-width: 0;
  padding: 21px 23px;
  background: var(--aqua-50);
}

.legal-data dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-data dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy-950);
  font-weight: 720;
  line-height: 1.55;
}

.legal-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 38px;
}

.legal-copy-grid section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.legal-highlight {
  margin-bottom: 34px;
  border: 1px solid rgba(0, 164, 160, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--aqua-50), rgba(237, 246, 220, 0.72));
  padding: 24px 26px;
}

.legal-highlight > span {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-700);
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.legal-highlight strong {
  display: block;
  margin-bottom: 7px;
  color: var(--navy-950);
  font-size: 1.05rem;
}

.legal-rights {
  margin-top: 34px;
  border-radius: 24px;
  background: var(--navy-950);
  padding: 24px 26px;
}

.legal-rights > div {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.legal-rights__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal-500);
  color: var(--white);
  font-weight: 840;
}

.legal-rights h3 {
  color: var(--white);
}

.legal-rights p {
  color: rgba(255, 255, 255, 0.72);
}

.legal-rights a {
  color: var(--green-300);
}

.cookie-policy-table {
  overflow: hidden;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
}

.cookie-policy-table > div {
  min-height: 68px;
  display: grid;
  grid-template-columns: 0.75fr 1.8fr 0.75fr;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.cookie-policy-table > div:first-child {
  border-top: 0;
}

.cookie-policy-table__head {
  min-height: 48px !important;
  background: var(--aqua-50);
  color: var(--navy-950) !important;
  font-size: 0.68rem !important;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-policy-table strong {
  color: var(--navy-950);
}

.cookie-status {
  width: fit-content;
  border-radius: 999px;
  background: var(--sand);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 780;
  white-space: nowrap;
}

.cookie-status--active {
  background: var(--leaf-100);
  color: var(--green-600);
}

.legal-cookie-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.legal-cookie-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  border-radius: 24px;
  background: var(--aqua-50);
  padding: 22px 24px;
}

.legal-cookie-action strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-950);
}

.legal-footer {
  border-top: 1px solid var(--line);
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.8);
}

.legal-footer__inner {
  min-height: 94px;
  justify-content: space-between;
  gap: 24px;
}

.legal-footer p {
  margin: 0;
}

.legal-footer__inner > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.legal-footer a,
.legal-footer button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

.legal-footer a:hover,
.legal-footer a:focus-visible,
.legal-footer button:hover,
.legal-footer button:focus-visible {
  color: var(--green-300);
}

/* Cookie notice and settings */

body.cookie-modal-open {
  overflow: hidden;
}

.cookie-banner {
  position: fixed;
  z-index: 90;
  width: min(1160px, calc(100% - 32px));
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(5, 35, 61, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  padding: 17px 18px;
  box-shadow: 0 24px 70px rgba(5, 35, 61, 0.24);
  color: var(--navy-950);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.cookie-banner__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--aqua-100);
  color: var(--teal-700);
}

.cookie-banner__icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cookie-banner__copy strong {
  display: block;
  font-size: 0.92rem;
}

.cookie-banner__copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.cookie-banner__copy a,
.cookie-panel a {
  color: var(--teal-700);
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 17px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 780;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.cookie-banner__actions > .cookie-action.cookie-action--secondary,
.cookie-panel .cookie-action--secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy-950);
}

.cookie-action--secondary:hover {
  border-color: var(--teal-600);
  color: var(--teal-700);
}

.cookie-action--primary {
  border: 1px solid var(--teal-600);
  background: var(--teal-600);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 164, 160, 0.2);
}

.cookie-action:hover {
  transform: translateY(-1px);
}

.cookie-action:focus-visible,
.cookie-switch:focus-visible,
.cookie-panel__close:focus-visible {
  outline: 3px solid rgba(0, 164, 160, 0.22);
  outline-offset: 3px;
}

.cookie-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(5, 35, 61, 0.66);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: var(--ivory);
  box-shadow: 0 30px 90px rgba(5, 35, 61, 0.38);
}

.cookie-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 28px 30px 24px;
}

.cookie-panel__eyebrow {
  margin: 0 0 7px;
  color: var(--teal-700);
  font-size: 0.67rem;
  font-weight: 840;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cookie-panel h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1;
}

.cookie-panel__close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-950);
  cursor: pointer;
}

.cookie-panel__close span {
  transform: translateY(-1px);
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
}

.cookie-panel__intro {
  margin: 0;
  padding: 22px 30px 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.cookie-categories {
  display: grid;
  gap: 10px;
  padding: 18px 30px;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  padding: 19px 20px;
}

.cookie-category__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.cookie-category h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 0.9rem;
}

.cookie-category__heading > span {
  border-radius: 999px;
  background: var(--aqua-100);
  padding: 5px 8px;
  color: var(--teal-700);
  font-size: 0.6rem;
  font-weight: 790;
  text-transform: uppercase;
}

.cookie-category p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.cookie-switch {
  position: relative;
  width: 50px;
  height: 29px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #d7dee2;
  padding: 3px;
  cursor: pointer;
  transition: background 180ms ease;
}

.cookie-switch > span {
  width: 23px;
  height: 23px;
  display: block;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 7px rgba(5, 35, 61, 0.2);
  transition: transform 180ms ease;
}

.cookie-switch.is-active {
  background: var(--teal-600);
}

.cookie-switch.is-active > span {
  transform: translateX(21px);
}

.cookie-switch.is-locked {
  cursor: not-allowed;
  opacity: 0.82;
}

.cookie-panel__policy {
  padding: 2px 30px 22px;
  color: var(--muted);
  font-size: 0.72rem;
}

.cookie-panel__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 20px 30px 24px;
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 1080px) {
  .cookie-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cookie-banner__actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .cookie-banner__actions .cookie-action {
    flex: 1 1 0;
  }
}

@media (max-width: 980px) {
  .legal-hero__inner {
    grid-template-columns: 1fr;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-sidebar > p,
  .legal-help {
    display: none;
  }

  .legal-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-nav a {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .legal-header__inner {
    min-height: 80px;
  }

  .legal-brand__logo {
    width: 108px;
  }

  .legal-header__links {
    gap: 2px;
    font-size: 0.74rem;
  }

  .legal-header__links a {
    padding: 8px 9px;
  }

  .legal-hero {
    padding: 58px 0 48px;
  }

  .legal-hero h1 {
    font-size: clamp(3.05rem, 15vw, 4.5rem);
  }

  .legal-nav,
  .legal-data,
  .legal-copy-grid,
  .legal-cookie-copy {
    grid-template-columns: 1fr;
  }

  .legal-nav a {
    justify-content: flex-start;
  }

  .legal-layout {
    padding-bottom: 70px;
  }

  .legal-document {
    border-radius: 26px;
    padding: 26px 20px;
  }

  .legal-document__header {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cookie-policy-table__head {
    display: none !important;
  }

  .cookie-policy-table > div {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .legal-cookie-action {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-cookie-action .button {
    width: 100%;
  }

  .legal-footer__inner {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .legal-footer__inner > div {
    justify-content: flex-start;
    gap: 12px 18px;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
    gap: 13px;
    bottom: 10px;
    border-radius: 22px;
    padding: 17px;
  }

  .cookie-banner__icon {
    width: 42px;
    height: 42px;
  }

  .cookie-banner__actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-banner__actions .cookie-action {
    width: 100%;
    white-space: normal;
  }

  .cookie-banner__actions .cookie-action--primary {
    grid-column: 1 / -1;
  }

  .cookie-modal {
    align-items: end;
    padding: 10px;
  }

  .cookie-panel {
    max-height: calc(100vh - 20px);
    border-radius: 26px;
  }

  .cookie-panel__header,
  .cookie-panel__footer {
    padding-inline: 20px;
  }

  .cookie-panel__intro,
  .cookie-categories,
  .cookie-panel__policy {
    padding-inline: 20px;
  }

  .cookie-category {
    gap: 14px;
    padding: 17px;
  }

  .cookie-panel__footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-panel__footer .cookie-action {
    width: 100%;
  }
}
