:root {
  --bg-deep: #f7fbff;
  --bg-base: #eef5ff;
  --card: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1f2f;
  --text-secondary: #4d5b74;
  --text-muted: #7f8ca4;
  --blue-primary: #0077e6;
  --blue-secondary: #0058cc;
  --blue-accent: #003d99;
  --border: rgba(0, 105, 210, 0.14);
  --shadow: 0 18px 44px rgba(0, 62, 140, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
  background:
    radial-gradient(circle at top right, rgba(0, 119, 230, 0.08), transparent 34%),
    radial-gradient(circle at bottom left, rgba(0, 119, 230, 0.05), transparent 38%),
    linear-gradient(180deg, #f6faff 0%, var(--bg-deep) 45%, var(--bg-base) 100%);
}

body.legal-menu-open {
  overflow: hidden;
}

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

.wrap {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.legal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.legal-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 105, 210, 0.2);
  box-shadow: 0 8px 24px rgba(0, 62, 140, 0.08);
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 18px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.94rem;
  letter-spacing: 0.07em;
}

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

.legal-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0;
}

.legal-nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--text-primary);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.legal-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.legal-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.legal-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.legal-nav-menu,
.legal-nav-panel {
  display: flex;
  align-items: center;
}

.legal-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-nav-backdrop {
  display: none;
}

.legal-nav-panel {
  gap: 0;
}

.legal-nav-link {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  color: var(--text-secondary);
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition:
    color 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease;
}

.legal-nav-link:hover,
.legal-nav-link.active {
  color: var(--blue-primary);
  border-color: rgba(0, 119, 230, 0.2);
  background: rgba(0, 119, 230, 0.06);
}

main {
  padding: 110px 0 64px;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(237, 246, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 48px);
  margin-bottom: 24px;
}

.legal-hero::before,
.legal-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.legal-hero::before {
  width: 300px;
  height: 300px;
  top: -180px;
  right: -80px;
  background: radial-gradient(circle, rgba(0, 119, 230, 0.18) 0%, transparent 66%);
}

.legal-hero::after {
  width: 280px;
  height: 280px;
  bottom: -180px;
  left: -100px;
  background: radial-gradient(circle, rgba(0, 119, 230, 0.14) 0%, transparent 66%);
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.62rem;
  color: var(--blue-primary);
}

.legal-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-primary);
  box-shadow: 0 0 10px rgba(0, 119, 230, 0.45);
}

.legal-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.1vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.legal-hero p {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.company-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-chip {
  border-radius: 999px;
  border: 1px solid rgba(0, 119, 230, 0.2);
  background: rgba(0, 119, 230, 0.06);
  color: #12498d;
  font-family: var(--font-display);
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.legal-link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(0, 60, 120, 0.07);
  padding: 18px;
  color: var(--text-primary);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.legal-link:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 119, 230, 0.28);
  box-shadow: 0 16px 34px rgba(0, 62, 140, 0.1);
}

.legal-link strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.legal-link span {
  color: var(--text-secondary);
  display: block;
}

.doc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.9vw, 34px);
}

.doc + .doc {
  margin-top: 16px;
}

.doc h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.4vw, 1.5rem);
}

.doc h3 {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1d4d90;
}

.doc p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 1rem;
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-secondary);
}

.doc li + li {
  margin-top: 4px;
}

.doc a[href^="mailto:"] {
  color: var(--blue-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc a[href^="mailto:"]:hover,
.doc a[href^="mailto:"]:focus-visible {
  color: var(--blue-accent);
}

.policy-intro {
  margin-bottom: 8px;
}

.footer {
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0 36px;
  font-size: 0.88rem;
}

.footer p {
  margin: 0;
}

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

@media (max-width: 768px) {
  .legal-header {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: rgba(0, 105, 210, 0.12);
  }

  body.legal-menu-open .legal-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(0, 105, 210, 0.2);
    box-shadow: 0 6px 22px rgba(0, 80, 180, 0.08);
  }

  .legal-nav-inner {
    min-height: 66px;
  }

  .legal-nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 240;
    touch-action: manipulation;
  }

  .legal-nav-menu {
    position: fixed;
    inset: 0;
    justify-content: flex-end;
    z-index: 220;
    opacity: 0;
    pointer-events: none;
    height: 100dvh;
    transition: opacity 0.35s ease;
  }

  .legal-nav-menu.open {
    opacity: 1;
    pointer-events: auto;
  }

  .legal-nav-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(7, 16, 29, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .legal-nav-panel {
    position: relative;
    z-index: 2;
    margin-left: auto;
    width: min(86vw, 360px);
    min-height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    padding: calc(88px + env(safe-area-inset-top, 0px)) 18px 32px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(240, 246, 255, 0.99) 100%);
    box-shadow: -14px 0 32px rgba(6, 37, 82, 0.14);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .legal-nav-menu.open .legal-nav-panel {
    transform: translateX(0);
  }

  .legal-nav-links {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
  }

  .legal-nav-link {
    width: 100%;
    padding: 18px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(0, 119, 230, 0.04);
    font-size: 0.92rem;
  }

  .legal-nav-link:hover,
  .legal-nav-link.active {
    border-color: rgba(0, 119, 230, 0.14);
    background: rgba(0, 119, 230, 0.08);
  }

  .legal-hero {
    margin-top: 6px;
  }
}
