/* BitFire legal document pages. Typography uses enterprise-base.css utilities. */

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 126px 0 92px;
  background:
    radial-gradient(circle at 84% 16%, rgba(33, 139, 201, 0.18), transparent 29%),
    linear-gradient(180deg, #071322 0%, #0a1a2b 100%);
}

.legal-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.14;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.legal-hero .container { position: relative; z-index: 1; }

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 60px;
  color: #8199aa;
  font-weight: 650;
}

.legal-breadcrumbs a:hover { color: var(--white); }
.legal-breadcrumbs span[aria-current] { color: #bad0df; }

.legal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 84px;
  align-items: end;
}

.legal-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 21px;
  color: #a9c1d0;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legal-kicker::before {
  width: 25px;
  height: 2px;
  content: "";
  background: var(--mint);
  box-shadow: 0 0 12px rgba(91, 173, 218, 0.65);
}

.legal-hero h1 {
  max-width: 870px;
  margin-bottom: 27px;
  font-weight: 800;
  letter-spacing: -0.066em;
  line-height: 0.94;
}

.legal-lede {
  max-width: 740px;
  margin-bottom: 30px;
  color: var(--text-soft);
  line-height: 1.62;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: #8ba1af;
}

.legal-meta span { display: flex; gap: 7px; }
.legal-meta strong { color: #c2d3dd; }

.legal-scope {
  padding: 29px;
  border: 1px solid rgba(91, 173, 218, 0.22);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.legal-scope > .icon { width: 26px; margin-bottom: 25px; color: var(--mint); }
.legal-scope > span { display: block; margin-bottom: 9px; color: var(--mint); font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.legal-scope h2 { margin-bottom: 12px; line-height: 1.2; }
.legal-scope p { margin: 0; color: #9eb2c0; }

.privacy-summary {
  padding: 88px 0 96px;
  color: var(--text-dark);
  background: var(--paper);
}

.privacy-summary-heading {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 39px;
}

.privacy-summary-heading .section-kicker { margin: 0 0 8px; }
.privacy-summary-heading h2 { max-width: 760px; margin: 0; font-weight: 790; letter-spacing: -0.05em; line-height: 1.04; }

.privacy-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #d4e0e7;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(7, 19, 34, 0.07);
}

.privacy-principles article { min-height: 290px; padding: 28px; border-right: 1px solid #dfe7ec; }
.privacy-principles article:last-child { border-right: 0; }
.principle-icon { display: grid; width: 44px; height: 44px; margin-bottom: 39px; place-items: center; border-radius: 13px; color: #167eaf; background: #e8f4f9; }
.principle-icon .icon { width: 21px; }
.privacy-principles small { display: block; margin-bottom: 9px; color: #1884bd; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.privacy-principles h3 { margin-bottom: 11px; color: #173247; line-height: 1.2; }
.privacy-principles p { margin: 0; color: #667986; }

.legal-document {
  padding: 104px 0 122px;
  color: var(--text-dark);
  background: #fff;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 770px);
  gap: 86px;
  justify-content: center;
  align-items: start;
}

.legal-toc { position: relative; }
.toc-inner { position: sticky; top: calc(var(--nav-height) + 28px); }
.toc-inner > strong { display: block; margin-bottom: 15px; color: #738692; letter-spacing: 0.11em; text-transform: uppercase; }
.toc-inner nav { display: grid; border-left: 1px solid #dbe4e9; }
.toc-inner nav a { padding: 6px 0 6px 17px; color: #617685; font-weight: 650; transition: color 150ms ease, border-color 150ms ease; }
.toc-inner nav a:hover { color: #1478ab; }
.toc-contact { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding: 12px 14px; border: 1px solid #cee0e9; border-radius: 11px; color: #126b99; background: #edf7fb; font-weight: 750; }
.toc-contact .icon { width: 16px; }

.policy-section {
  padding: 0 0 71px;
  margin-bottom: 70px;
  border-bottom: 1px solid #dfe7ec;
  scroll-margin-top: calc(var(--nav-height) + 32px);
}

.policy-section-number { margin-bottom: 14px; color: #1985bd; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.policy-section h2 { margin-bottom: 25px; color: #102b3f; font-weight: 790; letter-spacing: -0.035em; line-height: 1.08; }
.policy-section > p { margin-bottom: 18px; color: #4e6575; line-height: 1.82; }
.policy-section > p:last-child { margin-bottom: 0; }

.policy-callout {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 16px;
  margin-top: 30px;
  padding: 25px;
  border: 1px solid #bcdbe8;
  border-radius: 16px;
  color: #1a4258;
  background: #edf7fb;
}

.policy-callout > .icon { width: 24px; margin-top: 2px; color: #1985bd; }
.policy-callout p { margin: 0; }

.policy-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 18px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.policy-list li { position: relative; padding: 11px 14px 11px 37px; border: 1px solid #dce6eb; border-radius: 10px; color: #425c6c; background: #fafcfd; }
.policy-list li::before { position: absolute; top: 11px; left: 14px; content: "✓"; color: #1985bd; font-weight: 900; }

.retention-highlight {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 330px;
  margin: 0 0 27px;
  padding: 18px 22px;
  border: 1px solid #c9dfe9;
  border-radius: 15px;
  color: #173c52;
  background: #edf7fb;
}

.retention-highlight > span { color: #1688bd; font-weight: 850; line-height: 1; }
.retention-highlight strong { display: block; line-height: 1.1; }
.retention-highlight p { margin: 3px 0 0; color: #607786; }

.aggregate-retention,
.purge-request {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 15px;
  margin-top: 27px;
  padding: 22px 24px;
  border: 1px solid #c9dfe9;
  border-radius: 14px;
  color: #234c61;
  background: #edf7fb;
}

.aggregate-retention > .icon,
.purge-request > .icon { width: 22px; margin-top: 2px; color: #1985bd; }
.aggregate-retention strong,
.purge-request strong { display: block; margin-bottom: 5px; }
.aggregate-retention p,
.purge-request p { margin: 0; color: #587181; line-height: 1.7; }
.purge-request a { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: #126f9e; font-weight: 800; }
.purge-request a .icon { width: 16px; transition: transform 160ms ease; }
.purge-request a:hover .icon { transform: translateX(3px); }

.data-locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 22px 0 27px;
}

.data-locations span {
  position: relative;
  padding: 15px 15px 15px 38px;
  border: 1px solid #d7e4ea;
  border-radius: 11px;
  color: #294d61;
  background: #f7fafc;
  font-weight: 750;
}

.data-locations span::before { position: absolute; left: 16px; content: "●"; color: #1985bd; }

.data-flow {
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: 28px;
}

.data-flow span { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 10px; border: 1px solid #d7e4ea; border-radius: 12px; color: #294d61; background: #f7fafc; font-weight: 750; text-align: center; }
.data-flow span .icon { width: 19px; flex: 0 0 auto; color: #1985bd; }
.data-flow i { display: grid; place-items: center; color: #8ba0ac; font-style: normal; }

.policy-note { margin-top: 27px; padding: 22px 24px; border-left: 4px solid #db9e3e; border-radius: 0 13px 13px 0; background: #fff8e9; }
.policy-note strong { display: block; margin-bottom: 5px; color: #674b22; }
.policy-note p { margin: 0; color: #796441; line-height: 1.7; }

.policy-commitments { display: grid; gap: 10px; margin: 0 0 26px; }
.policy-commitments p { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin: 0; padding: 17px 19px; border: 1px solid #c9e2d5; border-radius: 12px; color: #245640; background: #f0faf5; }
.policy-commitments .icon { width: 20px; margin-top: 2px; color: #23815a; }

.policy-contact { padding: 0; margin-bottom: 40px; border-bottom: 0; }
.privacy-contact-card { display: flex; align-items: center; gap: 15px; max-width: 390px; margin: 24px 0 20px; padding: 18px; border: 1px solid #d6e3e9; border-radius: 14px; background: #f9fbfc; }
.privacy-contact-card > span { display: grid; width: 41px; height: 41px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #1685b9; background: #e8f4f9; }
.privacy-contact-card .icon { width: 20px; }
.privacy-contact-card small { display: block; margin-bottom: 5px; color: #657b89; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.privacy-contact-card img { width: auto; height: 26px; }
.policy-contact .button { width: fit-content; }
.policy-version { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid #dfe7ec; color: #7a8d98; }

@media (max-width: 980px) {
  .legal-hero-grid { gap: 48px; }
  .legal-layout { grid-template-columns: 215px minmax(0, 1fr); gap: 52px; }
}

@media (max-width: 820px) {
  .legal-hero { padding: 110px 0 80px; }
  .legal-breadcrumbs { margin-bottom: 43px; }
  .legal-hero-grid { grid-template-columns: 1fr; }
  .legal-scope { max-width: 620px; }
  .privacy-summary { padding: 76px 0 82px; }
  .privacy-summary-heading { grid-template-columns: 1fr; gap: 12px; }
  .privacy-principles { grid-template-columns: 1fr; }
  .privacy-principles article { min-height: 0; border-right: 0; border-bottom: 1px solid #dfe7ec; }
  .privacy-principles article:last-child { border-bottom: 0; }
  .principle-icon { margin-bottom: 25px; }
  .legal-document { padding: 82px 0 100px; }
  .legal-layout { grid-template-columns: 1fr; gap: 50px; }
  .toc-inner { position: static; padding: 22px; border: 1px solid #d8e3e9; border-radius: 15px; background: #f8fbfc; }
  .toc-inner nav { grid-template-columns: repeat(2, 1fr); gap: 0 15px; }
  .toc-contact { max-width: 260px; }
}

@media (max-width: 560px) {
  .legal-hero { padding: 96px 0 68px; }
  .legal-breadcrumbs { margin-bottom: 34px; }
  .legal-scope { padding: 24px; }
  .legal-meta { display: grid; gap: 7px; }
  .privacy-summary { padding: 65px 0 72px; }
  .privacy-principles article { padding: 24px; }
  .toc-inner nav { grid-template-columns: 1fr; }
  .policy-section { padding-bottom: 53px; margin-bottom: 52px; }
  .policy-list { grid-template-columns: 1fr; }
  .policy-callout,
  .aggregate-retention,
  .purge-request { grid-template-columns: 1fr; }
  .data-locations { grid-template-columns: 1fr; }
  .data-flow { display: grid; }
  .data-flow i { min-height: 16px; transform: rotate(90deg); }
  .policy-version { display: grid; }
}

@media print {
  .site-header,
  .site-footer,
  .mobile-cta,
  .legal-toc,
  .privacy-summary,
  .legal-scope { display: none !important; }
  .legal-hero { padding: 20px 0 35px; color: #000; background: #fff; }
  .legal-hero::before { display: none; }
  .legal-breadcrumbs,
  .legal-kicker { display: none; }
  .legal-hero-grid,
  .legal-layout { display: block; }
  .legal-hero h1,
  .legal-lede,
  .legal-meta,
  .legal-meta strong { color: #000; }
  .legal-document { padding: 20px 0; }
  .policy-section { break-inside: avoid; }
}
