/* brianmiller.ai — site styles */

:root {
  --paper: #f4ede3;        /* matches the portrait sketch background */
  --paper-2: #efe6d9;
  --card: #faf6f0;
  --ink: #1c1a17;
  --ink-2: #4a453e;
  --ink-3: #847c70;
  --rule: #d9cfc0;
  --accent: #b5462b;       /* book-cover orange, muted */

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --narrow: 680px;
  --gutter: clamp(16px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, .quote blockquote { text-wrap: balance; }
a { color: inherit; }

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

/* Placeholder marker — anything waiting on Brian's input */
.ph {
  background: #fde68a;
  color: #5b4300;
  border-radius: 3px;
  padding: 0 .3em;
  font-style: normal;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.eyebrow {
  font: 500 11px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 28px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 16px; z-index: 10;
  display: flex; justify-content: center;
  margin-top: 16px;
}
.nav__pill {
  display: flex; align-items: center; gap: 2px;
  padding: 5px;
  background: rgba(250, 246, 240, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 2px 14px rgba(60, 45, 20, .06);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__pill::-webkit-scrollbar { display: none; }
.nav__pill a {
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav__pill a:hover { background: var(--paper-2); color: var(--ink); }
.nav__pill .nav__home {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  padding: 3px 14px 5px;
}
.nav__pill .nav__cta { background: var(--ink); color: var(--card); }
.nav__pill .nav__cta:hover { background: var(--ink-2); color: var(--card); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(56px, 10vw, 110px); padding-bottom: clamp(64px, 9vw, 104px); }
.hero__portrait {
  width: clamp(168px, 22vw, 220px);
  height: auto;
  margin: 0 auto 40px;
  border-radius: 50%;
}
.hero h1 {
  font: 400 clamp(38px, 5.6vw, 70px)/1.04 var(--serif);
  letter-spacing: -.015em;
  margin: 0 auto;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--ink-2); }
.hero__lede {
  max-width: 560px;
  margin: 32px auto 0;
  color: var(--ink-2);
  font-size: 18px;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

.btn {
  display: inline-block;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background .2s, color .2s;
}
.btn--solid { background: var(--ink); color: var(--card); }
.btn--solid:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--ghost:hover { background: var(--ink); color: var(--card); }

/* ---------- Brand strip ---------- */
.brands {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0 40px;
  text-align: center;
}
/* Logos drift by on one line; the list is duplicated in the HTML so the loop is seamless */
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
}
/* Soft fade at both edges (overlays rather than mask-image, which stalls the animation in some mobile browsers) */
.marquee::before, .marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0; z-index: 1;
  width: 12%;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--paper), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--paper), transparent); }
.logos {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex: none; align-items: center;
  gap: clamp(48px, 6vw, 80px);
  padding-right: clamp(48px, 6vw, 80px);
  animation: marquee 45s linear infinite;
  will-change: transform;
}
/* Pause on hover only where a real pointer exists; on phones a tap would otherwise freeze it */
@media (hover: hover) {
  .marquee:hover .logos { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-100%); } }
.logos img {
  height: var(--h, 26px);
  width: auto;
  max-width: none;
  filter: brightness(0);   /* one ink color, whatever the source colors */
  opacity: .62;
  transition: opacity .2s;
}
.logos li:hover img { opacity: .9; }

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section__head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head h2 {
  font: 400 clamp(31px, 3.9vw, 46px)/1.08 var(--serif);
  letter-spacing: -.01em;
  margin: 0 auto;
  max-width: 18ch;
}
.section__head h2 em { font-style: italic; }
.section__head h2 + p { color: var(--ink-2); max-width: 540px; margin: 20px auto 0; }

/* ---------- Now: role cards ---------- */
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 920px; margin: 0 auto; }
.roles__note { text-align: center; color: var(--ink-3); font-size: 15px; max-width: 560px; margin: 36px auto 0; }
.role {
  background: var(--card);
  border-radius: 14px;
  padding: 32px 30px 34px;
}
.role__org { font: 400 29px/1.1 var(--serif); margin: 0 0 14px; }
.role__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--ink-3);
  margin-bottom: 12px;
}
.role p { margin: 0; font-size: 15.5px; color: var(--ink-2); }

