:root {
  --text: #18232d;
  --muted: #5c6671;
  --accent: #ef6f3c;
  --accent-deep: #d95a26;
  --surface: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 70px rgba(24, 35, 45, 0.12);
  --radius-xl: 30px;
  --container: min(1040px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(90deg, #d6dbe0 0%, #eceff2 35%, #fff 100%);
  font-family: "Manrope", sans-serif;
}

.legal-header {
  padding: 22px 40px;
  background: #0f2536;
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-header img {
  display: block;
  width: 100px;
  height: auto;
}

.legal-lang-switcher {
  position: relative;
}

.legal-lang-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.legal-lang-switcher summary::-webkit-details-marker {
  display: none;
}

.legal-lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 10;
  display: none;
  min-width: 116px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(10, 18, 25, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.legal-lang-switcher[open] .legal-lang-menu {
  display: grid;
  gap: 6px;
}

.legal-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.legal-lang-option:hover,
.legal-lang-option:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.legal-header .legal-lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.legal-main {
  width: var(--container);
  margin: 0 auto;
  padding: 56px 0 28px;
}

.legal-hero,
.legal-document {
  border: 1px solid rgba(24, 35, 45, 0.08);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-hero {
  padding: 30px;
}

.legal-eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-main h1,
.legal-main h2 {
  font-family: "Sora", sans-serif;
}

.legal-main h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.legal-lead {
  max-width: 72ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.legal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.legal-button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8b52);
}

.legal-button-secondary {
  border: 1px solid rgba(24, 35, 45, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.legal-document {
  margin-top: 20px;
  padding: 30px;
}

.legal-document h2 {
  margin: 34px 0 12px;
  color: #23455f;
  font-size: 1.3rem;
  line-height: 1.25;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document p,
.legal-document li,
.legal-table {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

.legal-document p {
  margin: 9px 0;
}

.legal-clause {
  padding-left: 12px;
  border-left: 2px solid rgba(239, 111, 60, 0.22);
}

.legal-document a {
  color: var(--accent-deep);
  font-weight: 700;
}

.legal-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 12px;
  border: 1px solid rgba(24, 35, 45, 0.1);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: rgba(35, 69, 95, 0.09);
}

.site-footer {
  margin-top: 28px;
}

@media (max-width: 560px) {
  :root {
    --container: min(1040px, calc(100vw - 28px));
  }

  .legal-header {
    padding: 18px 20px;
  }

  .legal-main {
    padding-top: 28px;
  }

  .legal-hero,
  .legal-document {
    padding: 20px;
    border-radius: 22px;
  }

  .legal-button {
    width: 100%;
  }

  .legal-document p,
  .legal-document li,
  .legal-table {
    font-size: 0.9rem;
  }
}

/* Header matches the main LARISA navigation bar. */
.legal-header { padding: 18px 40px; background: rgba(15, 37, 54, 0.94); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 44px rgba(4, 12, 20, 0.22); backdrop-filter: blur(14px); }
.legal-header-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1vw, 18px);
  margin-left: auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.98rem, 0.94vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.005em;
}

.legal-header-nav a { color: inherit; text-decoration: none; }
.legal-header-nav a:hover, .legal-header-nav a:focus-visible { color: #fff; }

@media (max-width: 920px) { .legal-header-nav { display: none; } }
/* More prominent navigation with a 70% translucent header. */
.legal-header { background: rgba(15, 37, 54, 0.70); }
.legal-header-nav { font-size: clamp(1.08rem, 1.08vw, 1.24rem); }
/* Stronger navigation and a soft transition from the translucent header to page content. */
.legal-header { background: rgba(15, 37, 54, 0.70); position: relative; isolation: isolate; }
.legal-header > * { position: relative; z-index: 1; }
.legal-header::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: -30px; height: 44px; pointer-events: none; background: linear-gradient(180deg, rgba(15, 37, 54, 0.42), transparent); filter: blur(14px); }
.legal-header-nav { font-size: clamp(1.16rem, 1.18vw, 1.36rem); }
.legal-header .legal-lang-flag { width: 24px; height: 16px; }
/* Large desktop navigation and language flags. */
.legal-header-nav { font-size: clamp(1.28rem, 1.32vw, 1.5rem); }
.legal-header .legal-lang-flag { width: 28px; height: 19px; }
/* Softer header-to-hero transition across LARISA pages. */
.topbar,
.ramp-header,
.mirror-header,
.equip-header,
.legal-header,
.eu-header {
  border-bottom-color: transparent !important;
  background: linear-gradient(
    180deg,
    rgba(15, 37, 54, 0.74) 0%,
    rgba(15, 37, 54, 0.66) 52%,
    rgba(15, 37, 54, 0.44) 78%,
    rgba(15, 37, 54, 0.08) 100%
  ) !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px) saturate(118%);
}

.topbar::after,
.ramp-header::after,
.mirror-header::after,
.equip-header::after,
.legal-header::after,
.eu-header::after {
  bottom: -48px !important;
  height: 72px !important;
  background: linear-gradient(180deg, rgba(15, 37, 54, 0.3), rgba(15, 37, 54, 0.1) 42%, transparent) !important;
  filter: blur(20px) !important;
}

/* Seamless extended header fade into hero. */
.topbar,
.ramp-header,
.mirror-header,
.equip-header,
.legal-header,
.eu-header {
  border-bottom: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(15, 37, 54, 0.76) 0%,
    rgba(15, 37, 54, 0.7) 54%,
    rgba(15, 37, 54, 0.5) 100%
  ) !important;
  box-shadow: none !important;
  backdrop-filter: blur(22px) saturate(120%);
}

.topbar::after,
.ramp-header::after,
.mirror-header::after,
.equip-header::after,
.legal-header::after,
.eu-header::after {
  top: 100% !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  height: 104px !important;
  background: linear-gradient(
    180deg,
    rgba(15, 37, 54, 0.5) 0%,
    rgba(15, 37, 54, 0.34) 24%,
    rgba(15, 37, 54, 0.16) 54%,
    rgba(15, 37, 54, 0.045) 78%,
    transparent 100%
  ) !important;
  filter: none !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
