/* Microsite Wave 1 stylesheet v2 — full redesign
 * Both microsites share this stylesheet. Placeholders are substituted at
 * build time by scripts/build.py:
 *   #01696F   site-specific primary teal
 *   #0C4E54    site-specific darker/hover accent
 *   {{SITE_SLUG}}       "sex_addiction" or "porn_addiction" for layout branching
 */

/* ---------- Tokens ---------- */
:root {
  /* site accents */
  --primary: #01696F;
  --primary-hover: #0C4E54;
  --primary-tint: #01696F14;   /* 8% alpha via hex suffix */
  --primary-soft: #01696F0A;   /* 4% alpha */

  /* warm secondary accent (shared across both sites) */
  --sand: #D4B896;
  --sand-deep: #A8865A;
  --sand-tint: #F1E7D4;
  --sand-line: #E4D3B4;

  /* neutrals */
  --bg: #F7F5F0;           /* warmer than before */
  --surface: #FFFFFF;
  --surface-alt: #FBF9F3;
  --surface-deep: #F1EDE3;
  --text: #1F1D17;
  --text-body: #2E2C25;
  --text-muted: #6B6960;
  --text-faint: #99968C;
  --border: #E5DFCF;
  --border-strong: #D0C8B2;
  --error: #A12C7B;
  --success: #437A22;

  --max-w: 1180px;
  --content-w: 720px;

  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(31, 29, 23, 0.04);
  --shadow: 0 2px 8px rgba(31, 29, 23, 0.06), 0 1px 2px rgba(31, 29, 23, 0.04);
  --shadow-lg: 0 8px 24px rgba(31, 29, 23, 0.08), 0 2px 6px rgba(31, 29, 23, 0.04);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 820px; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms var(--ease-out);
}
a:hover { color: var(--primary-hover); }

::selection { background: var(--primary-tint); color: var(--text); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: white; padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm); z-index: 100;
  font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0; gap: 1.5rem;
}
.brand { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 0.5rem; }
.brand::before {
  content: ""; width: 26px; height: 26px; border-radius: 6px;
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  flex: 0 0 auto;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.site-nav ul {
  list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.94rem; font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.site-nav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.site-nav a:hover { color: var(--primary); }

.header-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.header-cta:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.header-cta:active { transform: translateY(0); }

@media (max-width: 780px) {
  .site-nav { display: none; }
  .header-inner { padding: 0.75rem 0; gap: 0.75rem; }
  .header-cta { padding: 0.55rem 0.95rem; font-size: 0.88rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(circle at 88% -10%, var(--primary-tint), transparent 45%),
    radial-gradient(circle at -5% 110%, var(--sand-tint), transparent 55%),
    linear-gradient(180deg, var(--surface), var(--bg));
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(31, 29, 23, 0.035) 1px, transparent 1px);
  background-size: 96px 100%;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.75rem;
  background: var(--primary-tint);
  border-radius: 999px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4vw + 1rem, 3.6rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
  color: var(--text);
}
.hero__lede {
  font-size: 1.18rem;
  max-width: 62ch;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero__meta strong { color: var(--text); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out), box-shadow 150ms var(--ease-out), color 150ms var(--ease-out);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-primary { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: white; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--text); color: var(--text); }
.btn svg { width: 1em; height: 1em; }

/* ---------- Sections / typography ---------- */
section { padding: 4rem 0; }
section.section--tight { padding: 2.5rem 0; }
section.section--wide { padding: 5.5rem 0; }
section.section--alt { background: var(--surface-alt); }
section.section--surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--sand-deep);
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2vw + 1rem, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 24ch;
  color: var(--text);
  font-weight: 600;
}
.section-lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 2.25rem;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.015em; color: var(--text); }
h1 { font-weight: 600; }
h2 { font-size: 1.85rem; margin: 0 0 1rem; font-weight: 600; line-height: 1.2; }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; font-weight: 600; }
h4 { font-size: 1.02rem; margin: 0 0 0.35rem; font-weight: 600; }
p { margin: 0 0 1.15rem; }
strong { color: var(--text); font-weight: 600; }
ul, ol { padding-left: 1.4rem; }
ul li, ol li { margin-bottom: 0.5rem; }

/* Card grids */
.three-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
  position: relative;
}
.panel:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.panel h3 { margin: 0 0 0.6rem; color: var(--text); }
.panel h3::before {
  content: ""; display: block; width: 28px; height: 3px;
  background: var(--primary); border-radius: 2px; margin: 0 0 0.9rem;
}
.panel p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }

/* Numbered card variant (used by sex_addiction) */
.panel--numbered { padding-top: 2.75rem; }
.panel--numbered .panel__num {
  position: absolute; top: 1.25rem; right: 1.5rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.85rem; color: var(--primary);
  letter-spacing: 0.08em;
}

/* Feature list with inline icon */
.feature-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list .icon {
  flex: 0 0 24px; width: 24px; height: 24px;
  color: var(--primary);
  margin-top: 2px;
}
.feature-list strong { display: block; margin-bottom: 0.15rem; }

/* ---------- Trust strip ---------- */
.trust-strip {
  padding: 1rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.trust-strip ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; justify-content: center;
  font-size: 0.88rem; color: var(--text-muted);
  font-weight: 500;
}
.trust-strip li { display: inline-flex; align-items: center; gap: 0.5rem; }
.trust-strip li::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 14px;
  background: var(--primary);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/contain no-repeat;
}

