/* ============================================================
   VERTIXIQ Legal Pages — Shared Stylesheet
   Entity: Vertix IP Holdings, Inc.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --viq-ink: #E8EAF0;
  --viq-body: #8B92A5;
  --viq-muted: #5A6175;
  --viq-border: #1E2430;
  --viq-surface: #141820;
  --viq-white: #0A0C10;
  --viq-accent: #00D4AA;
  --viq-accent-hover: #00A888;
  --viq-accent-light: rgba(0, 212, 170, 0.1);
  --viq-warn: #dc2626;

  /* Typography */
  --font-heading: 'Source Serif 4', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --content-max: 760px;
  --page-pad: 2rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--viq-body);
  background: var(--viq-white);
  line-height: 1.72;
}

/* ---- Page Shell ---- */
.legal-header {
  border-bottom: 1px solid var(--viq-border);
  background: var(--viq-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.legal-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1rem var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-header__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--viq-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.legal-header__nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--viq-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.15s;
}

.legal-header__nav a:hover,
.legal-header__nav a.active {
  color: var(--viq-accent);
}

/* ---- Content Area ---- */
.legal-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem var(--page-pad) 5rem;
}

/* ---- Document Meta Block ---- */
.legal-meta {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--viq-ink);
}

.legal-meta__entity {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--viq-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.legal-meta h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--viq-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.legal-meta__dates {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.legal-meta__date {
  font-size: 0.8125rem;
  color: var(--viq-muted);
}

.legal-meta__date strong {
  font-weight: 600;
  color: var(--viq-body);
}

/* ---- Table of Contents ---- */
.legal-toc {
  background: var(--viq-surface);
  border: 1px solid var(--viq-border);
  border-radius: 6px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.legal-toc__title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--viq-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
  margin-bottom: 0.35rem;
}

.legal-toc li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--viq-muted);
}

.legal-toc a {
  font-size: 0.875rem;
  color: var(--viq-body);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-toc a:hover {
  color: var(--viq-accent);
}

/* ---- Body Typography ---- */
.legal-body h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--viq-ink);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--viq-border);
  letter-spacing: -0.01em;
  scroll-margin-top: 5rem;
}

.legal-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--viq-ink);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}

.legal-body h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--viq-ink);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-body p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.legal-body strong {
  font-weight: 600;
  color: var(--viq-ink);
}

/* Lists */
.legal-body ul,
.legal-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-body li {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.legal-body li p {
  margin-bottom: 0.35rem;
}

/* Blockquotes (used for highlighted legal text) */
.legal-body blockquote {
  border-left: 3px solid var(--viq-accent);
  background: var(--viq-accent-light);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
}

/* ALL-CAPS sections (disclaimers, liability) */
.legal-body .caps-section,
.legal-body p:has(> strong):where([style*="text-transform"]) {
  /* These are styled via the text itself being uppercase in source */
}

/* Links */
.legal-body a {
  color: var(--viq-accent);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 170, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.legal-body a:hover {
  text-decoration-color: var(--viq-accent);
}

/* Email links auto-styling */
a[href^="mailto:"] {
  word-break: break-all;
}

/* ---- Footer ---- */
.legal-footer {
  border-top: 1px solid var(--viq-border);
  background: var(--viq-surface);
}

.legal-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--page-pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.legal-footer__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--viq-ink);
  margin-bottom: 0.25rem;
}

.legal-footer__copy {
  font-size: 0.75rem;
  color: var(--viq-muted);
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.legal-footer__links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--viq-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-footer__links a:hover {
  color: var(--viq-accent);
}

/* ---- Checkout Components ---- */
.viq-checkout-panel {
  font-family: var(--font-body);
  color: var(--viq-body);
  max-width: 560px;
  border: 1px solid var(--viq-border);
  border-radius: 8px;
  background: var(--viq-white);
  overflow: hidden;
}

.viq-checkout-panel__header {
  background: var(--viq-surface);
  border-bottom: 1px solid var(--viq-border);
  padding: 1rem 1.5rem;
}

.viq-checkout-panel__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--viq-ink);
}

.viq-checkout-panel__body {
  padding: 1.5rem;
}

.viq-checkout-panel__text {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--viq-body);
  margin-bottom: 1.25rem;
}

.viq-checkout-panel__text p {
  margin-bottom: 0.75rem;
}

.viq-checkout-panel__text p:last-child {
  margin-bottom: 0;
}

.viq-checkout-panel__ack {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 1rem;
  background: var(--viq-surface);
  border: 1px solid var(--viq-border);
  border-radius: 6px;
  margin-top: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.viq-checkout-panel__ack:hover {
  border-color: var(--viq-accent);
}

.viq-checkout-panel__ack input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--viq-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.viq-checkout-panel__ack-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--viq-ink);
  line-height: 1.5;
  cursor: pointer;
}

.viq-checkout-panel__footer {
  padding: 0 1.5rem 1.5rem;
}

.viq-checkout-panel__submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.viq-checkout-panel__submit--primary {
  background: var(--viq-accent);
  color: var(--viq-white);
}

.viq-checkout-panel__submit--primary:hover:not(:disabled) {
  background: var(--viq-accent-hover);
}

.viq-checkout-panel__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.viq-checkout-panel__contact {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--viq-muted);
  text-align: center;
}

.viq-checkout-panel__contact a {
  color: var(--viq-accent);
  text-decoration: none;
}

/* Free trial disclosure */
.viq-trial-disclosure {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #92400e;
}

.viq-trial-disclosure strong {
  color: #78350f;
}

.viq-trial-disclosure ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

.viq-trial-disclosure li {
  margin-bottom: 0.25rem;
}

/* Card recurring auth */
.viq-card-auth {
  background: var(--viq-surface);
  border: 1px solid var(--viq-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.65;
}

/* ---- Print ---- */
@media print {
  .legal-header,
  .legal-toc,
  .legal-footer { display: none; }

  .legal-content { padding: 0; max-width: 100%; }
  .legal-body h2 { border-top: none; page-break-after: avoid; }
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  :root {
    --page-pad: 1.25rem;
  }

  .legal-meta h1 {
    font-size: 1.625rem;
  }

  .legal-body h2 {
    font-size: 1.25rem;
  }

  .legal-body h3 {
    font-size: 1rem;
  }

  .legal-header__nav a {
    margin-left: 1rem;
    font-size: 0.75rem;
  }

  .legal-toc {
    padding: 1rem 1.25rem;
  }

  .legal-meta__dates {
    flex-direction: column;
    gap: 0.25rem;
  }

  .legal-footer__inner {
    flex-direction: column;
    gap: 1rem;
  }
}
