/* Found — shared styles for every page except the homepage.
   The homepage (index.html) carries these same tokens, header and footer inline;
   if you change the header or footer here, change them there too. */

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

:root {
  --cream:      #F5EFE6;
  --cream-dim:  rgba(245,239,230,0.66);
  --espresso:   #1A1614;
  --bark:       #241E1B;
  --bark-line:  #3A302A;
  --taupe:      #8C7B6E;
  --gold:       #B8975A;
  --gold-soft:  rgba(184,151,90,0.5);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap:  1400px;
  --gutter: clamp(20px, 4vw, 48px);
  --head-h: 68px;
  color-scheme: dark;
}

html { scroll-behavior: smooth; background: var(--espresso); scroll-padding-top: calc(var(--head-h) + 24px); }
body {
  background: var(--espresso); color: var(--cream);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before, .eyebrow::after { content: ''; width: 26px; height: 1px; background: var(--gold-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; padding: 12px 22px; border-radius: 100px; white-space: nowrap;
  transition: opacity .2s, border-color .2s, background .2s; cursor: pointer;
}
.btn-ghost { color: var(--cream); border: 1px solid rgba(245,239,230,0.28); background: rgba(26,22,20,0.25); }
.btn-ghost:hover { border-color: rgba(245,239,230,0.6); }
.btn-gold { color: var(--espresso); background: var(--gold); border: 1px solid var(--gold); }
.btn-gold:hover { opacity: .88; }

/* ---------- header (same as the homepage) ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(26,22,20,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(58,48,42,0.7);
}
/* The header runs the full window width; page content stays within --wrap. */
.site-head .wrap { max-width: none; display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.brand img { height: 26px; width: auto; }
.nav { display: flex; gap: 26px; margin-inline: auto; }
.nav a {
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream-dim); text-decoration: none; transition: color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a[aria-current="page"] { box-shadow: 0 1px 0 var(--gold); }
.head-cta { display: flex; gap: 10px; }

/* ---------- page hero ---------- */
.page-hero {
  position: relative; text-align: center; border-bottom: 1px solid var(--bark-line);
  background: radial-gradient(ellipse 55% 120% at 50% 0%, rgba(184,151,90,0.16) 0%, transparent 70%), var(--espresso);
}
.page-hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-block: clamp(56px, 8vw, 96px) clamp(44px, 6vw, 72px); }
.page-hero h1 {
  font-family: var(--serif); font-weight: 300; font-size: clamp(42px, 5.6vw, 68px); line-height: 1.02;
  letter-spacing: -0.01em; color: var(--cream); text-wrap: balance; max-width: 18ch;
}
.page-hero h1 em { font-style: italic; }
.page-hero .meta { font-size: 12.5px; letter-spacing: 0.06em; color: var(--taupe); }
.page-hero .sub { font-size: 17px; color: var(--cream-dim); max-width: 56ch; text-wrap: pretty; }

/* ---------- document layout: section index beside the text ----------
   The article comes first in the DOM (legal notices that must be the first
   paragraph stay first for readers, crawlers and print); the grid puts the
   index on the left. */
.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 120px); }
.doc > article { grid-column: 2; grid-row: 1; min-width: 0; }
.doc > .toc { grid-column: 1; grid-row: 1; }