/* ---------- Call CTA ---------- */
.call-cta { padding: 4rem 0; position: relative; }
.call-cta--primary {
  background: var(--primary);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.10), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(0,0,0,0.15), transparent 55%),
    linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
}
.call-cta--primary a { color: white; }
.call-cta--primary a.btn-primary { background: white; color: var(--primary); }
.call-cta--primary a.btn-primary:hover { background: var(--sand-tint); color: var(--primary-hover); }
.call-cta--primary a.btn-secondary { color: white; border-color: rgba(255,255,255,0.4); }
.call-cta--primary a.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }
.call-cta--secondary {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.call-cta__inner { text-align: center; max-width: 680px; margin: 0 auto; }
.cta-eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 600; opacity: 0.9; margin: 0 0 0.75rem;
}
.cta-headline { font-size: clamp(1.6rem, 2vw + 0.75rem, 2.15rem); margin: 0 0 1rem; font-weight: 600; line-height: 1.2; }
.cta-body { font-size: 1.1rem; opacity: 0.95; margin: 0 0 1.75rem; line-height: 1.55; }
.cta-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
  margin: 0 0 1.5rem;
}
.cta-fine { font-size: 0.88rem; opacity: 0.85; margin: 0; }

/* ---------- Checklist ---------- */
.checklist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin: 2rem auto;
  max-width: 780px;
  box-shadow: var(--shadow-sm);
}
.checklist__intro { font-size: 1.05rem; margin-bottom: 1.5rem; color: var(--text-body); }
.checklist__list {
  list-style: none; padding: 0; margin: 0 0 1.25rem;
  counter-reset: check;
}
.checklist__list li {
  counter-increment: check;
  position: relative;
  padding: 0.75rem 0 0.75rem 2.4rem;
  border-bottom: 1px dashed var(--border);
  color: var(--text-body);
}
.checklist__list li:last-child { border-bottom: none; }
.checklist__list li::before {
  content: counter(check, decimal-leading-zero);
  position: absolute; left: 0; top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}
.checklist__followup { color: var(--text-muted); font-size: 0.95rem; }
.checklist__cta {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem; margin: 1.25rem 0 0;
  font-weight: 500;
  color: var(--text-body);
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq h2 { margin-bottom: 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 1.5rem;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 1.25rem 2rem 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 12px; height: 12px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-answer { padding: 0 0 1.5rem; color: var(--text-body); }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text);
  color: #D8D5CB;
  padding: 4rem 0 2.5rem;
  font-size: 0.94rem;
  line-height: 1.6;
}
.site-footer a { color: #D8D5CB; }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #3B3831;
}
.footer-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.5rem; color: white; }
.footer-tagline { color: #A6A399; margin: 0; font-size: 0.9rem; }
.footer-contact p, .footer-legal p { margin: 0 0 0.5rem; }
.footer-contact strong, .footer-legal strong { color: white; font-weight: 600; }
.footer-disclosure {
  color: #B4B1A6;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.footer-disclosure a { color: white; text-decoration: underline; }
.footer-notice {
  color: #8E8B81;
  font-size: 0.78rem;
  margin: 0;
}

/* ---------- Motion: on-scroll fade (optional, keeps things restrained) ---------- */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Layout differentiators per site ---------- */

/* Sex addiction: structured / clinical case-file layout */
body.site--sex_addiction .hero__title { max-width: 20ch; }
body.site--sex_addiction .section-title { max-width: 22ch; }
body.site--sex_addiction .three-panel { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
body.site--sex_addiction .panel { border-left: 3px solid var(--primary); border-radius: 4px; }
body.site--sex_addiction .panel:hover { border-left-color: var(--primary-hover); }
body.site--sex_addiction .panel h3::before { display: none; }
body.site--sex_addiction .hero { background:
  linear-gradient(180deg, var(--surface), var(--bg)),
  radial-gradient(circle at 100% 0%, var(--primary-soft), transparent 55%); }

/* Porn addiction: editorial / warmer / more asymmetric */
body.site--porn_addiction .hero { padding: 6rem 0 5rem; }
body.site--porn_addiction .hero__title { font-size: clamp(2.35rem, 4.5vw + 1rem, 4rem); letter-spacing: -0.03em; max-width: 20ch; }
body.site--porn_addiction .hero__lede { font-size: 1.22rem; }
body.site--porn_addiction .hero__eyebrow { background: var(--sand-tint); color: var(--sand-deep); }
body.site--porn_addiction .section-eyebrow { color: var(--primary); }
body.site--porn_addiction .panel { border-radius: var(--radius-lg); background: var(--surface-alt); }
body.site--porn_addiction .panel:hover { background: var(--surface); }
body.site--porn_addiction .panel h3::before { background: var(--sand-deep); }
body.site--porn_addiction section.section--alt { background: var(--sand-tint); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 720px) {
  section { padding: 2.75rem 0; }
  section.section--wide { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .cta-headline { font-size: 1.55rem; }
  .call-cta { padding: 3rem 0; }
  .checklist { padding: 1.5rem; border-radius: var(--radius); }
  .container { padding: 0 1.25rem; }
  h2 { font-size: 1.55rem; }
  .hero__lede { font-size: 1.08rem; }
}
