@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --red: #e5242a;
  --dark: #0a0a0a;
  --ink: #111;
  --text: #26313d;
  --muted: #707780;
  --line: rgba(17, 17, 17, 0.12);
  --soft: #f7f7f7;
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 72px;
  --max: 1488px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: #fff;
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.container {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

/* Navigation */

nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 44px);
  padding: 0 clamp(20px, 4vw, 60px);
  background: var(--red);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-logo img {
  width: clamp(118px, 10vw, 150px);
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.3vw, 38px);
  list-style: none;
  flex: 1 1 auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0.96;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-login,
nav a[href*="login" i]:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 24px;
  border-radius: 6px;
  background: #fff;
  color: var(--red) !important;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

/* Page background */

.page-bg-wrap,
.legal-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
  background:
    radial-gradient(620px 420px at 82% 28%, rgba(229, 36, 42, 0.14), transparent 70%),
    radial-gradient(420px 300px at -5% 92%, rgba(229, 36, 42, 0.08), transparent 72%),
    #fff;
}

/* Optional hero support */

.legal-hero-outer {
  padding: calc(var(--nav-h) + 24px) var(--pad) 0;
}

.legal-hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  padding: clamp(34px, 5vw, 58px);
  background: linear-gradient(120deg, #14151c 0%, #1a1a22 55%, #241417 100%);
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 85% 0%, rgba(229, 36, 42, 0.36), transparent 62%);
  pointer-events: none;
}

.legal-eyebrow,
.legal-hero h1,
.legal-hero p,
.legal-hero .effective-date {
  position: relative;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(229, 36, 42, 0.35);
  border-radius: 999px;
  background: rgba(229, 36, 42, 0.12);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 680px;
  color: #fff;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 900;
  line-height: 1.06;
}

.legal-hero p {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.legal-hero .effective-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Legal layout */

.legal-section,
.legal-page .legal-section {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + clamp(44px, 6vw, 76px)) var(--pad) clamp(56px, 7vw, 96px);
}

.legal-hero-outer + .legal-section,
.legal-page .legal-hero-outer + .legal-section {
  padding-top: clamp(42px, 6vw, 76px);
}

.legal-layout,
.legal-page .legal-layout {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 324px) minmax(0, 1fr);
  gap: clamp(42px, 5vw, 78px);
  align-items: start;
}

/* Table of contents */

.legal-toc,
.legal-page .legal-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow: auto;
  padding: 26px 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(16px);
}

.legal-toc h4,
.legal-toc h2,
.legal-page .legal-toc h4,
.legal-page .legal-toc h2 {
  margin: 0 0 18px;
  color: #858585;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.legal-toc ol,
.legal-page .legal-toc ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc li,
.legal-page .legal-toc li {
  counter-increment: toc;
}

.legal-toc a,
.legal-page .legal-toc a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px;
  align-items: baseline;
  color: #202833;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.18s ease;
}

.legal-toc a::before,
.legal-page .legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  line-height: inherit;
}

/* Prevent duplicate TOC numbers when the HTML already contains <span>01</span>. */
.legal-toc a > span:first-child,
.legal-page .legal-toc a > span:first-child {
  display: none;
}

.legal-toc a:hover,
.legal-page .legal-toc a:hover {
  color: var(--red);
}

/* Article content */

.legal-content,
.legal-articles,
.legal-page .legal-articles {
  min-width: 0;
  max-width: 1080px;
  color: var(--text);
  font-size: clamp(16px, 1.22vw, 20px);
  line-height: 1.75;
}

.legal-intro,
.legal-page .legal-intro,
.legal-articles > p:first-child {
  max-width: 900px;
  margin: 0 0 clamp(34px, 4vw, 52px);
  padding-bottom: clamp(30px, 3.6vw, 48px);
  border-bottom: 1px solid var(--line);
  color: #0d1b2a;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.62;
}

.legal-intro strong,
.legal-page .legal-intro strong,
.legal-articles > p:first-child strong {
  color: #000;
  font-weight: 900;
}

.legal-article,
.legal-page .legal-article {
  scroll-margin-top: calc(var(--nav-h) + 32px);
  margin-bottom: clamp(42px, 5vw, 68px);
  padding-bottom: clamp(42px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.legal-article:last-child,
.legal-page .legal-article:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.legal-article-head,
.legal-page .legal-article-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  margin-bottom: 20px;
}

.legal-article-num,
.legal-page .legal-article-num {
  color: var(--red);
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 900;
}

.legal-article h2,
.legal-page .legal-article h2,
.legal-articles h1,
.legal-articles h2,
.legal-articles h3,
.legal-articles .legal-db-heading,
.legal-page .legal-articles h1,
.legal-page .legal-articles h2,
.legal-page .legal-articles h3,
.legal-page .legal-articles .legal-db-heading {
  color: #050505;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.16;
}

.legal-articles h1,
.legal-articles h2,
.legal-articles h3,
.legal-articles .legal-db-heading,
.legal-page .legal-articles h1,
.legal-page .legal-articles h2,
.legal-page .legal-articles h3,
.legal-page .legal-articles .legal-db-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  margin: clamp(48px, 6vw, 72px) 0 20px;
  padding-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid var(--line);
}

