:root {
  --cyan: #2ca4c6;
  --cyan-dark: #087a99;
  --red: #e30613;
  --ink: #181818;
  --muted: #626262;
  --soft: #f5f5f7;
  --surface: #ffffff;
  --line: #d8dde2;
  --page-x: clamp(20px, 3.2vw, 52px);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  color-scheme: only light;
  background: var(--surface);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24, 24, 24, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 24, 24, 0.025) 1px, transparent 1px),
    var(--surface);
  background-size: 48px 48px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(var(--page-x), calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.legal-brand img {
  display: block;
  width: 58px;
  height: 58px;
}

.legal-header__back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 13px;
  color: var(--cyan-dark);
  border: 1px solid var(--cyan-dark);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
  transition: color 180ms ease, background-color 180ms ease;
}

.legal-header__back:hover,
.legal-header__back:focus-visible {
  color: var(--surface);
  background: var(--cyan-dark);
}

main {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.legal-hero {
  position: relative;
  isolation: isolate;
  min-height: 450px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
  padding: 74px 0 68px;
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 5%;
  bottom: 8%;
  width: 44%;
  border-top: 2px dashed rgba(24, 24, 24, 0.18);
  transform: rotate(-7deg);
}

.legal-hero__copy {
  max-width: 780px;
}

.legal-eyebrow {
  margin: 0 0 16px;
  color: var(--cyan-dark);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(62px, 8vw, 118px);
  line-height: 0.88;
  letter-spacing: -0.075em;
  font-weight: 830;
}

.legal-lead {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.42;
}

.legal-hero__stamp {
  width: 190px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--surface);
  background: var(--cyan);
  border: 12px solid var(--surface);
  outline: 2px dashed var(--cyan);
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(8, 122, 153, 0.2);
  transform: rotate(5deg);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero__stamp strong {
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(52px, 8vw, 112px);
  padding: 76px 0 110px;
}

.legal-nav {
  align-self: start;
  position: sticky;
  top: 116px;
}

.legal-nav > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-nav nav {
  display: grid;
}

.legal-nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.3;
  transition: color 180ms ease;
}

.legal-nav a:last-child {
  border-bottom: 1px solid var(--line);
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: var(--cyan-dark);
}

.legal-nav a span {
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 750;
}

.legal-content {
  min-width: 0;
}

.legal-section {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 22px;
  padding: 0 0 66px;
  margin-bottom: 66px;
  border-bottom: 1px solid var(--line);
}

.legal-section__number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  background: var(--cyan);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.legal-section h2,
.legal-update h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.legal-section h3 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.legal-section p,
.legal-update p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
}

.legal-section p:last-child,
.legal-update p:last-child {
  margin-bottom: 0;
}

.legal-section p a,
.legal-update p a {
  color: var(--cyan-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-list {
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-list li {
  position: relative;
  padding: 15px 0 15px 26px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 17px;
}

.legal-list li::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

.legal-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.legal-list strong {
  color: var(--ink);
}

.legal-list--compact li {
  padding-block: 10px;
}

.legal-list--compact li::before {
  top: 20px;
}

.legal-note {
  max-width: 760px;
  margin-top: 30px;
  padding: 26px 28px;
  color: var(--surface);
  background: var(--cyan-dark);
  border-radius: 8px;
}

.legal-note > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-note p {
  color: var(--surface);
}

.cookie-table {
  max-width: 760px;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.cookie-table__row {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 0.8fr;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.cookie-table__row:first-child {
  border-top: 0;
}

.cookie-table__row > * {
  min-width: 0;
}

.cookie-table__row span {
  color: var(--muted);
}

.cookie-table__head {
  color: var(--surface);
  background: var(--ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cookie-table__head span {
  color: var(--surface);
}

.service-grid {
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.service-grid a {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.service-grid a:hover,
.service-grid a:focus-visible {
  border-color: var(--cyan-dark);
  transform: translateY(-2px);
}

.service-grid strong {
  font-size: 19px;
}

.service-grid span {
  color: var(--cyan-dark);
  font-size: 13px;
}

.contact-card {
  max-width: 760px;
  margin-top: 34px;
  padding: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  color: var(--surface);
  background: var(--ink);
  border-radius: 8px;
}

.contact-card .legal-eyebrow {
  margin-bottom: 12px;
  color: var(--cyan);
}

.contact-card__actions {
  display: flex;
  gap: 10px;
}

.contact-card__actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}

.contact-card__actions a:hover,
.contact-card__actions a:focus-visible {
  color: var(--surface);
  background: var(--cyan-dark);
}

.legal-update {
  padding: 42px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal-update h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.legal-footer {
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px max(var(--page-x), calc((100vw - var(--max)) / 2));
  color: rgba(255, 255, 255, 0.56);
  background: var(--ink);
  font-size: 12px;
}

.legal-footer__brand {
  justify-self: start;
  color: var(--surface);
  font-size: 16px;
  font-weight: 750;
}

.legal-footer span:last-child {
  justify-self: end;
}

a:focus-visible {
  outline: 3px solid rgba(44, 164, 198, 0.4);
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .legal-hero {
    min-height: 400px;
    grid-template-columns: 1fr auto;
  }

  .legal-hero__stamp {
    width: 150px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: static;
  }

  .legal-nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 88px;
  }

  body {
    background-size: 36px 36px;
  }

  .legal-header {
    min-height: 72px;
    padding-block: 8px;
  }

  .legal-brand img {
    width: 50px;
    height: 50px;
  }

  .legal-brand span {
    font-size: 14px;
  }

  .legal-header__back span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .legal-header__back {
    width: 42px;
    padding-inline: 0;
  }

  .legal-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 56px 0 48px;
  }

  .legal-hero h1 {
    font-size: clamp(56px, 19vw, 82px);
  }

  .legal-lead {
    margin-top: 24px;
    font-size: 18px;
  }

  .legal-hero__stamp {
    width: 126px;
    justify-self: end;
    margin-right: 14px;
  }

  .legal-layout {
    gap: 60px;
    padding: 54px 0 76px;
  }

  .legal-nav nav {
    grid-template-columns: 1fr;
  }

  .legal-section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 52px;
    margin-bottom: 52px;
  }

  .legal-section__number {
    width: 42px;
    height: 42px;
  }

  .legal-section h2 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .legal-section p,
  .legal-list li,
  .legal-update p {
    font-size: 16px;
  }

  .cookie-table {
    display: grid;
    gap: 10px;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .cookie-table__row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .cookie-table__head {
    display: none;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

  .contact-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .legal-update {
    padding: 28px 24px;
  }

  .legal-footer {
    grid-template-columns: 1fr auto;
  }

  .legal-footer span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .legal-header__back,
  .legal-nav a,
  .service-grid a {
    transition: none;
  }
}
