:root {
  --bg: #E8F1F2;
  --surface: rgba(255, 255, 255, 0.4);
  --surface-soft: rgba(255, 255, 255, 0.4);
  --flag-surface: rgba(255, 255, 255, 0.4);
  --text: #143039;
  --text-soft: #4d6570;
  --title: #0d242b;
  --green: #2cb67d;
  --green-light: #98e8c6;
  --blue-light: #89d9ff;
  --blue-strong: #2f7fb8;
  --lilac: #c8b5ff;
  --line: rgba(23, 51, 58, 0.14);
  --shadow-sm: 0 10px 24px rgba(20, 52, 61, 0.08);
  --shadow-md: 0 18px 42px rgba(20, 52, 61, 0.12);
  --radius-sm: 18px;
  --radius-md: 28px;
  --radius-lg: 36px;
  --max-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(47, 127, 184, 0.3);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-md);
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(224, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(23, 51, 58, 0.08);
}

.legal-topbar,
.legal-main,
.legal-footer {
  width: min(calc(100% - 1.2rem), var(--max-width));
  margin: 0 auto;
}

.legal-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.3rem;
  aspect-ratio: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 18px rgba(62, 136, 153, 0.18));
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand--footer .brand-mark {
  width: 3.45rem;
}

.legal-nav {
  order: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.22rem 0.08rem 0.42rem;
  margin: -0.22rem -0.08rem -0.16rem;
  scroll-padding-inline: 0.08rem;
  scrollbar-width: none;
}

.legal-nav::-webkit-scrollbar {
  display: none;
}

.legal-nav a,
.topbar-cta,
.action-link,
.submit-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  transition: transform 200ms ease, color 200ms ease, box-shadow 200ms ease,
    border-color 200ms ease;
}

.legal-nav a::before,
.topbar-cta::before,
.action-link::before,
.submit-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 200ms ease, transform 200ms ease;
}

.legal-nav a {
  flex: 0 0 auto;
  padding: 0.72rem 0.92rem;
  white-space: nowrap;
  background: rgba(0, 255, 255, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.6);
  color: #5c47b8;
  font-size: 0.94rem;
  font-weight: 700;
}

.legal-nav a::before {
  background: rgba(0, 255, 255, 0.6);
}

.legal-nav a:hover,
.legal-nav a:focus-visible,
.legal-nav a.is-current {
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  border-color: rgba(0, 255, 255, 0.6);
  transform: translate3d(0, -1px, 0);
}

.legal-nav a:hover::before,
.legal-nav a:focus-visible::before,
.legal-nav a.is-current::before {
  opacity: 1;
  transform: scale(1);
}

.topbar-cta,
.action-link,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.topbar-cta {
  background: rgba(0, 255, 255, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.6);
  color: #ffffff;
}

.topbar-cta::before {
  opacity: 1;
  transform: scale(1);
  background: rgba(0, 255, 255, 0.6);
}

.action-link,
.submit-button {
  background: linear-gradient(135deg, rgba(44, 182, 125, 0.18), rgba(137, 217, 255, 0.28));
  border: 1px solid rgba(44, 182, 125, 0.18);
}

.submit-button {
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--title);
}

.topbar-cta:hover,
.topbar-cta:focus-visible,
.action-link:hover,
.action-link:focus-visible,
.submit-button:hover,
.submit-button:focus-visible {
  transform: translate3d(0, -2px, 0);
  box-shadow: var(--shadow-md);
}

.topbar-cta:hover::before,
.topbar-cta:focus-visible::before {
  transform: scale(1.02);
}

.legal-main {
  padding: 3rem 0 4rem;
}

.legal-hero,
.notice-card,
.legal-card,
.contact-card,
.form-card,
.mini-card {
  background: rgba(0, 255, 255, 0.4);
  border: 1px solid rgba(23, 51, 58, 0.1);
  box-shadow: 0 18px 42px rgba(20, 52, 61, 0.3);
}

