/* =====================================================
   Glyvon Health Legal Pages
   Static legal documents aligned with the main site theme
   ===================================================== */

:root {
  --bg: #F6EFE0;
  --bg-2: #FBF6EA;
  --bg-soft: #EFE5D0;
  --bg-card: #FFFCF5;
  --bg-tint: #F3E7CD;
  --ink: #1F1A12;
  --ink-2: #3F362A;
  --muted: #7B6E5C;
  --muted-2: #A89A85;
  --line: #E2D6BE;
  --line-2: #EFE5CE;
  --orange: #F2751F;
  --orange-600: #D85F12;
  --orange-soft: #FFE3CC;
  --orange-50: rgba(242, 117, 31, .10);
  --orange-glow: rgba(242, 117, 31, .32);
  --terra: #B5410E;
  --cream-hi: #FFF8E8;
  --green: #5C8A4A;
  --green-soft: rgba(92, 138, 74, .12);
  --warn: #E0A23A;
  --warn-soft: rgba(224, 162, 58, .14);
  --red: #C84D2E;
  --red-soft: rgba(200, 77, 46, .12);
  --sans: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.72;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1000px 640px at 92% -10%, rgba(242, 117, 31, .16), transparent 58%),
    radial-gradient(820px 520px at 3% 18%, rgba(255, 228, 180, .48), transparent 58%),
    radial-gradient(900px 620px at 50% 112%, rgba(181, 65, 14, .09), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}

a {
  color: var(--terra);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

::selection {
  background: var(--orange);
  color: #fff;
}

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 239, 224, .82);
  border-bottom: 1px solid var(--line-2);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1180px;
  height: 84px;
  margin: 0 auto;
  padding: 0 28px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.legal-brand:hover {
  text-decoration: none;
}

.legal-brand img {
  width: 50px;
  height: 50px;
  padding: 5px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #fffaf0, var(--cream-hi));
  border: 1px solid rgba(242, 117, 31, .32);
  border-radius: 16px;
  box-shadow:
    0 0 0 4px rgba(242, 117, 31, .10),
    0 10px 24px -12px rgba(181, 65, 14, .36),
    inset 0 0 0 1px rgba(255, 255, 255, .74);
}

.legal-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-brand-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.legal-nav-links a {
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
}

.legal-nav-links a:hover {
  color: var(--terra);
}

.legal-page {
  width: min(100%, 980px);
  margin: 48px auto 0;
  padding: 0 28px;
}

.container {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 252, 245, .98), rgba(255, 248, 232, .94));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 60px -36px rgba(120, 60, 20, .32);
}

.page-header {
  position: relative;
  padding: 42px 40px 34px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(620px 280px at 100% 0%, rgba(242, 117, 31, .18), transparent 58%),
    linear-gradient(135deg, rgba(255, 227, 204, .74), rgba(255, 252, 245, .92) 68%);
}

.page-header::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -1px;
  width: 168px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--terra);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 117, 31, .18);
}

h1 {
  margin: 14px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.022em;
}

.tagline {
  max-width: 64ch;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.58;
}

.content {
  padding: 38px 40px 42px;
}

.document-info,
.related-docs,
.notice {
  background: rgba(255, 255, 255, .48);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .58) inset;
}

.document-info {
  margin-bottom: 16px;
}

.related-docs {
  margin-bottom: 32px;
}

.notice {
  margin: 18px 0;
  background: rgba(255, 227, 204, .42);
}

.warning {
  background: var(--warn-soft);
  border-left-color: var(--warn);
}

.document-info p,
.notice p {
  margin: 6px 0;
  color: var(--ink-2);
  font-size: 15px;
}

.related-docs p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 15px;
}

.related-docs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-docs li {
  margin: 0;
}

.related-docs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
}

.related-docs a:hover {
  color: var(--terra);
  border-color: rgba(242, 117, 31, .45);
}

main {
  color: var(--ink-2);
}

.section + .section {
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid var(--line-2);
}

h2 {
  margin: 0 0 16px;
  color: var(--terra);
  font-size: 25px;
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.012em;
}

h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: -0.006em;
}

p {
  margin: 14px 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.72;
}

ul,
ol {
  margin: 12px 0 18px;
  padding-left: 24px;
  color: var(--ink-2);
}

li {
  margin: 6px 0;
}

.legal-footer {
  max-width: 1180px;
  margin: 56px auto 0;
  padding: 32px 28px 42px;
  color: var(--muted);
  font-size: 13px;
}

.legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-footer a {
  color: var(--terra);
}

@media (max-width: 768px) {
  .legal-nav-inner {
    height: auto;
    min-height: 70px;
    padding: 14px 20px;
    align-items: flex-start;
  }

  .legal-nav-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .legal-nav-links a {
    font-size: 13px;
  }

  .legal-page {
    margin-top: 24px;
    padding: 0 14px;
  }

  .container {
    border-radius: 18px;
  }

  .page-header {
    padding: 30px 22px 24px;
  }

  .content {
    padding: 28px 22px 30px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 21px;
  }

  h3 {
    font-size: 17px;
  }

  p,
  .document-info p,
  .related-docs p,
  .notice p {
    font-size: 15px;
  }

  .legal-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .legal-nav-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .legal-nav-links {
    justify-content: flex-start;
  }
}

@media print {
  body {
    background: #fff;
  }

  .legal-nav,
  .legal-footer {
    display: none;
  }

  .legal-page {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .container {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}
