/* Untreatable.com — shared base (reusable across sister sites)
   Reset, tokens, typography primitives, common components. */

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

:root {
  --bg: #0a0a0f;
  --bg-2: #12121a;
  --ink: #ececea;
  --ink-dim: #a8a5b2;  /* brighter than before — was #8a8794, too dim on dark bg */
  --accent: #e23a56;    /* slightly lighter red for better contrast */
  --accent-glow: rgba(226,58,86,.35);
  --paper: #f2ecdc;
  --paper-ink: #1a1a1a;
  --paper-ink-dim: #4a4438; /* for labels on paper — darker than before for readability */
  --stamp: #8b0000;
  --border: rgba(255,255,255,.12);

  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'Courier New', ui-monospace, monospace;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 20% 10%, var(--accent-glow), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(139,0,0,.15), transparent 40%);
  pointer-events: none; z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding: 48px 24px 80px;
}

/* top nav — shared across all pages */
.topnav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1080px; margin: 0 auto;
  padding: 18px 24px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase;
}
.topnav .brand { color: var(--ink); font-weight: bold; }
.topnav .brand .dot { color: var(--accent); }
.topnav { flex-wrap: wrap; row-gap: 10px; }
.topnav nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.topnav nav a { color: #ffffff; white-space: nowrap; }
.topnav nav a:hover { color: var(--accent); text-decoration: none; }

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 12px; border-radius: 2px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; font-weight: bold;
  cursor: pointer;
  /* Remove iOS 300ms tap delay + default tap flash. Without these, the
     button sometimes only shows its :active state and never fires click
     on iOS Safari when children are nested deeply. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Ensure the button sits above any siblings at the same z-level so no
     invisible element can intercept the tap. */
  position: relative; z-index: 1;
}
.hamburger:hover { border-color: var(--accent); color: var(--accent); }
.hamburger:active { border-color: var(--accent); color: var(--accent); transform: scale(.97); }
.hamburger .hb-icon {
  display: inline-flex; flex-direction: column; gap: 3px;
}
.hamburger .hb-icon span {
  display: block; width: 16px; height: 2px;
  background: currentColor;
}

@media (max-width: 820px) {
  .hamburger { display: inline-flex; }
  .topnav nav {
    display: none;
    position: absolute; top: 100%; right: 12px;
    background: var(--bg-2); border: 1px solid var(--border);
    padding: 16px 22px;
    flex-direction: column; align-items: flex-start; gap: 14px;
    z-index: 300;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  .topnav nav.open { display: flex; }
  .topnav nav a { font-size: 14px; }
  .topnav { position: relative; }
}

/* Footer FB CTA — standalone, actionable */
.footer-cta {
  margin: 0 auto 22px;
  max-width: 460px;
  padding: 0 20px;
}
.fb-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px;
  background: #1877f2; color: #fff;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: bold;
  border-radius: 2px;
  text-decoration: none;
  transition: background .15s, transform .1s;
  text-align: center;
  line-height: 1.3;
}
.fb-cta:hover { background: #0e65d1; color: #fff; text-decoration: none; transform: translateY(-1px); }
.fb-cta svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.fb-cta .fb-cta-sub {
  display: block;
  font-size: 10px; letter-spacing: 1px;
  font-weight: normal; opacity: .85;
  margin-top: 2px;
}
.topnav .social-follow {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 2px; color: var(--accent);
  transition: border-color .2s, color .2s, transform .15s;
}
.topnav .social-follow:hover,
.topnav .social-follow:focus-visible {
  border-color: var(--accent); color: #ffffff;
  transform: translateY(-1px);
}
.topnav .social-follow svg { width: 14px; height: 14px; fill: currentColor; }
.topnav .nav-socials { display: inline-flex; gap: 8px; align-items: center; }

/* Legacy .fb-follow retained for backward-compat; mirrors .social-follow. */
.topnav .fb-follow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 2px; color: var(--accent); transition: border-color .2s, color .2s; }
.topnav .fb-follow:hover { border-color: var(--accent); color: #ffffff; }
.topnav .fb-follow svg { width: 14px; height: 14px; fill: currentColor; }

/* Cookie bar (mock.cc pattern) */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 14px 22px; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; font-size: 14px; color: var(--ink);
  font-family: Arial, sans-serif;
  line-height: 1.5;
}
.cookie-bar a { color: var(--accent); text-decoration: underline; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn {
  padding: 10px 18px; border-radius: 2px; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; font-weight: bold;
}
.cookie-accept { background: var(--accent); color: #fff; }
.cookie-decline { background: transparent; color: var(--ink-dim); border: 1px solid var(--border); }
@media (max-width: 560px) {
  .cookie-bar { flex-direction: column; text-align: center; padding: 14px; }
}

/* global logo / eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 4px;
  color: var(--ink-dim); text-transform: uppercase;
  margin-bottom: 12px;
}
.eyebrow::before, .eyebrow::after {
  content: '—'; margin: 0 10px; opacity: .4;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 900; letter-spacing: -1px; }
h1 { font-size: clamp(38px, 7vw, 68px); line-height: .98; }
h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; }
h3 { font-size: 20px; }

h1 em, h2 em {
  font-style: italic; color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

p { margin-bottom: 14px; }
.lede { font-size: 19px; color: var(--ink); font-style: italic; max-width: 560px; line-height: 1.55; }

/* buttons */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  border: none; padding: 16px 28px;
  font-family: var(--font-mono);
  font-size: 14px; letter-spacing: 3px;
  text-transform: uppercase; font-weight: bold;
  cursor: pointer;
  transition: transform .1s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { box-shadow: 0 0 30px var(--accent-glow); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); box-shadow: none; }

/* Enlarged primary CTA — used on /diagnoses/<slug> pages for "Diagnose me
   with this". Bigger icon, heavier text, more presence. */
.btn.cta {
  padding: 22px 36px;
  font-size: 17px;
  letter-spacing: 3.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.btn.cta .cta-icon {
  font-size: 26px;
  line-height: 1;
  display: inline-block;
  /* The ⚕ (Staff of Aesculapius) and ℞ glyphs sit low in their font boxes
     — nudge up to optically center with the uppercase letter-spaced label. */
  transform: translateY(-2px);
}
/* Full-width CTA variant — keep bigger padding and center the icon+text pair
   (inline-flex defaults to flex-start; need justify-content:center). */
.btn.cta.full { padding: 22px 18px; justify-content: center; }
@media (max-width: 560px) {
  .btn.cta { padding: 18px 26px; font-size: 15px; }
  .btn.cta .cta-icon { font-size: 22px; }
  .btn.cta.full { padding: 18px; }
}

/* generic card */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 32px;
}

/* footer */
footer.site {
  text-align: center; margin-top: 64px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 2px;
  color: var(--ink-dim); text-transform: uppercase;
  padding-bottom: 40px;
  line-height: 1.6;
}
footer.site em { color: var(--accent); font-style: normal; }
footer.site nav { margin-top: 12px; }
footer.site nav a { color: var(--ink-dim); margin: 0 10px; }
footer.site nav a:hover { color: var(--accent); }

/* prose (long-form body copy on landing / about / privacy) */
.prose { font-size: 17px; line-height: 1.7; color: var(--ink); max-width: 620px; margin: 0 auto; }
.prose h2 { margin: 48px 0 16px; }
.prose h3 { margin: 32px 0 10px; color: var(--accent); font-family: var(--font-mono); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 20px; margin: 24px 0;
  font-style: italic; color: var(--ink-dim);
}