.legal-hero,
.notice-card,
.legal-card,
.contact-card,
.form-card,
.mini-card {
  border-radius: var(--radius-lg);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.25rem;
}

.legal-hero::before,
.legal-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.legal-hero::before {
  width: 16rem;
  height: 16rem;
  top: -5rem;
  right: -4rem;
  background: radial-gradient(circle, rgba(137, 217, 255, 0.38), rgba(137, 217, 255, 0));
}

.legal-hero::after {
  width: 15rem;
  height: 15rem;
  bottom: -5rem;
  left: -4rem;
  background: radial-gradient(circle, rgba(200, 181, 255, 0.34), rgba(200, 181, 255, 0));
}

.legal-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 1rem;
  padding: 0.62rem 0.92rem;
  border-radius: 999px;
  background: var(--flag-surface);
  border: 1px solid rgba(23, 51, 58, 0.1);
  color: var(--blue-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--title);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 0.98;
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.02;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.15;
}

.legal-hero p,
.notice-card p,
.legal-card p,
.legal-card li,
.contact-card p,
.mini-card p,
.form-card p,
.legal-footer p,
.legal-footer a,
label,
input,
textarea {
  color: var(--text-soft);
  font-size: clamp(1.01rem, 0.2vw + 0.97rem, 1.06rem);
  line-height: 1.7;
  font-weight: 500;
}

.hero-copy {
  margin-top: 1.2rem;
  max-width: 44rem;
}

.legal-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.legal-meta span,
.data-pill {
  display: inline-flex;
  width: fit-content;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: var(--flag-surface);
  border: 1px solid rgba(23, 51, 58, 0.1);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.page-stack {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.notice-card,
.legal-card,
.contact-card,
.form-card,
.mini-card {
  padding: 1.35rem;
}

.notice-card strong,
.legal-card strong,
.contact-card strong,
.mini-card strong {
  color: var(--title);
}

.info-grid,
.content-grid,
.contact-grid,
.mini-grid {
  display: grid;
  gap: 1rem;
}

.info-grid {
  margin-top: 1rem;
}

.info-item {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(250, 252, 253, 0.4);
  border: 1px solid rgba(23, 51, 58, 0.08);
}

.info-item span {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue-strong);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.info-item strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
}

.legal-card h2,
.contact-card h2,
.form-card h2,
.mini-card h3 {
  margin-bottom: 0.9rem;
}

.legal-card ul,
.legal-card ol {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.legal-card li + li {
  margin-top: 0.45rem;
}

.inline-link {
  color: var(--blue-strong);
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.contact-grid,
.mini-grid {
  margin-top: 1rem;
}

.contact-card a,
.mini-card a {
  color: var(--blue-strong);
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

.form-card form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 800;
  color: var(--text);
}

input,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(23, 51, 58, 0.12);
  background: #ffffff;
  font: inherit;
  color: var(--text);
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-note {
  margin: 0;
}

.legal-footer {
  padding: 0 0 3rem;
}

.footer-shell {
  display: grid;
  gap: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(23, 51, 58, 0.08);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--title);
}

.footer-copy {
  margin: 0;
}

@media (min-width: 780px) {
  .legal-topbar,
  .legal-main,
  .legal-footer {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .legal-main {
    padding: 4rem 0 4.5rem;
  }

  .legal-hero {
    padding: 2.4rem;
  }

  .info-grid,
  .contact-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid > .legal-card--full,
  .content-grid > .mini-card--full,
  .mini-grid > .mini-card--full {
    grid-column: 1 / -1;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .field--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 980px) {
  .legal-topbar {
    flex-wrap: nowrap;
    gap: 1.2rem;
    padding: 1rem 0;
  }

  .legal-nav {
    order: 0;
    width: auto;
    align-items: stretch;
    overflow: visible;
    flex: 1;
    justify-content: center;
    padding: 0;
    margin: 0;
    scroll-padding-inline: 0;
  }

  .info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body,
body *,
body *::before,
body *::after {
  color: #363636 !important;
}
