/* ==========================================================================
   DNKS Solutions — legal pages (privacy policy, terms of service)
   ========================================================================== */

/* Page banner */
.legal-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(56px, 7vw, 96px) clamp(44px, 5vw, 72px);
  background:
    radial-gradient(60% 80% at 18% 20%, rgba(0, 184, 230, .18), transparent 70%),
    radial-gradient(70% 90% at 85% 90%, rgba(11, 111, 211, .38), transparent 70%),
    var(--navy);
  color: #fff;
}
.legal-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 90% at 30% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 30% 40%, #000, transparent 75%);
}
.legal-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -.04em;
}
.legal-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .04em; color: rgba(214, 229, 255, .7);
}
.legal-meta span { display: inline-flex; align-items: center; gap: 8px; }
.legal-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }

/* Two-column body: contents + document */
.legal-layout {
  display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px);
  padding-block: clamp(48px, 6vw, 88px) clamp(64px, 8vw, 120px);
  align-items: start;
}
.legal-toc { position: sticky; top: calc(var(--header) + 28px); }
.toc-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--blue);
  cursor: pointer; list-style: none;
}
.toc-title::-webkit-details-marker { display: none; }
/* Chevron shown only where the list collapses (mobile) */
.toc-title::after {
  content: ""; display: none; width: 8px; height: 8px; margin-bottom: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
.toc-box[open] .toc-title::after { transform: rotate(-135deg); margin-bottom: -3px; }
.legal-toc ol { counter-reset: toc; }
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex; gap: 10px; padding: 7px 0;
  font-size: 14.5px; line-height: 1.4; color: var(--muted); text-decoration: none;
  transition: color .25s;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--f-mono); font-size: 11.5px; color: #A9B6CA; padding-top: 2px;
  transition: color .25s;
}
.legal-toc a:hover, .legal-toc a.is-current { color: var(--ink); }
.legal-toc a:hover::before, .legal-toc a.is-current::before { color: var(--cyan); }

.legal-body { max-width: 78ch; }
.legal-intro { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.65; color: var(--ink-2); }
.legal-body section { scroll-margin-top: calc(var(--header) + 24px); }
.legal-body h2 {
  margin: 44px 0 14px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: clamp(21px, 2.1vw, 28px); line-height: 1.25; letter-spacing: -.03em;
}
.legal-body h3 { margin: 26px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.legal-body p { margin-bottom: 14px; font-size: 16.5px; line-height: 1.75; color: var(--muted); }
.legal-body ul { margin: 0 0 16px; }
.legal-body li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.legal-body li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.legal-body a:not(.btn) { color: var(--blue); text-underline-offset: 3px; }
.legal-body strong { color: var(--ink-2); font-weight: 600; }

/* Contact card closing each document */
.legal-contact {
  margin-top: 40px; padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: 20px; background: var(--bg);
}
.legal-contact h2 { margin: 0 0 8px; padding: 0; border: 0; }
.legal-contact ul { margin: 18px 0 0; }
.legal-contact li { display: flex; align-items: flex-start; gap: 12px; padding-left: 0; font-size: 16px; color: var(--ink-2); }
.legal-contact li::before { display: none; }
.legal-contact .ic { width: 18px; height: 18px; margin-top: 4px; color: var(--blue); flex: none; }
.legal-contact address { font-style: normal; line-height: 1.7; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-toc { position: static; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
  .toc-title { border-bottom-color: #DCE4EF; }
  .legal-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .toc-title { margin-bottom: 0; }
  .toc-box:not([open]) .toc-title { padding-bottom: 0; border-bottom-color: transparent; }
  .toc-box[open] .toc-title { margin-bottom: 14px; }
  .toc-title::after { display: block; }
}
@media (max-width: 620px) {
  .legal-toc ol { grid-template-columns: minmax(0, 1fr); }
  .legal-toc a { padding: 9px 0; }
}