.toc { position: sticky; top: calc(var(--head-h) + 28px); align-self: start; max-height: calc(100vh - var(--head-h) - 56px); overflow-y: auto; }
.toc-title { font-size: 10.5px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.toc ol { list-style: none; display: flex; flex-direction: column; border-left: 1px solid var(--bark-line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent;
  font-size: 13.5px; line-height: 1.4; color: var(--taupe); text-decoration: none; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--cream); }
.toc a.is-active { color: var(--cream); border-left-color: var(--gold); }
.toc summary { display: none; }

/* ---------- document content ---------- */
.doc .lead { font-size: 18px; font-style: italic; color: rgba(245,239,230,0.8); line-height: 1.75; margin-bottom: 44px; }
.doc .intro-card { background: var(--bark); border: 1px solid var(--bark-line); border-radius: 18px; padding: 24px 26px; margin-bottom: 52px; }
.doc .intro-card p { font-size: 15.5px; color: rgba(245,239,230,0.72); line-height: 1.8; }
.doc .intro-card a, .doc .section a, .doc .card a { color: var(--gold); }
.doc .sections { display: flex; flex-direction: column; gap: 52px; }
.doc .section h2 {
  font-family: var(--serif); font-size: clamp(26px, 2.6vw, 32px); font-weight: 400; line-height: 1.15;
  color: var(--cream); margin-bottom: 14px; text-wrap: balance;
}
/* pre-line: the legal copy carries its paragraph breaks as newlines. */
.doc .section p { font-size: 16px; color: var(--cream-dim); line-height: 1.85; white-space: pre-line; }
.doc .section p + p { margin-top: 12px; }
.doc .section strong { color: var(--cream); font-weight: 500; }
.doc .resource-list { list-style: none; margin-top: 10px; }
.doc .resource-list li { font-size: 16px; color: var(--cream-dim); line-height: 2; }
.doc .resource-list strong { color: var(--cream); font-weight: 500; }

/* The background screening disclosure. NJ 56:8-172, IL 815 ILCS 518/10,
   TX Bus & Com 106.004 and CT 21a-436 require it in bold, capital letters,
   at least 12-point type; 12pt is 16px. Do not shrink or de-bold it. */
.doc .bg-disclosure {
  background: rgba(184,151,90,0.08); border: 1px solid rgba(184,151,90,0.4);
  border-radius: 16px; padding: 24px 26px; margin-bottom: 44px;
}
.doc .bg-disclosure p.disclosure-line { font-size: 17px; font-weight: 700; color: var(--cream); line-height: 1.6; }
.doc .bg-disclosure p.disclosure-sub { font-size: 15px; color: var(--cream-dim); line-height: 1.75; margin-top: 12px; }

/* California Civil Code s.1694.2: at least 10-point boldface, standing alone
   as the first paragraph. Do not shrink or de-bold this to suit the layout. */
.doc .ca-notice {
  background: rgba(184,151,90,0.08); border: 1px solid rgba(184,151,90,0.4);
  border-radius: 16px; padding: 22px 26px; margin-bottom: 28px;
}
.doc .ca-notice p { font-size: 15px; font-weight: 700; color: var(--cream); line-height: 1.7; white-space: pre-line; }
/* In the Terms the two notices sit inside .sections; keep them as one block. */
.doc .sections > .ca-notice { margin-bottom: 0; }
.doc .sections > .ca-notice + .ca-notice { margin-top: -34px; }

.doc .highlight { background: var(--bark); border: 1px solid rgba(184,151,90,0.25); border-radius: 16px; padding: 20px 22px; margin-top: 14px; }
.doc .highlight p { color: rgba(245,239,230,0.8); }
.doc .divider { height: 1px; background: var(--bark-line); margin: 52px 0; }

.doc .contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 6px; }
.doc .contact-card {
  background: var(--bark); border: 1px solid var(--bark-line); border-radius: 16px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; transition: border-color .2s, background .2s;
}
.doc .contact-card:hover { border-color: rgba(184,151,90,0.4); background: #2a2320; }
.doc .contact-card p { white-space: normal; }
.doc .contact-label { font-size: 10px; letter-spacing: 0.18em; color: var(--taupe); text-transform: uppercase; margin-bottom: 3px; line-height: 1.4 !important; }
.doc .contact-email { font-size: 14.5px; color: var(--cream) !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
.doc .contact-arrow { color: var(--gold); font-size: 18px; line-height: 1; }

/* Step cards (delete-account) */
.doc .cards { display: flex; flex-direction: column; gap: 18px; }
.doc .card { background: var(--bark); border: 1px solid var(--bark-line); border-radius: 18px; padding: 26px 28px; }
.doc .card h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--cream); margin-bottom: 14px; }
.doc .card p, .doc .card li { font-size: 16px; color: var(--cream-dim); line-height: 1.8; }
.doc .card p + p, .doc .card p + ul, .doc .card ul + p, .doc .card ol + p { margin-top: 12px; }
.doc .card ol, .doc .card ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc .card li::marker { color: var(--gold); }
.doc .card strong { color: var(--cream); font-weight: 500; }
.doc .card .muted { font-size: 14px; color: var(--taupe); }
.doc .path {
  display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--espresso); background: var(--gold); border-radius: 100px; padding: 2px 10px; vertical-align: 1px;
}

