/* Crestline Growth legal pages (Privacy Policy, Terms of Service).
   Same palette and type as index.html: white and soft blue-grey, black type, royal-blue accent. */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-soft: #F6F7FB;
  --line: #E4E6F0;
  --line-2: #D3D6E4;
  --ink: #000000;
  --ink-2: #4A4D5A;
  --ink-3: #6A6E7C;
  --accent: #0000FF;
  --accent-deep: #0000A0;
  --accent-wash: #F0F1FE;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1292px;
  --gutter: clamp(16px, 3.6vw, 46px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-hover: 180ms;
  --t-ui: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, address { margin: 0; }
::selection { background: var(--accent); color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -48px; z-index: 60; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #FFFFFF; font-weight: 600; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 12px 26px; border-radius: 10px; font: 600 14px/1 var(--font); white-space: nowrap; transition: background-color var(--t-hover) ease; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-deep); } }

/* Header */
.nav { position: sticky; top: 0; z-index: 50; height: 72px; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; color: var(--accent-deep); }
.logo svg { width: 104px; height: auto; }
.nav-links { display: flex; gap: 30px; font-size: 14px; color: #1A1A1F; }
.nav-links a { padding: 8px 0; transition: color var(--t-hover) ease; }
@media (hover: hover) { .nav-links a:hover { color: var(--accent); } }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); align-items: center; justify-content: center; }
.menu-btn span { position: relative; width: 16px; height: 1.5px; background: var(--ink); }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); transition: transform var(--t-ui) var(--ease-out); }
.menu-btn span::before { transform: translateY(-5px); }
.menu-btn span::after { transform: translateY(5px); }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: rotate(-45deg); }
.mnav { position: fixed; inset: 72px 0 0 0; z-index: 49; display: flex; flex-direction: column; gap: 4px; padding: 32px var(--gutter); background: var(--bg); }
.mnav[hidden] { display: none; }
.mnav a:not(.btn) { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 30px; font-weight: 500; letter-spacing: -0.03em; }
.mnav .btn { margin-top: 28px; min-height: 56px; font-size: 16px; }

/* Title band */
.legal-hero { padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; margin-bottom: 18px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.legal-hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.75rem); font-weight: 500; line-height: 1; letter-spacing: -0.042em; }
.legal-meta { margin-top: 20px; max-width: 62ch; color: var(--ink-2); font-size: 16.5px; }
.legal-meta b { color: var(--ink); font-weight: 600; }
.doc-switch { display: inline-flex; gap: 4px; margin-top: 30px; padding: 4px; border-radius: 10px; background: #FFFFFF; border: 1px solid var(--line); }
.doc-switch a { padding: 10px 16px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.doc-switch a[aria-current="page"] { background: var(--accent); color: #FFFFFF; }
@media (hover: hover) { .doc-switch a:not([aria-current="page"]):hover { color: var(--accent); } }

/* Document */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding-block: clamp(48px, 6vw, 80px) clamp(88px, 10vw, 140px); }
.toc { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow: auto; }
.toc summary { list-style: none; margin-bottom: 14px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; font-size: 14.5px; line-height: 1.35; color: var(--ink-2); transition: color var(--t-hover) ease, border-color var(--t-hover) ease; }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); }
@media (hover: hover) { .toc a:hover { color: var(--ink); } }
.doc { max-width: 74ch; }
.doc section { margin-bottom: 52px; scroll-margin-top: 100px; }
.doc section:last-child { margin-bottom: 0; }
.doc h2 { margin-bottom: 16px; font-size: clamp(23px, 2.1vw, 29px); font-weight: 500; line-height: 1.2; letter-spacing: -0.022em; }
.doc h2 .num { margin-right: 0.4em; color: var(--accent); font-variant-numeric: tabular-nums; }
.doc h3 { margin: 26px 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.doc p { margin-bottom: 14px; color: var(--ink-2); }
.doc ul { list-style: none; padding: 0; margin: 0 0 18px; }
.doc li { position: relative; margin-bottom: 8px; padding-left: 22px; color: var(--ink-2); }
.doc li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(0, 0, 255, 0.35); text-underline-offset: 3px; overflow-wrap: anywhere; }
@media (hover: hover) { .doc a:hover { text-decoration-color: currentColor; } }
.contact-card { display: grid; gap: 4px; margin-bottom: 18px; padding: 22px 24px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); font-style: normal; color: var(--ink-2); }
.contact-card .org { color: var(--ink); font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.contact-card .label { color: var(--ink-3); }

/* Footer */
.foot { background: var(--bg-soft); padding-top: 88px; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.45fr) minmax(0, 0.85fr); gap: 40px; }
.foot-brand p { margin-top: 20px; color: var(--ink-2); font-size: 15px; max-width: 38ch; }
.foot h4 { margin-bottom: 18px; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.foot ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.foot ul li { color: var(--ink-2); font-size: 15px; }
.reg-address { font-style: normal; line-height: 1.6; }
.foot ul a { color: var(--ink-2); font-size: 15px; transition: color var(--t-hover) ease; }
@media (hover: hover) { .foot ul a:hover { color: var(--ink); } }
.foot ul a[aria-current="page"] { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding: 26px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.credit { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(0, 0, 0, 0.25); text-underline-offset: 3px; transition: color var(--t-hover) ease; }
@media (hover: hover) { .credit:hover { color: var(--accent); text-decoration-color: currentColor; } }
.foot-word { display: block; margin: 8px auto -0.2em; color: #E6E8F2; font-size: clamp(84px, 20.5vw, 318px); font-weight: 600; line-height: 0.85; letter-spacing: -0.065em; text-align: center; white-space: nowrap; user-select: none; }

/* Responsive */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .legal { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; padding: 16px 18px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
  .toc summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--ink-2); }
  .toc[open] summary { margin-bottom: 12px; }
  .toc[open] summary::after { content: "\2212"; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .nav-cta .btn { display: none; }
  .doc-switch { display: flex; }
  .doc-switch a { flex: 1; text-align: center; padding: 10px 8px; }
  .contact-card { padding: 18px; }
  .foot-grid { grid-template-columns: 1fr; }
}
