/* The Clown Professor — design tokens from the handoff spec */
:root {
  --yellow: #FFD23F;
  --blue: #2E7DC2;
  --blue-dark: #256aa8;
  --blue-pale: #EAF3FF;
  --blue-dashed: #7FB2DC;
  --red: #E23B31;
  --red-dark: #c92e25;
  --ink: #14110d;
  --cream: #FFF8E4;
  --muted: #6b6459;
  --muted-light: #8d8577;
  --muted-footer: #b6ab8c;
  --display: 'Baloo 2', cursive;
  --body: Nunito, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--yellow);
  font-family: var(--body);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

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

a { color: #1F5FBF; }
a:hover { color: var(--red); }

button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.page {
  min-height: 100vh;
  padding: 28px 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* ---------- header ---------- */

.badge {
  width: 100%;
  max-width: 460px;
  height: auto;
}

.subhead {
  max-width: 560px;
  margin: -6px 0 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 4.6vw, 24px);
  line-height: 1.35;
  text-wrap: pretty;
}

/* ---------- today's lectures ---------- */

.lectures {
  width: 100%;
  max-width: 560px;
  background: var(--blue);
  border: 4px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--ink);
  overflow: hidden;
}

.lectures__head {
  padding: 20px 22px 14px;
  text-align: center;
}

.lectures__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.05;
  color: #fff;
}

.lectures__date {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}

.slots {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  text-align: center;
}

.slot__time {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 7.5vw, 36px);
  line-height: 1.05;
  color: var(--red);
}

.slot__place { font-weight: 800; font-size: 19px; }
.slot__sub { font-weight: 600; font-size: 16px; color: var(--muted); }

.slot--live { box-shadow: 0 0 0 4px var(--yellow) inset; }

.nextup {
  background: var(--yellow);
  border-top: 4px solid var(--ink);
  padding: 14px 20px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 4.4vw, 21px);
}

.lectures__empty {
  margin: 0;
  padding: 4px 22px 22px;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.5;
  color: var(--blue-pale);
  text-wrap: pretty;
}

.lectures__foot {
  border-top: 3px dashed var(--blue-dashed);
  padding: 12px 20px;
  text-align: center;
}

.linkbutton {
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  color: var(--yellow);
  text-decoration: underline;
}
.linkbutton:hover { color: #fff; }

/* ---------- tip ---------- */

.tip {
  width: 100%;
  max-width: 560px;
  background: var(--red);
  color: #fff;
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink);
  padding: 20px 22px;
  text-align: center;
  text-decoration: none;
  display: block;
}
.tip:hover { background: var(--red-dark); color: #fff; }

.tip__title {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 6.5vw, 32px);
  line-height: 1.1;
}

.tip__sub {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-top: 4px;
}

/* ---------- find me ---------- */

.findme {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.findme__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  text-align: center;
}

.findme__grid {
  display: grid;
  /* Two across wherever the what3words address fits; stacks on tiny screens. */
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.alcove {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  min-width: 0;
  color: var(--ink);
}
.alcove:hover { background: #fff; }

.alcove__name { font-family: var(--display); font-weight: 800; font-size: 19px; }
.alcove__w3w { font-weight: 700; font-size: clamp(13px, 4vw, 15px); color: var(--red); }
.alcove__hint { font-weight: 700; font-size: 13px; color: var(--muted-light); }

/* ---------- about ---------- */

.about {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.about__photo {
  width: 100%;
  height: 100%;
  min-height: clamp(240px, 56vw, 330px);
  border: 4px solid var(--ink);
  border-radius: 22px;
  object-fit: cover;
  object-position: 50% 18%;
}

.about__card {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  justify-content: center;
}

.about__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 6.5vw, 32px);
  line-height: 1.1;
  color: var(--blue);
}

.about__body {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.55;
  color: #3a352d;
  text-wrap: pretty;
}

.about__aside {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- photo grid ---------- */

.photos {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photos img {
  width: 100%;
  object-fit: cover;
  border: 4px solid var(--ink);
  border-radius: 18px;
}

.photos__small { height: clamp(140px, 34vw, 190px); }

.photos__wide {
  grid-column: span 2;
  height: clamp(170px, 42vw, 230px);
}

/* ---------- link cards ---------- */

.links {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink);
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.link__title {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.1;
}

.link__sub { font-weight: 700; font-size: 16px; }
.link__sub--blue { color: var(--blue); }

.link--busk {
  background: var(--blue);
  color: #fff;
  padding: 18px 22px;
  gap: 4px;
}
.link--busk:hover { background: var(--blue-dark); color: #fff; }
.link--busk .link__title { font-size: clamp(23px, 5.6vw, 28px); }

.link--fringe {
  background: var(--cream);
  color: var(--ink);
  padding: 20px 22px;
}
.link--fringe:hover { background: #fff; color: var(--ink); }
.link--fringe .link__title { font-size: clamp(21px, 5.2vw, 26px); }

.link__logo { width: 100%; max-width: 260px; }

/* ---------- footer ---------- */

.footer {
  width: 100%;
  max-width: 560px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 22px 22px 0 0;
  padding: 20px 22px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.footer__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

.footer__links a { color: var(--yellow); text-decoration: none; }
.footer__links a:hover { color: #fff; }

.footer__note {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted-footer);
}

/* ---------- modals ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 13, 0.72);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay[hidden] { display: none; }

.dialog {
  width: 100%;
  max-width: 560px;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
}

.dialog--wide { max-width: 900px; }

.dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 20px;
  background: var(--blue);
  border-bottom: 4px solid var(--ink);
}

.dialog__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  color: #fff;
}

.dialog__close {
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
}

.dialog__map { width: 100%; height: 340px; border: 0; display: block; }

.dialog__cal {
  width: 100%;
  height: min(70vh, 560px);
  border: 0;
  display: block;
  background: #fff;
}

.dialog__foot {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.dialog__w3w { margin: 0; font-weight: 800; font-size: 17px; }

.dialog__w3wlink {
  font-weight: 800;
  font-size: 16px;
  color: var(--red);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
