/* ============================================
   Dr. Dan Gubler — Design System
   Warm, editorial, credibility-forward.
   ============================================ */

:root {
  --cream: #f6f1ea;
  --cream-deep: #efe6d8;
  --paper: #fffdf9;
  --ink: #26221c;
  --ink-soft: #55503f;
  --ink-faint: #8b8471;
  --rust: #b5502f;
  --rust-dark: #963e21;
  --olive: #5c6b4f;
  --line: #e2d8c4;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--rust);
  color: #fff;
}
.btn-primary:hover { background: var(--rust-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-outline.on-dark {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.btn-outline.on-dark:hover { background: #fff; color: var(--ink); }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand span { color: var(--rust); }

nav.main-nav { display: flex; align-items: center; gap: 30px; }
nav.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
nav.main-nav a:hover { color: var(--ink); }
nav.main-nav .dropdown { position: relative; }
nav.main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 210px;
  box-shadow: 0 12px 28px rgba(38,34,28,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.15s ease;
}
nav.main-nav .dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
nav.main-nav .dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 3px;
  font-size: 14px;
}
nav.main-nav .dropdown-menu a:hover { background: var(--cream); }
.header-cta { display: flex; align-items: center; gap: 16px; }

.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.mobile-nav a {
  padding: 15px 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
#nav-toggle:checked ~ .mobile-nav { display: flex; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 90px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: 52px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--rust);
}
.hero .lede {
  font-size: 19px;
  color: var(--ink-soft);
  margin: 22px 0 30px;
  max-width: 48ch;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero .credibility {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero .credibility .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
}
.hero .credibility .stat span {
  font-size: 13px;
  color: var(--ink-faint);
}
.hero-media {
  position: relative;
}
.hero-media .frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(38,34,28,0.35);
  aspect-ratio: 4 / 3.2;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--ink);
  color: var(--cream);
  padding: 16px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.35;
  box-shadow: 0 16px 30px rgba(0,0,0,0.25);
  max-width: 230px;
}

/* ---------- Press bar ---------- */
.press-bar {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}
.press-bar .wrap {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.press-bar .label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.press-logos {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0.75;
}
.press-logos span {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Section shell ---------- */
section { padding: 96px 0; }
.section-head {
  max-width: 620px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 {
  font-size: 38px;
  margin-top: 12px;
}
.section-head p { margin-top: 16px; font-size: 17px; }

/* ---------- Pillars grid ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.pillar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px -18px rgba(38,34,28,0.25);
  border-color: var(--rust);
}
.pillar-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
}
.pillar-card h3 { font-size: 19.5px; }
.pillar-card p { font-size: 14.5px; margin-bottom: 4px; flex-grow: 1; }
.pillar-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--rust);
  letter-spacing: 0.01em;
}
.pillar-link:after { content: " →"; }

/* ---------- Secondary row ---------- */
.secondary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.mini-card {
  background: var(--cream-deep);
  border-radius: 10px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-card h4 { font-size: 17px; }
.mini-card p { font-size: 14px; margin-bottom: 6px; }
.mini-card a { font-size: 13.5px; font-weight: 700; color: var(--olive); }
.mini-card a:after { content: " →"; }

/* ---------- About teaser ---------- */
.about-teaser { background: var(--ink); color: var(--cream); }
.about-teaser .wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.about-teaser .frame {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.about-teaser .frame img { width: 100%; height: 100%; object-fit: cover; }
.about-teaser .eyebrow { color: #e3a483; }
.about-teaser h2 {
  color: #fff;
  font-size: 34px;
  margin: 12px 0 20px;
}
.about-teaser p { color: rgba(246,241,234,0.78); font-size: 17px; }
.about-teaser .credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}
.about-teaser .credentials span {
  border: 1px solid rgba(246,241,234,0.28);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: rgba(246,241,234,0.9);
}

/* ---------- Newsletter band ---------- */
.newsletter-band {
  background: var(--rust);
  color: #fff;
}
.newsletter-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 60px 32px;
}
.newsletter-band h2 { color: #fff; font-size: 30px; max-width: 480px; }
.newsletter-band p { color: rgba(255,255,255,0.85); margin-top: 10px; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: rgba(246,241,234,0.65);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(246,241,234,0.14);
}
footer .brand { color: var(--cream); }
footer .brand span { color: #e3a483; }
.footer-grid p { color: rgba(246,241,234,0.55); font-size: 14px; }
.footer-col h5 {
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14.5px;
  color: rgba(246,241,234,0.65);
  margin-bottom: 11px;
}
.footer-col a:hover { color: var(--cream); }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(246,241,234,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.social-row a:hover { background: rgba(246,241,234,0.12); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(246,241,234,0.45);
}
.footer-bottom a { color: rgba(246,241,234,0.55); }

/* ============================================
   Inner pages
   ============================================ */

.page-hero {
  padding: 56px 0 44px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: 42px; margin: 12px auto 16px; max-width: 780px; }
.page-hero p.lede { font-size: 18px; max-width: 620px; margin: 0 auto; }
.page-hero.align-left { text-align: left; }
.page-hero.align-left .lede { margin: 0; }

.content-section { max-width: 760px; margin: 0 auto; }
.content-section h2 { font-size: 27px; margin: 40px 0 14px; }
.content-section h2:first-child { margin-top: 0; }
.content-section h3 { font-size: 20px; margin: 28px 0 10px; }
.content-section p, .content-section li { font-size: 16.5px; color: var(--ink-soft); }
.content-section ul, .content-section ol { padding-left: 22px; }
.content-section li { margin-bottom: 8px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 38px;
  max-width: 640px;
  margin: 0 auto;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--rust);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: 13.5px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- Platform / link cards ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}
.platform-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.platform-card:hover { transform: translateY(-3px); box-shadow: 0 16px 26px -16px rgba(38,34,28,0.25); }
.platform-card .icon { font-size: 26px; display: block; margin-bottom: 10px; }

/* ---------- Episode list ---------- */
.episode-list { max-width: 760px; margin: 0 auto; }
.episode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.episode-row h4 { font-size: 17px; margin-bottom: 4px; }
.episode-row span { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- Events list ---------- */
.events-list { max-width: 760px; margin: 0 auto; }
.event-row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
}
.event-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--rust);
  min-width: 120px;
}
.event-row h4 { font-size: 17px; margin-bottom: 4px; }
.event-row p { margin: 0; font-size: 14px; }
.events-empty {
  text-align: center;
  padding: 50px 24px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-faint);
}

/* ---------- References search page ---------- */
.ref-search-wrap { max-width: 720px; margin: 0 auto 28px; }
#ref-search {
  width: 100%;
  padding: 16px 20px;
  font-size: 17px;
  font-family: var(--font-body);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
#ref-search:focus { outline: none; border-color: var(--rust); }
.ref-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 980px;
  margin: 22px auto 0;
}
.ref-chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ref-chip.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.ref-count-bar {
  max-width: 980px;
  margin: 22px auto 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-weight: 600;
}
.ref-grid {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ref-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 20px;
}
.ref-card summary {
  cursor: pointer;
  padding: 16px 0;
  list-style: none;
}
.ref-card summary::-webkit-details-marker { display: none; }
.ref-card-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ref-tag {
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.ref-card h3 { font-size: 16.5px; flex: 1; min-width: 200px; }
.ref-meta { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.ref-ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.ref-ig-btn:hover { opacity: 0.9; }
.ref-ig-btn.is-facebook { background: #1877F2; }
.ref-citation-list { padding: 0 0 18px; margin: 0; list-style: none; }
.ref-citation {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 10px 0 10px 0;
  border-top: 1px solid var(--line);
}
.ref-citation a { color: var(--rust); word-break: break-all; }
.ref-no-cite { padding-bottom: 18px; font-size: 13.5px; }
.ref-empty {
  display: none;
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { order: -1; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .secondary-row { grid-template-columns: 1fr; }
  .about-teaser .wrap { grid-template-columns: 1fr; }
  .about-teaser .frame { max-width: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.main-nav { display: none; }
  .nav-toggle { display: flex; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 981px) {
  .mobile-nav { display: none !important; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .hero h1 { font-size: 36px; }
  .hero .lede { font-size: 17px; }
  section { padding: 64px 0; }
  .section-head h2 { font-size: 28px; }
  .pillars { grid-template-columns: 1fr; }
  .press-bar .wrap { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-band .wrap { padding: 44px 20px; }
  .page-hero h1 { font-size: 30px; }
  .form-card { padding: 26px 20px; }
  .form-two-col { grid-template-columns: 1fr; gap: 0; }
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .ref-card-head { gap: 8px; }
  .event-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