/* ---------- contact page ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(28px, 4vw, 56px); align-items: start; padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 120px); }
.contact-card-main { background: var(--bark); border: 1px solid var(--bark-line); border-radius: 24px; padding: clamp(24px, 4vw, 44px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 10.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--taupe); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 15px 18px; border-radius: 14px; border: 1px solid var(--bark-line);
  background: var(--espresso); color: var(--cream); font-family: var(--sans); font-size: 15.5px; font-weight: 300;
  outline: none; -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23B8975A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px;
}
.form-group textarea { min-height: 200px; resize: vertical; line-height: 1.65; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--taupe); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 4px rgba(184,151,90,0.12); }
.form-error { font-size: 14px; color: #E8B4A0; background: rgba(200,90,60,0.1); border: 1px solid rgba(200,90,60,0.35); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form-actions .btn { font-size: 12px; padding: 16px 30px; }
.form-actions .btn:disabled { opacity: .6; cursor: default; }
.note { font-size: 12.5px; color: var(--taupe); }
.success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 36px; }
.success-mark { font-size: 28px; color: var(--gold); }
.success h2 { font-family: var(--serif); font-weight: 300; font-size: 40px; }
.success p { color: var(--cream-dim); margin-bottom: 10px; }

.contact-side { display: flex; flex-direction: column; gap: 18px; }
.contact-help {
  display: flex; flex-direction: column; gap: 4px; padding: 24px 26px; border-radius: 20px; text-decoration: none;
  border: 1px solid var(--gold-soft); color: var(--cream-dim);
  background: radial-gradient(ellipse 90% 90% at 50% 0%, rgba(184,151,90,0.16), transparent 70%), var(--bark);
  transition: border-color .2s;
}
.contact-help:hover { border-color: var(--gold); }
.contact-help strong { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--cream); line-height: 1.1; }
.contact-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.contact-direct { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px; border: 1px solid var(--bark-line); border-radius: 20px; }
.contact-direct a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--bark-line); font-size: 14.5px; color: var(--cream); text-decoration: none; overflow-wrap: anywhere; }
.contact-direct a:hover { color: var(--gold); }
.contact-direct a span { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--taupe); }
.contact-emergency { font-size: 13px; color: var(--taupe); padding-inline: 4px; }
.contact-emergency a { color: var(--gold); }
.btn-ghost[aria-current="page"] { border-color: var(--gold-soft); }

/* ---------- footer (same as the homepage) ---------- */
.site-foot { background: #141110; border-top: 1px solid var(--bark-line); padding-block: 60px 34px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-brand img { height: 28px; width: auto; }
.foot-brand p { font-size: 13.5px; color: var(--taupe); max-width: 30ch; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col h5 { font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.foot-col a { font-size: 13.5px; color: var(--cream-dim); text-decoration: none; overflow-wrap: anywhere; }
.foot-col a:hover, .foot-col a[aria-current="page"] { color: var(--cream); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--bark-line); font-size: 12px; color: var(--taupe); }
.foot-base a { color: var(--taupe); text-decoration: none; }
.foot-base a:hover { color: var(--cream); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .nav { display: none; }
  .head-cta { margin-left: auto; }
}
@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .doc > article, .doc > .toc { grid-column: 1; }
  .doc > .toc { grid-row: 1; }
  .doc > article { grid-row: 2; }
  /* The index becomes a collapsible "On this page" panel above the text. */
  .toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--bark-line); border-radius: 16px; background: var(--bark); }
  .toc summary {
    display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
    padding: 14px 18px; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  }
  .toc summary::-webkit-details-marker { display: none; }
  .toc summary::after { content: '+'; font-size: 18px; letter-spacing: 0; color: var(--cream-dim); }
  .toc[open] summary::after { content: '\2212'; }
  .toc .toc-title { display: none; }
  .toc ol { border-left: 0; padding: 0 18px 12px; }
  .toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 820px) {
  .head-cta .btn-ghost { display: none; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .doc .card { padding: 22px 20px; }
}

/* ---------- print: the Terms promise a print-friendly copy ---------- */
@media print {
  :root { --cream: #111; --cream-dim: #222; --taupe: #555; --gold: #6b5530; }
  html, body { background: #fff !important; color: #111; }
  .site-head, .site-foot, .toc { display: none !important; }
  .page-hero { background: none; border: 0; }
  .page-hero .wrap { padding-block: 0 16px; }
  .doc { display: block; padding: 0; }
  .doc .intro-card, .doc .card, .doc .highlight, .doc .contact-card, .doc .bg-disclosure, .doc .ca-notice { background: none; border-color: #999; }
  .doc .section { break-inside: avoid-page; }
  a { color: inherit !important; }
}