.legal-articles h1:first-child,
.legal-articles h2:first-child,
.legal-articles h3:first-child,
.legal-articles .legal-db-heading:first-child,
.legal-page .legal-articles h1:first-child,
.legal-page .legal-articles h2:first-child,
.legal-page .legal-articles h3:first-child,
.legal-page .legal-articles .legal-db-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-articles .legal-db-heading::before,
.legal-page .legal-articles .legal-db-heading::before {
  content: attr(data-section-number);
  color: var(--red);
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 900;
}

.legal-article p,
.legal-page .legal-article p,
.legal-articles p,
.legal-page .legal-articles p {
  max-width: 1080px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 14px;
}

.legal-list,
.legal-page .legal-list,
.legal-articles ul,
.legal-articles ol,
.legal-page .legal-articles ul,
.legal-page .legal-articles ol {
  display: grid;
  gap: 14px;
  max-width: 1080px;
  margin: 20px 0 30px;
  padding-left: 26px;
}

.legal-list {
  list-style: none;
  padding-left: 0;
}

.legal-list li,
.legal-page .legal-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
}

.legal-articles li,
.legal-page .legal-articles li {
  font-size: 14px;
}

.legal-list li::before,
.legal-page .legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.legal-articles li::marker,
.legal-page .legal-articles li::marker {
  color: var(--red);
}

.legal-article strong,
.legal-page .legal-article strong,
.legal-articles strong,
.legal-articles b,
.legal-page .legal-articles strong,
.legal-page .legal-articles b {
  color: #050505;
  font-weight: 900;
}

.legal-note {
  max-width: 900px;
  margin-top: 12px;
  padding: 16px 20px;
  border-left: 4px solid var(--red);
  border-radius: 0 10px 10px 0;
  background: var(--soft);
  color: #4b5560;
  font-size: 15px;
  line-height: 1.65;
}

.legal-closing {
  max-width: 900px;
  margin-top: 12px;
  padding: 18px 22px;
  border: 1px solid #f5c3c5;
  border-radius: 12px;
  background: #fdebec;
  color: #111;
  font-weight: 800;
  line-height: 1.6;
}

/* Footer */

.footer {
  position: relative;
  z-index: 1;
  padding: 58px var(--pad) 26px;
  background: #f3f3f3;
  color: #222;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.9fr 1fr;
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
}

.footer-logo {
  width: 184px;
  margin-bottom: 20px;
}

.footer-desc {
  max-width: 240px;
  color: #555;
  font-size: 13px;
  line-height: 1.65;
}

.footer h4 {
  margin-bottom: 22px;
  color: #232323;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 18px;
  list-style: none;
}

.footer-links a {
  color: #222;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--red);
}

.mail-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 38px;
}

.mail-line svg {
  width: 14px;
  height: 14px;
}

.made {
  color: #555;
  font-size: 14px;
}

.made span {
  color: #ff7a00;
  font-weight: 900;
}

.footer-divider {
  height: 1px;
  margin: 62px 0 30px;
  background: #dedede;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
}

.footer-bottom-logo {
  width: 78px;
  margin-bottom: 10px;
}

.footer-copy {
  color: #555;
  font-size: 12px;
}

.footer-actions {
  justify-self: end;
  display: flex;
  gap: 12px;
}

.footer-btn {
  min-width: 78px;
  padding: 12px 20px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 0 #222;
}

.footer-btn.login {
  border: 2px solid #222;
  background: #fff;
  color: #222;
}

.footer-btn.try {
  border: 2px solid var(--red);
  background: var(--red);
  color: #fff;
}

@media (max-width: 1100px) {
  .legal-layout,
  .legal-page .legal-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 118px;
  }

  nav {
    flex-wrap: wrap;
    align-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-links {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: thin;
  }

  .legal-layout,
  .legal-page .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc,
  .legal-page .legal-toc {
    position: relative;
    top: auto;
    max-height: none;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .footer-actions {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 18px;
  }

  nav {
    gap: 12px;
  }

  .nav-links a {
    font-size: 14px;
  }

  .nav-login,
  nav a[href*="login" i]:last-child {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 14px;
  }

  .legal-section,
  .legal-page .legal-section {
    padding-top: calc(var(--nav-h) + 34px);
  }

  .legal-toc,
  .legal-page .legal-toc {
    padding: 22px 20px;
  }

  .legal-toc a,
  .legal-page .legal-toc a {
    font-size: 14px;
  }

  .legal-article-head,
  .legal-page .legal-article-head,
  .legal-articles h1,
  .legal-articles h2,
  .legal-articles h3,
  .legal-articles .legal-db-heading,
  .legal-page .legal-articles h1,
  .legal-page .legal-articles h2,
  .legal-page .legal-articles h3,
  .legal-page .legal-articles .legal-db-heading {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-actions {
    flex-wrap: wrap;
  }
}
