/* The CBT Lab — visual system
   thoughts=blue · feelings=orange · behaviors=green · physiology=red */

:root {
  --thought: #2764e7;
  --feeling: #ef7622;
  --behavior: #199653;
  --physio: #d74343;
  --ink: #192129;
  --ink-soft: #58626b;
  --paper: #f7f3eb;
  --paper-deep: #eee7da;
  --card: #fffefa;
  --line: #d9d2c6;
  --dark: #172119;
  --max: 1120px;
  --shadow: 0 18px 60px rgba(32, 35, 29, 0.09);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link {
  position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-160%);
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(14px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-size: 1.14rem; font-weight: 850; letter-spacing: -0.035em; text-decoration: none;
}
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots span { display: block; width: 7px; height: 7px; border-radius: 50%; }
.dots span:nth-child(1) { background: var(--thought); }
.dots span:nth-child(2) { background: var(--feeling); }
.dots span:nth-child(3) { background: var(--behavior); }
.dots span:nth-child(4) { background: var(--physio); }
.links { display: flex; align-items: center; gap: 28px; }
.links a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 650; text-decoration: none; }
.links a:hover { color: var(--ink); }
.links .ask-btn {
  padding: 9px 16px; color: #fff; background: var(--ink); border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease;
}
.links .ask-btn:hover { color: #fff; background: #303a42; transform: translateY(-1px); }

/* Type */
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
h1 { font-size: clamp(3rem, 6.3vw, 5.8rem); max-width: 11ch; }
h2 { font-size: clamp(2.15rem, 4vw, 3.65rem); }
h3 { font-size: 1.28rem; }
.eyebrow, .kicker {
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
  color: var(--ink-soft); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase;
}
.eyebrow.light { color: #a9c8ad; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--behavior); box-shadow: 0 0 0 5px rgba(25, 150, 83, 0.11); }

/* Hero */
.hero-section {
  position: relative; overflow: hidden; padding: 92px 0 88px;
  background:
    radial-gradient(circle at 82% 18%, rgba(39, 100, 231, 0.08), transparent 24rem),
    radial-gradient(circle at 72% 90%, rgba(239, 118, 34, 0.07), transparent 20rem),
    var(--paper);
}
.hero-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.25;
  background-image: radial-gradient(rgba(25, 33, 41, 0.18) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
}
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr); gap: 72px; align-items: center; }
.hero h1 span { color: var(--thought); }
.hero .lede { max-width: 62ch; margin-top: 28px; color: var(--ink-soft); font-size: clamp(1.08rem, 1.7vw, 1.25rem); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 20px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 750; text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--ink); box-shadow: 0 8px 24px rgba(25, 33, 41, 0.15); }
.btn-primary:hover { background: #2d3740; box-shadow: 0 10px 28px rgba(25, 33, 41, 0.19); }
.btn-ghost { color: var(--ink); background: rgba(255, 254, 250, 0.65); border: 1px solid var(--line); }
.credentials { display: flex; align-items: center; gap: 12px; margin-top: 34px; }
.credential-mark {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 50%;
  font-size: 0.76rem; font-weight: 850;
}
.credentials strong, .credentials small { display: block; }
.credentials strong { font-size: 0.92rem; }
.credentials small { margin-top: 1px; color: var(--ink-soft); font-size: 0.77rem; }

/* CSS-rendered whiteboard model */
.model-figure {
  position: relative; min-height: 480px; display: grid; place-items: center;
  padding: 58px 36px 40px; background: var(--card); border: 1px solid var(--line); border-radius: 6px 26px 10px 18px;
  box-shadow: var(--shadow); transform: rotate(1deg);
}
.model-figure::after {
  content: ""; position: absolute; right: -13px; bottom: -13px; width: 80%; height: 72%; z-index: -1;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 20px; transform: rotate(2deg);
}
.paper-note {
  position: absolute; top: 24px; left: 28px; padding: 5px 10px;
  color: var(--ink-soft); background: #f0e394; border: 1px solid #d8ca76;
  box-shadow: 0 3px 8px rgba(47, 46, 35, 0.08); transform: rotate(-2deg);
  font-size: 0.68rem; font-weight: 850; letter-spacing: 0.1em;
}
.model-ring {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  width: min(320px, 88vw); aspect-ratio: 1; overflow: hidden;
  background: #fff; border: 3px solid var(--ink); border-radius: 50%; transform: rotate(-1deg);
}
.model-ring::before, .model-ring::after { content: ""; position: absolute; z-index: 2; background: var(--ink); }
.model-ring::before { left: 50%; top: 6%; bottom: 6%; width: 2px; transform: translateX(-50%); }
.model-ring::after { top: 50%; left: 6%; right: 6%; height: 2px; transform: translateY(-50%); }
.quadrant { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 16px; text-align: center; }
.quadrant strong { font-size: 1rem; letter-spacing: -0.02em; }
.quadrant span { opacity: 0.75; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; font-style: italic; }
.quadrant-thought { color: var(--thought); }
.quadrant-feeling { color: var(--feeling); }
.quadrant-physio { color: var(--physio); }
.quadrant-behavior { color: var(--behavior); }
.model-figure figcaption { position: absolute; bottom: 20px; color: var(--ink-soft); font-size: 0.78rem; }

.topic-ticker { border-block: 1px solid var(--line); background: var(--card); }
.topic-ticker .wrap { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.topic-ticker span { color: var(--ink-soft); font-size: 0.77rem; font-weight: 780; letter-spacing: 0.09em; text-transform: uppercase; }
.topic-ticker i { width: 4px; height: 4px; background: var(--line); border-radius: 50%; }

/* Model section */
.model-section { padding: 120px 0; }
.model-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 96px; align-items: start; }
.sticky-copy { position: sticky; top: 118px; }
.section-heading h2 { max-width: 13ch; }
.section-heading > p, .sticky-copy > p { max-width: 55ch; margin-top: 24px; color: var(--ink-soft); font-size: 1.05rem; }
.text-link { display: inline-flex; gap: 8px; margin-top: 28px; color: var(--ink); font-weight: 780; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.model-steps { list-style: none; }
.model-steps li {
  display: grid; grid-template-columns: 58px 1fr; gap: 20px; padding: 30px 0;
  border-top: 1px solid var(--line);
}
.model-steps li:last-child { border-bottom: 1px solid var(--line); }
.step-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; font-weight: 800; }
.model-steps h3 { margin-bottom: 8px; font-size: 1.42rem; }
.model-steps p { max-width: 52ch; color: var(--ink-soft); }
.step-thought .step-number, .step-thought h3 { color: var(--thought); }
.step-feeling .step-number, .step-feeling h3 { color: var(--feeling); }
.step-physio .step-number, .step-physio h3 { color: var(--physio); }
.step-behavior .step-number, .step-behavior h3 { color: var(--behavior); }

/* Topics */
.topics-section { padding: 112px 0 120px; background: var(--card); border-block: 1px solid var(--line); }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 48px; }
.section-heading-row > p { max-width: 38ch; margin: 0 0 5px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card {
  position: relative; min-height: 292px; display: flex; flex-direction: column;
  padding: 28px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.card:hover { z-index: 1; background: #fff; transform: translateY(-4px); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 42px; height: 4px; }
.card.t-thought::before { background: var(--thought); }
.card.t-feeling::before { background: var(--feeling); }
.card.t-behavior::before { background: var(--behavior); }
.card.t-physio::before { background: var(--physio); }
.card-index { margin-bottom: auto; color: #929990; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; }
.card h3 { max-width: 15ch; margin: 24px 0 12px; font-size: 1.25rem; }
.card p { color: var(--ink-soft); font-size: 0.91rem; }
.card-tag { margin-top: 24px; color: var(--ink-soft); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }

/* Podcast & signup */
.podcast-section { padding: 104px 0; color: #eff6ef; background: var(--dark); }
.pod { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr); gap: 80px; align-items: center; }
.pod-copy h2 { max-width: 11ch; }
.pod-copy > p { max-width: 50ch; margin-top: 22px; color: #b7c5b8; font-size: 1.02rem; }
.episode-types { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.episode-types span { padding: 7px 11px; color: #cfdbd0; border: 1px solid #415245; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.signup { padding: 42px; color: var(--ink); background: var(--paper); border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2); }
.signup-label { color: var(--behavior); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.signup h3 { margin-top: 12px; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.signup > p { max-width: 48ch; margin-top: 12px; color: var(--ink-soft); }
.signup form { display: flex; gap: 10px; margin-top: 24px; }
.signup input[type="email"] { min-width: 0; flex: 1; padding: 13px 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.signup button { padding: 13px 18px; color: #fff; background: var(--ink); border: 0; border-radius: 10px; font-weight: 780; cursor: pointer; }
.fine, .signup .fine { margin-top: 10px; color: #7e877f; font-size: 0.72rem; }
.bot-field { display: none !important; }

/* About */
.about-section { padding: 120px 0; }
.about { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr); gap: 92px; align-items: center; }
.about-card {
  position: relative; min-height: 430px; display: flex; flex-direction: column; justify-content: center;
  padding: 48px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 8px 28px 10px 20px;
  box-shadow: var(--shadow); transform: rotate(-1deg);
}
.about-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0.3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 32px;
}
.about-card-kicker { position: relative; color: var(--ink-soft); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.about-card p { position: relative; max-width: 12ch; margin-top: 34px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.5vw, 2.9rem); line-height: 1.12; letter-spacing: -0.03em; }
.drawn-lines { position: relative; display: flex; gap: 7px; margin-top: 42px; }
.drawn-lines span { width: 42px; height: 5px; border-radius: 999px; transform: rotate(-2deg); }
.drawn-lines span:nth-child(1) { background: var(--thought); }
.drawn-lines span:nth-child(2) { background: var(--feeling); }
.drawn-lines span:nth-child(3) { background: var(--behavior); }
.drawn-lines span:nth-child(4) { background: var(--physio); }
.about-copy h2 { margin-bottom: 26px; }
.about-copy p { max-width: 62ch; margin-top: 18px; color: var(--ink-soft); font-size: 1.02rem; }
.about-copy strong { color: var(--ink); }
.social-links { display: flex; gap: 24px; margin-top: 30px; }
.social-links a { font-weight: 780; text-underline-offset: 5px; }

/* Contact & forms */
.contact-section { padding: 112px 0; background: var(--paper-deep); border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1.18fr); gap: 80px; align-items: start; }
.contact-copy { padding-top: 24px; }
.contact-copy h2 { max-width: 11ch; }
.contact-copy > p { max-width: 50ch; margin-top: 24px; color: var(--ink-soft); font-size: 1rem; }
.contact-boundary { padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.82rem !important; }
.contact-boundary a { color: var(--ink); font-weight: 700; }
.ask-form { max-width: 680px; margin: 0 auto; padding: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 45px rgba(33, 39, 31, 0.06); }
.contact-form { width: 100%; max-width: none; }
.ask-form label { display: block; margin: 20px 0 7px; color: var(--ink); font-size: 0.83rem; font-weight: 750; }
.ask-form label:first-of-type { margin-top: 0; }
.ask-form label span { color: var(--ink-soft); font-weight: 500; }
.ask-form input, .ask-form textarea, .ask-form select {
  width: 100%; padding: 12px 13px; color: var(--ink); background: #fbfaf6;
  border: 1px solid var(--line); border-radius: 9px; outline: none;
}
.ask-form textarea { min-height: 136px; resize: vertical; }
.ask-form input:focus, .ask-form textarea:focus, .ask-form select:focus, .signup input:focus { border-color: var(--thought); box-shadow: 0 0 0 3px rgba(39, 100, 231, 0.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ask-form .check-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; cursor: pointer; }
.ask-form .check-row input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--thought); }
.ask-form .check-row span { color: var(--ink); font-weight: 550; }
.ask-form button {
  width: 100%; margin-top: 22px; padding: 13px; color: #fff; background: var(--ink);
  border: 0; border-radius: 10px; font-weight: 780; cursor: pointer;
}
.ask-form button:hover, .signup button:hover { background: #303a42; }
.ask-form .form-hint { margin-top: 9px; color: var(--ink-soft); font-size: 0.74rem; }

/* Ask & thanks pages */
.ask-hero { padding: 86px 0 42px; text-align: center; }
.ask-hero h1 { max-width: none; font-size: clamp(2.8rem, 6vw, 5rem); }
.ask-hero .section-lede { max-width: 62ch; margin: 18px auto 0; color: var(--ink-soft); }
.notice {
  max-width: 680px; margin: 24px auto 0; padding: 18px 20px;
  color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--feeling); border-radius: 10px;
  font-size: 0.82rem;
}
.thanks-hero { min-height: 68vh; display: grid; place-items: center; padding: 96px 0; text-align: center; }
.thanks-panel { max-width: 700px; margin: 0 auto; }
.thanks-panel h1 { max-width: none; font-size: clamp(2.7rem, 6vw, 5rem); }
.thanks-panel .section-lede { max-width: 62ch; margin: 22px auto 0; color: var(--ink-soft); }
.thanks-panel .hero-cta { justify-content: center; }

/* Disclaimer & footer */
.disclaimer-section { padding: 0 0 88px; background: var(--paper-deep); }
.disclaimer { display: grid; grid-template-columns: 0.72fr 1.2fr 1.2fr; gap: 32px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.disclaimer > strong { font-size: 1.02rem; }
.disclaimer p { color: var(--ink-soft); font-size: 0.79rem; }
.disclaimer a { font-weight: 700; }
footer { padding: 54px 0; color: #b9c2ba; background: #111812; }
.footer-layout { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 48px; align-items: start; }
.footer-logo { color: #f3f6f3; }
.footer-layout p { margin-top: 8px; font-size: 0.8rem; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.footer-links a { font-size: 0.82rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-meta { text-align: right; font-size: 0.78rem; }

/* Interaction and responsive behavior */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(39, 100, 231, 0.35); outline-offset: 3px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .model-figure { width: min(540px, 100%); justify-self: center; }
  .model-layout, .about, .contact-layout { grid-template-columns: 1fr; gap: 56px; }
  .sticky-copy { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pod { grid-template-columns: 1fr; gap: 48px; }
  .about-card { width: min(560px, 100%); min-height: 360px; }
  .contact-copy { padding-top: 0; }
  .disclaimer { grid-template-columns: 1fr 1fr; }
  .disclaimer > strong { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .wrap { width: min(100% - 32px, var(--max)); }
  .nav { min-height: 66px; }
  .links { gap: 8px; }
  .links a:not(.ask-btn) { display: none; }
  .links .ask-btn { padding: 8px 12px; font-size: 0.82rem; }
  .hero-section { padding: 68px 0 66px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .model-figure { min-height: 400px; padding-inline: 20px; }
  .model-ring { width: min(280px, 78vw); }
  .topic-ticker .wrap { gap: 12px; padding-block: 16px; }
  .topic-ticker i { display: none; }
  .model-section, .topics-section, .about-section, .contact-section { padding: 82px 0; }
  .model-steps li { grid-template-columns: 44px 1fr; gap: 12px; }
  .section-heading-row { display: block; margin-bottom: 34px; }
  .section-heading-row > p { margin-top: 18px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 255px; }
  .podcast-section { padding: 78px 0; }
  .signup { padding: 28px 22px; }
  .signup form { flex-direction: column; }
  .about-card { min-height: 330px; padding: 34px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .ask-form { padding: 26px 20px; }
  .disclaimer { grid-template-columns: 1fr; gap: 18px; }
  .footer-layout { grid-template-columns: 1fr; gap: 32px; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
