:root {
  color-scheme: light;
  --bg: #f2f6f8;
  --surface: #ffffff;
  --surface-2: #e8f1f5;
  --text: #14232d;
  --muted: #58707d;
  --border: #bed0d9;
  --accent: #087f8c;
  --accent-strong: #075d68;
  --blue: #2b6cb0;
  --amber: #a35b00;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081116;
  --surface: #0f1b22;
  --surface-2: #14252e;
  --text: #edf6f8;
  --muted: #9bb0ba;
  --border: #2b414c;
  --accent: #61d1d8;
  --accent-strong: #8ee8ec;
  --blue: #75b7ff;
  --amber: #f0b765;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 35rem),
    radial-gradient(circle at 94% 8%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

.page-sky-band {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: clamp(330px, 34vw, 440px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 17, 0.1) 0%, rgba(2, 8, 17, 0.3) 56%, var(--bg) 100%),
    linear-gradient(90deg, rgba(2, 9, 18, 0.2), transparent 48%, rgba(4, 7, 20, 0.16)),
    url("/launch/silken/docs/assets/hips-starry-header.webp") center 43% / cover no-repeat;
}

a { color: var(--accent-strong); }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 8px clamp(12px, 2vw, 28px) 8px max(7px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(129, 211, 232, 0.28);
  background: rgba(3, 11, 20, 0.64);
  box-shadow: 0 8px 28px rgba(0, 8, 18, 0.24);
  -webkit-backdrop-filter: blur(14px) saturate(1.16);
  backdrop-filter: blur(12px) saturate(1.14);
}

.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f4fbff;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.candiapl-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.52));
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(transparent, rgba(181, 230, 241, 0.48), transparent);
}

.doc-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(157, 225, 238, 0.42);
  border-radius: 11px;
  background: rgba(8, 29, 43, 0.68);
  color: #8ee8ec;
}

.doc-brand-mark svg { width: 21px; height: 21px; }

.doc-brand small {
  display: block;
  margin-top: -3px;
  color: rgba(220, 241, 247, 0.68);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(178, 224, 236, 0.25);
  border-radius: 10px;
  background: rgba(4, 14, 24, 0.68);
}

.theme-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(230, 246, 250, 0.7);
  cursor: pointer;
}

.theme-button.active {
  background: rgba(91, 210, 220, 0.2);
  color: #b7f4f6;
}

.theme-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(178, 224, 236, 0.25);
  border-radius: 10px;
  background: rgba(4, 14, 24, 0.68);
  color: #edf9fc;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.header-link:hover,
.header-link:focus-visible {
  border-color: #75dce2;
  color: #b7f4f6;
}

.legal-main {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 52px);
}

.legal-hero {
  position: relative;
  padding: clamp(66px, 10vw, 116px) 0 clamp(38px, 7vw, 68px);
}

.legal-hero::after {
  position: absolute;
  z-index: -1;
  top: 42px;
  right: 0;
  width: min(58vw, 540px);
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  content: "";
  filter: blur(20px);
  animation: legal-aurora 12s ease-in-out infinite;
}

.legal-eyebrow {
  margin: 0 0 12px;
  color: #a9eef1;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  background: linear-gradient(115deg, #f7fcff 8%, #9de7ee 54%, #91bff2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-hero p:last-child {
  max-width: 720px;
  margin: 24px 0 0;
  color: #c6d9e2;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
}

.legal-body {
  counter-reset: legal-section;
}

.legal-section {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 74px);
  padding: clamp(30px, 5vw, 48px) 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  letter-spacing: -0.02em;
}

.legal-section h2::before {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  content: counter(legal-section, decimal-leading-zero);
  counter-increment: legal-section;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.legal-section p,
.legal-section ul {
  margin: 0;
  color: var(--muted);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
  margin-top: 13px;
}

.legal-section ul { padding-left: 19px; }
.legal-section li + li { margin-top: 7px; }

@keyframes legal-aurora {
  0%, 100% { opacity: 0.62; transform: translate3d(0, 0, 0) scale(0.96); }
  50% { opacity: 1; transform: translate3d(-18px, 10px, 0) scale(1.06); }
}

@media (max-width: 700px) {
  .site-header { gap: 8px; padding-inline: 8px; }
  .doc-brand { gap: 6px; }
  .doc-brand > span:last-child { display: none; }
  .candiapl-logo { width: 40px; height: 40px; }
  .header-actions { gap: 5px; }
  .theme-button { width: 30px; }
  .header-link { min-width: 34px; padding-inline: 9px; justify-content: center; }
  .legal-section { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero::after { animation: none; }
}

@media print {
  .page-sky-band, .site-header, .site-footer { display: none !important; }
  body { background: #fff; color: #111; }
  .legal-hero h1 { color: #111; }
}