/* ---------- Speaking (editorial split) ---------- */
.speaking { background: var(--paper-2); }
.speak {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.speak__aside { position: sticky; top: 100px; }
.speak__aside h2 {
  font: italic 400 clamp(32px, 4vw, 48px)/1.06 var(--serif);
  margin: 0;
}
.speak__aside .btn { margin-top: 32px; }
.speak__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.speak__btns .btn { margin-top: 32px; }
.book .speak__btns .btn { margin-top: 8px; }
.teach__more { margin: 48px 0 0; }
.speak__intro { font-size: 19px; color: var(--ink); margin: 0 0 40px; }

.talks { list-style: none; margin: 0 0 56px; padding: 0; counter-reset: talk; }
.talks li {
  counter-increment: talk;
  display: grid; grid-template-columns: 44px 1fr;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.talks li:last-child { border-bottom: 1px solid var(--rule); }
.talks li::before {
  content: counter(talk, decimal-leading-zero);
  font: 400 15px/1.9 var(--serif);
  color: var(--accent);
}
.talks h3 { font: 400 23px/1.2 var(--serif); margin: 0 0 6px; }
.talks p { margin: 0; font-size: 15.5px; color: var(--ink-2); }

.stages { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0 0 56px; }
.stages .eyebrow { grid-column: 1 / -1; }
.stages div { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.stages span { display: block; color: var(--ink-3); font-size: 13px; }

.quote {
  margin: 0;
  font: italic 400 clamp(22px, 2.2vw, 26px)/1.32 var(--serif);
}
.quote blockquote { margin: 0; }
.quote figcaption {
  font: 400 13px/1.4 var(--sans);
  font-style: normal;
  color: var(--ink-3);
  margin-top: 14px;
  letter-spacing: .04em;
}

/* ---------- Books ---------- */
.book {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.book__img { margin: 0 -4%; }
.book__img img { width: 100%; height: auto; mix-blend-mode: multiply; }
.book h2 { font: 400 clamp(30px, 3.6vw, 43px)/1.08 var(--serif); margin: 0 0 22px; }
.book h2 em { font-style: italic; }
.book p:not(.eyebrow) { color: var(--ink-2); margin: 0 0 18px; }
.book__facts { list-style: none; padding: 0; margin: 28px 0 32px; border-top: 1px solid var(--rule); }
.book__facts li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px;
}
.book__facts li span:last-child { color: var(--ink-3); text-align: right; }

/* ---------- Teaching (sub-section of Speaking) ---------- */
.teach {
  text-align: center;
  margin-top: clamp(80px, 10vw, 120px);
  padding-top: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--rule);
}
.teach__title { font: 400 clamp(28px, 3.2vw, 38px)/1.1 var(--serif); margin: 0; }
.teach__title em { font-style: italic; }
.teach__intro { color: var(--ink-2); max-width: 520px; margin: 18px auto 48px; }
.teach .quote { max-width: 820px; margin: 0 auto; font-size: clamp(23px, 2.6vw, 31px); line-height: 1.22; }
.teach__schools {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 40px;
  max-width: 980px; margin: 56px auto 0; padding-top: 32px; border-top: 1px solid var(--rule);
  font-size: 15px; color: var(--ink-2); text-align: left;
}
.teach__schools strong { display: block; font: 400 23px/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.work a { text-decoration: none; display: block; }
.work img { width: 100%; height: auto; border-radius: 6px; aspect-ratio: 1; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.work a:hover img { transform: scale(.985); opacity: .92; }
.work-more { text-align: center; margin-top: 48px; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact h2 { font: 400 clamp(40px, 5.4vw, 66px)/1.02 var(--serif); margin: 0 0 24px; }
.contact h2 em { font-style: italic; }
.contact p { color: var(--ink-2); max-width: 480px; margin: 0 auto 36px; }
.contact__links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.footer {
  border-top: 1px solid var(--rule);
  padding-top: 28px; padding-bottom: 40px;
  font-size: 13px; color: var(--ink-3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .roles { grid-template-columns: 1fr; }
  .teach__schools { grid-template-columns: 1fr; }
  .speak, .book { grid-template-columns: 1fr; }
  .speak__aside { position: static; }
  .book__img { max-width: 520px; margin: 0 auto; }
  .work { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .stages { grid-template-columns: 1fr; }
  .logos img { height: calc(var(--h, 26px) * .8); }
  .logos { animation-duration: 30s; }
  .nav__pill a { padding: 6px 8px; font-size: 12.5px; }
  .nav__pill .nav__home { font-size: 15px; padding: 3px 8px 5px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logos { animation: none; }
  .logos[aria-hidden] { display: none; }
  .marquee { overflow-x: auto; }
  * { transition: none !important; }
}

/* =========================================================
   Speaking page
   ========================================================= */
.nav__pill a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }

.sp-hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px clamp(40px, 6vw, 88px);
  align-items: end;
  padding-top: clamp(64px, 9vw, 110px);
  padding-bottom: clamp(40px, 5vw, 56px);
}
.sp-hero h1 {
  font: 400 clamp(38px, 4.9vw, 62px)/1.05 var(--serif);
  letter-spacing: -.015em;
  margin: 0;
}
.sp-hero h1 em { font-style: italic; color: var(--ink-2); }
.sp-hero__lede { font-size: 17px; color: var(--ink-2); margin: 0; }
.sp-hero__actions { justify-content: flex-start; margin-top: 28px; }
.sp-photo { margin: 0 auto clamp(64px, 8vw, 96px); }
.sp-photo img { width: 100%; height: auto; border-radius: 14px; }
.sp-photo figcaption { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

.glance { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.glance__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  font: 400 19px/1.3 var(--serif);
}
.glance__grid > div { padding: 32px 24px 34px; border-left: 1px solid var(--rule); }
.glance__grid > div:first-child { border-left: 0; padding-left: 0; }
.glance__grid .eyebrow { margin-bottom: 14px; }

/* Talks */
.talk-list { list-style: none; margin: 0; padding: 0; counter-reset: talk; }
.talk {
  counter-increment: talk;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 24px clamp(32px, 6vw, 80px);
  padding: clamp(40px, 5vw, 56px) 0;
  border-top: 1px solid var(--rule);
}
.talk:last-child { border-bottom: 1px solid var(--rule); }
.talk__head::before {
  content: counter(talk, decimal-leading-zero);
  display: block;
  font: 400 17px/1 var(--serif);
  color: var(--accent);
  margin-bottom: 18px;
}
.talk__head h3 { font: 400 clamp(26px, 2.8vw, 33px)/1.1 var(--serif); margin: 0 0 14px; }
.talk__sub { font: italic 400 19px/1.38 var(--serif); color: var(--ink-2); margin: 0; }
.talk__body > p:first-child { margin-top: 0; }
.talk__body p { color: var(--ink-2); }
.talk__label {
  font: 500 11px/1 var(--sans) !important;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3) !important;
  margin: 28px 0 12px;
}
.talk__body ul { margin: 0; padding: 0; list-style: none; }
.talk__body li { padding: 9px 0 9px 22px; border-top: 1px solid var(--rule); position: relative; font-size: 15.5px; }
.talk__body li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.talk__fit { font-size: 15px; margin: 24px 0 0; }
.talk__fit span { color: var(--ink-3); margin-right: 8px; }

/* Formats */
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.format { background: var(--card); border-radius: 14px; padding: 28px 24px 30px; }
.format h3 { font: 400 23px/1.12 var(--serif); margin: 0 0 6px; }
.format__len { font-size: 13px; color: var(--accent); margin: 0 0 16px; letter-spacing: .02em; }
.format p:last-child { margin: 0; font-size: 15px; color: var(--ink-2); }

/* Past stages + testimonials */
.stages--full { grid-template-columns: 1fr 1fr; }
.past-talks {
  list-style: none; margin: 0 0 56px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.past-talks li {
  font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px;
}
.testimonials { display: grid; gap: 40px; }

/* Teaching */
.schools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.school { background: var(--card); border-radius: 14px; padding: 32px 30px 34px; }
.school__years { font-size: 13px; color: var(--accent); margin: 0 0 10px; }
.school h3 { font: 400 26px/1.12 var(--serif); margin: 0 0 18px; }
.school__role { font-weight: 500; font-size: 15px; margin: 20px 0 4px; }
.school h3 + .school__role { margin-top: 0; }
.school p:not([class]) { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.student-quotes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  max-width: 1040px; margin: clamp(56px, 7vw, 88px) auto 0;
}
.student-quotes .quote { font-size: 20px; }

/* Organizer kit */
.kit { display: grid; grid-template-columns: 8fr 4fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.kit__bios { display: grid; gap: 16px; }
.bio { background: var(--card); border-radius: 14px; padding: 26px 28px 28px; }
.bio__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.bio__head .eyebrow { margin: 0; }
.bio p:not(.eyebrow) { margin: 0 0 12px; font-size: 15.5px; color: var(--ink-2); }
.bio p:last-child { margin-bottom: 0; }
.bio__copy {
  font: 500 12px/1 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.bio__copy:hover { border-color: var(--ink); }
.kit__photo { margin: 0; text-align: center; }
.kit__photo img { width: 100%; max-width: 300px; height: auto; margin: 0 auto 20px; border-radius: 50%; }
.kit__photo figcaption { display: grid; gap: 12px; justify-items: center; font-size: 13px; }

#book .eyebrow { margin-bottom: 28px; }

@media (max-width: 900px) {
  .sp-hero { grid-template-columns: 1fr; }
  .glance__grid { grid-template-columns: 1fr 1fr; }
  .glance__grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .glance__grid > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .talk { grid-template-columns: 1fr; }
  .formats { grid-template-columns: 1fr 1fr; }
  .schools, .student-quotes, .kit { grid-template-columns: 1fr; }
  .kit__photo { max-width: 300px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .glance__grid { grid-template-columns: 1fr; font-size: 19px; }
  .glance__grid > div { border-left: 0; padding: 22px 0; }
  .glance__grid > div + div { border-top: 1px solid var(--rule); }
  .formats, .stages--full { grid-template-columns: 1fr; }
}

/* =========================================================
   Books page
   ========================================================= */
.bk-hero {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(64px, 9vw, 110px);
  padding-bottom: clamp(56px, 7vw, 88px);
}
.bk-hero h1 {
  font: 400 clamp(38px, 4.9vw, 62px)/1.05 var(--serif);
  letter-spacing: -.015em;
  margin: 0;
}
.bk-hero h1 em { font-style: italic; color: var(--ink-2); }
.bk-hero__lede { font-size: 17px; color: var(--ink-2); max-width: 520px; margin: 28px 0 0; }
.bk-hero__img img, .bk-editions img, .bk-feature__img img {
  width: 100%; height: auto;
  mix-blend-mode: multiply;   /* white product-shot backgrounds melt into the paper */
}

.glance__grid--3 { grid-template-columns: repeat(3, 1fr); }

.bk-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.bk-feature h2 { font: 400 clamp(30px, 3.6vw, 43px)/1.08 var(--serif); margin: 0 0 22px; }
.bk-feature h2 em { font-style: italic; }
.bk-feature__text > p:not(.eyebrow) { color: var(--ink-2); margin: 0 0 24px; }
.bk-feature .book__facts { margin: 8px 0 0; }
.bk-feature--flip .bk-feature__img { order: -1; }
.bk-feature__img--photo img { mix-blend-mode: normal; border-radius: 14px; }

.bk-editions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-editions figure { margin: 0; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); }
.reviews .quote { font-size: clamp(20px, 1.9vw, 23px); }

.spreads {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: clamp(56px, 7vw, 88px);
}
.spreads img { width: 100%; height: auto; border-radius: 12px; }

.articles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.article { background: var(--card); border-radius: 14px; padding: 32px 30px 34px; }
.article__meta { font-size: 13px; color: var(--accent); margin: 0 0 12px; }
.article h3 { font: 400 clamp(24px, 2.4vw, 29px)/1.15 var(--serif); margin: 0 0 16px; }
.article p:not([class]) { font-size: 15.5px; color: var(--ink-2); margin: 0; }
.article__pull { font: italic 400 21px/1.3 var(--serif); margin: 20px 0 0; }

.bk-tdc-quote { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .bk-hero, .bk-feature { grid-template-columns: 1fr; }
  .bk-hero__img { max-width: 520px; }
  .bk-feature--flip .bk-feature__img { order: 0; }
  .reviews, .articles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .glance__grid--3 { grid-template-columns: 1fr; }
  .spreads { grid-template-columns: 1fr; }
}
