/* ============================================================
   Sqills · Legal pages — shared stylesheet
   Used by: privacy-policy.html, terms-of-use.html,
            pricing-policy.html, refund-policy.html
   ============================================================ */

:root {
  /* Color primitives */
  --primary-50:  #FFF6EC;
  --primary-100: #FFEAD0;
  --primary-200: #FFCA95;
  --primary-300: #FFA659;
  --primary-400: #FA8A20;
  --primary-500: #EC6E00;
  --primary-600: #C85A00;
  --primary-700: #A04A00;
  --primary-800: #782F00;
  --primary-900: #4F1C00;

  --neutral-0:   #FFFFFF;
  --neutral-50:  #FAF8F3;
  --neutral-100: #F5F2EB;
  --neutral-200: #E0DDD7;
  --neutral-300: #CFC9B5;
  --neutral-400: #968D73;
  --neutral-500: #706954;
  --neutral-600: #504A3A;
  --neutral-700: #332F25;
  --neutral-800: #1A1408;
  --neutral-900: #060606;

  --ivory:       #FFFAEB;

  /* Semantic surfaces */
  --surface-canvas:  var(--neutral-50);
  --surface-default: var(--neutral-0);
  --surface-subtle:  var(--neutral-100);
  --surface-muted:   var(--neutral-200);
  --surface-brand:   var(--primary-500);

  /* Text */
  --text-primary:   #060606;
  --text-body:      #332F25;
  --text-secondary: #706954;
  --text-tertiary:  #968D73;
  --text-inverse:   var(--ivory);
  --text-brand:     var(--primary-500);
  --text-link:      var(--primary-600);
  --text-link-hover: var(--primary-700);

  /* Borders */
  --border-subtle:  rgba(26, 20, 8, 0.08);
  --border-default: var(--neutral-200);
  --border-strong:  var(--neutral-400);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Fonts */
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-brand:   'Manrope', system-ui, sans-serif;

  /* Layout */
  --content-max:    720px;
  --side-padding:   16px;
  --side-padding-md: 32px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--surface-canvas);
  color: var(--text-body);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

/* Account for fixed/sticky headers when jumping to anchors */
[id] { scroll-margin-top: 24px; }

/* ============================================================
   Page header — wordmark + section eyebrow
   ============================================================ */

.legal-header {
  width: 100%;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px var(--side-padding);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  /* Maintain aspect ratio while constraining height — logo is 800×146 (~5.5:1) */
  line-height: 0;
}

.legal-header__logo img {
  display: block;
  height: 28px;
  width: auto;
}

@media (min-width: 720px) {
  .legal-header__logo img {
    height: 32px;
  }
}

.legal-header__eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ============================================================
   Main content layout
   ============================================================ */

.legal-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--side-padding) 64px;
}

@media (min-width: 720px) {
  .legal-main {
    padding: 64px var(--side-padding-md) 96px;
  }
  .legal-header__inner {
    padding: 22px var(--side-padding-md);
  }
}

/* ============================================================
   Hero — H1 + last-updated + intro
   ============================================================ */

.legal-hero {
  margin-bottom: 40px;
}

.legal-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

@media (min-width: 720px) {
  .legal-hero__title {
    font-size: 56px;
  }
}

.legal-hero__updated {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 28px;
}

.legal-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-body);
}

.legal-hero__intro p {
  font-size: 16px;
  line-height: 1.65;
}

.legal-hero__intro em {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================================
   Table of Contents
   ============================================================ */

.legal-toc {
  background: var(--surface-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 40px 0 56px;
}

.legal-toc__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-toc__list {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-toc__list li {
  counter-increment: toc;
  position: relative;
  padding-left: 32px;
  font-size: 15px;
  line-height: 1.5;
}

.legal-toc__list li::before {
  content: counter(toc) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-tertiary);
  width: 24px;
  text-align: right;
  padding-right: 4px;
}

.legal-toc__list a {
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}

.legal-toc__list a:hover,
.legal-toc__list a:focus {
  color: var(--text-link-hover);
  border-bottom-color: currentColor;
}

/* Variant: TOC without numeric counter (used when sections have lettered/named anchors) */
.legal-toc__list--plain {
  counter-reset: none;
}

.legal-toc__list--plain li {
  counter-increment: none;
  padding-left: 0;
}

.legal-toc__list--plain li::before {
  content: none;
}

/* ============================================================
   Sections (numbered H2) and subsections (H3)
   ============================================================ */

.legal-section {
  margin-top: 56px;
  counter-increment: section;
}

.legal-section:first-of-type {
  margin-top: 0;
}

.legal-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

@media (min-width: 720px) {
  .legal-section__title {
    font-size: 32px;
  }
}

.legal-subsection {
  margin-top: 32px;
}

.legal-subsection__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.legal-subsection__title--small {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 10px;
}

/* ============================================================
   Body content — paragraphs, lists, inline elements
   ============================================================ */

.legal-section p,
.legal-subsection p {
  margin-bottom: 14px;
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.65;
}

.legal-section p:last-child,
.legal-subsection p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol,
.legal-subsection ul,
.legal-subsection ol {
  margin: 12px 0 16px 0;
  padding-left: 24px;
  color: var(--text-body);
}

.legal-section li,
.legal-subsection li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.legal-section li:last-child,
.legal-subsection li:last-child {
  margin-bottom: 0;
}

.legal-section a,
.legal-subsection a,
.legal-hero__intro a {
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-200);
  transition: border-color 120ms ease, color 120ms ease;
}

.legal-section a:hover,
.legal-subsection a:hover,
.legal-hero__intro a:hover {
  color: var(--text-link-hover);
  border-bottom-color: currentColor;
}

.legal-section strong,
.legal-subsection strong,
.legal-hero__intro strong {
  font-weight: 600;
  color: var(--text-primary);
}

.legal-section em,
.legal-subsection em {
  color: var(--text-secondary);
  font-style: italic;
}

/* Address / contact block */
.legal-section address {
  font-style: italic;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.6;
}

/* ============================================================
   Site footer — Firelight pattern shared with the jaspr landing.
   Logo + policy nav + extended Soul Stretch disclaimer. Light
   variant matches the jaspr `.site-footer--light` styles.
   ============================================================ */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 100px 24px;
  font-family: var(--font-display);
}

.site-footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 56px;
  line-height: 1;
  user-select: none;
}

.site-footer-logo img {
  display: block;
  height: 64px;
  width: auto;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 64px;
  gap: 12px 44px;
}

.site-footer-links a {
  font-size: 17px;
  letter-spacing: -0.005em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: none;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.site-footer-legal {
  margin: 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.65;
}

/* Light variant — paper canvas, neutral ink. */
.site-footer--light {
  background-color: #FAF8F3;
  border-top: 1px solid rgba(26, 20, 8, 0.08);
}

.site-footer--light .site-footer-links a { color: #706954; }
.site-footer--light .site-footer-links a:hover,
.site-footer--light .site-footer-links a:focus { color: #A04A00; }
.site-footer--light .site-footer-legal { color: #706954; }

@media (max-width: 640px) {
  .site-footer { padding: 72px 20px; }
  .site-footer-logo { margin-bottom: 44px; }
  .site-footer-logo img { height: 48px; }
  .site-footer-links { margin-bottom: 48px; gap: 12px 28px; }
  .site-footer-links a { font-size: 16px; }
  .site-footer-legal { font-size: 14px; }
}

/* ============================================================
   Print
   ============================================================ */

@media print {
  .site-footer-links { display: none; }
  body { background: white; color: black; }
  .legal-toc a,
  .legal-section a { color: black; border-bottom-color: #999; }
}
