/* Clear Minds Counseling Services — palette sampled from logo (pink/magenta on black) + flyer (cream/plum) */
:root {
  --bg: #FBF6F2;
  --bg-alt: #F4EAE8;
  --surface: #FFFFFF;
  --text: #2A1B2E;
  --muted: #6B566B;
  --line: #E6D6D8;
  --accent: #9C2F8A;          /* plum-magenta: buttons, links */
  --accent-ink: #FFFFFF;
  --accent-soft: #F6DCE7;
  --strip-bg: linear-gradient(100deg, #7A2470 0%, #B0459C 55%, #D77FA6 100%);
  --strip-ink: #FFFFFF;
  --ring-a: #C44FBE;
  --ring-b: #A8458A;
  --ring-c: #E89AB6;
  --shadow: 0 1px 2px rgba(42, 27, 46, .05), 0 8px 24px rgba(42, 27, 46, .06);
  --radius: 18px;
  --header-h: 68px;
  --f-script: "Allura", cursive;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0A10;
    --bg-alt: #151018;
    --surface: #1B141E;
    --text: #F7EAF0;
    --muted: #C3AEBC;
    --line: #2E2331;
    --accent: #F2B3CB;
    --accent-ink: #1A0F1C;
    --accent-soft: #2A1A2A;
    --strip-bg: linear-gradient(100deg, #5B1A55 0%, #8E3480 55%, #B8577F 100%);
    --strip-ink: #FFF3F7;
    --ring-a: #D35BD0;
    --ring-b: #B95397;
    --ring-c: #F6BCCD;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0A10;
  --bg-alt: #151018;
  --surface: #1B141E;
  --text: #F7EAF0;
  --muted: #C3AEBC;
  --line: #2E2331;
  --accent: #F2B3CB;
  --accent-ink: #1A0F1C;
  --accent-soft: #2A1A2A;
  --strip-bg: linear-gradient(100deg, #5B1A55 0%, #8E3480 55%, #B8577F 100%);
  --strip-ink: #FFF3F7;
  --ring-a: #D35BD0;
  --ring-b: #B95397;
  --ring-c: #F6BCCD;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s, color .25s;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 500; }
h1, h2 { font-family: var(--f-serif); letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: .6rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .9rem;
}
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.2 var(--f-sans); text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .15s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: #fff; color: #5B1A55; }
.btn-light:hover { background: #FFF0F6; }
.btn-sm { min-height: 40px; padding: .55rem 1.1rem; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; min-width: 0; }
.brand-ring { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-script { font-family: var(--f-script); font-size: 1.85rem; line-height: .9; color: var(--text); }
.brand-sub { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: .5rem .75rem; border-radius: 999px;
}
.nav a:not(.btn):hover { background: var(--accent-soft); }
.nav-cta { margin-left: 6px; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.tool {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; font: 600 .78rem var(--f-sans); letter-spacing: .06em;
}
.tool:hover { border-color: var(--accent); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: block; } .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-moon { display: none; }
  :root:not([data-theme="light"]) .i-sun { display: block; }
}

.menu-toggle { display: none; gap: 4px; align-content: center; }
.menu-toggle span { display: block; width: 18px; height: 1.8px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem .75rem; font-size: 1rem; border-radius: 12px; }
  .nav-cta { margin: 10px 0 0; }
}
@media (max-width: 380px) {
  .brand-sub { display: none; }
  .brand-ring { width: 34px; height: 34px; }
  .tool { width: 40px; height: 40px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vmax; height: 70vmax; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ring-c) 22%, transparent), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 34ch; margin: 1.2rem 0 1.8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.values { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 2rem; font-size: .85rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.values li { display: inline-flex; align-items: center; gap: 8px; }
.values li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ring-a); }

.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; display: grid; place-items: center; }
.hero-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: drift 24s linear infinite; }
.hero-mark { position: relative; text-align: center; }
.mark-script { display: block; font-family: var(--f-script); font-size: clamp(3.2rem, 9vw, 5.2rem); line-height: 1; color: var(--text); }
.mark-sub { display: block; margin-top: .6rem; font-size: clamp(.65rem, 1.6vw, .8rem); letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
@keyframes drift { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-ring { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; max-width: 300px; }
  .hero-copy { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-ctas, .values { justify-content: center; }
}
@media (max-width: 480px) {
  .hero-art { max-width: 240px; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------- Strip ---------- */
.strip { background: var(--strip-bg); color: var(--strip-ink); }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.strip p { margin: 0; font-family: var(--f-serif); font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.25; }
@media (max-width: 640px) {
  .strip-inner { flex-direction: column; text-align: center; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.two-col > div:first-child { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col > div:first-child { position: static; }
}

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  display: flex; align-items: center; gap: 14px;
  padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); border-color: var(--ring-c); }
.card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem;
}
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

.pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pills li {
  padding: .95rem 1.4rem; border: 1.5px solid var(--text); border-radius: 999px;
  font-weight: 500; font-size: .98rem; background: var(--surface);
}
@media (max-width: 520px) { .pills li { flex: 1 1 100%; text-align: center; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.steps li {
  padding: 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.steps h3 { font-size: 1.1rem; margin: 14px 0 8px; }
.steps p { margin: 0; font-size: .95rem; }
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 500 1.4rem var(--f-serif); color: var(--accent);
  border: 1.5px solid var(--ring-a);
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); }
.contact-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center;
}
.contact-copy .btn { margin-top: .5rem; }
.contact-list { display: grid; gap: 10px; }
.contact-list a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere;
  transition: border-color .2s, transform .2s;
}
.contact-list a:hover { border-color: var(--accent); transform: translateX(2px); }
.contact-list small { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ci { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.ci svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 820px) {
  .contact-box { grid-template-columns: 1fr; }
  .contact-copy { text-align: center; }
  .contact-copy .btn { width: 100%; max-width: 360px; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 18px; text-align: center; justify-items: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; }
.crisis { max-width: 62ch; font-size: .85rem; color: var(--muted); margin: 0; }
.fine { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 640px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar .btn { min-height: 46px; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
