/* =========================================================
   Trees A Crowd — Homepage 2026
   Loaded only by homepage-2026.php. Everything is scoped to
   .tac-home / .tac-player so other pages are unaffected.
   Colours and font are the theme's own.
   ========================================================= */

.tac-home,
.tac-player {
  --tac-text: #404040;
  --tac-brown: #5d4a36;
  --tac-orange: #f16522;
  --tac-peach: #ffc688;
  --tac-cream: #faf2f1;
  --tac-white: #ffffff;
  font-family: "Encode Sans", sans-serif;
  color: var(--tac-brown);
}

.tac-home *,
.tac-player * {
  box-sizing: border-box;
}

/* Reset the theme's global p / heading / list rules inside the homepage */
.tac-home p,
.tac-player p {
  font-family: inherit;
  font-size: 17px;
  line-height: 1.5;
  color: inherit;
  margin: 0;
}

.tac-home h1,
.tac-home h2,
.tac-home h3 {
  font-family: inherit;
  font-weight: 700;
  margin: 0;
  text-rendering: optimizeLegibility;
}

.tac-home ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tac-home :focus-visible,
.tac-player :focus-visible {
  outline: 3px solid var(--tac-text);
  outline-offset: 3px;
}

.tac-wrap {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- Buttons ---------- */

.tac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tac-home a.tac-btn,
.tac-home a.tac-btn:visited {
  text-decoration: none;
}

.tac-home .tac-btn--orange,
.tac-home a.tac-btn--orange,
.tac-home a.tac-btn--orange:visited {
  background: var(--tac-orange);
  color: var(--tac-white);
  min-height: 56px;
  padding: 0 28px 0 24px;
  font-size: 19px;
}
.tac-home .tac-btn--orange:hover,
.tac-home a.tac-btn--orange:hover {
  background: #d9531a;
  color: var(--tac-white);
}

.tac-home .tac-btn--white {
  background: var(--tac-white);
  color: var(--tac-brown);
}
.tac-home .tac-btn--white:hover {
  background: var(--tac-peach);
}

.tac-home a.tac-btn--ghost-white,
.tac-home a.tac-btn--ghost-white:visited {
  border-color: var(--tac-white);
  color: var(--tac-white);
}
.tac-home a.tac-btn--ghost-white:hover {
  background: var(--tac-white);
  color: var(--tac-brown);
}

.tac-home a.tac-btn--brown,
.tac-home a.tac-btn--brown:visited {
  background: var(--tac-brown);
  color: var(--tac-white);
}
.tac-home a.tac-btn--brown:hover {
  background: #47382a;
  color: var(--tac-white);
}

.tac-home a.tac-btn--ghost-brown,
.tac-home a.tac-btn--ghost-brown:visited {
  border-color: var(--tac-brown);
  color: var(--tac-brown);
}
.tac-home a.tac-btn--ghost-brown:hover {
  background: var(--tac-brown);
  color: var(--tac-white);
}

/* Play / pause icon swap (any .tac-play or the player toggle) */
.tac-icon--pause { display: none; }
.is-playing > .tac-icon--play { display: none; }
.is-playing > .tac-icon--pause { display: inline; }

/* ---------- Hero ---------- */

.tac-hero {
  position: relative;
  background: var(--tac-cream) url("im/hero-bg.jpg") no-repeat 62% 40%;
  background-size: cover;
}
.tac-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 242, 241, 0.55);
}
.tac-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  /* clears the hanging logo from menu.php */
  padding-top: 76px;
  padding-bottom: 36px;
}
.tac-hero__copy {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tac-home .tac-hero__title {
  font-size: clamp(32px, 8.6vw, 58px);
  line-height: 1.07;
  letter-spacing: -0.01em;
  color: var(--tac-text);
  text-wrap: balance;
}
.tac-home .tac-hero__intro {
  font-size: 18px;
  line-height: 1.45;
  color: var(--tac-text);
  max-width: 34em;
}

.tac-platforms {
  scroll-margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tac-home .tac-platforms__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--tac-text);
}
.tac-platforms__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tac-home a.tac-chip,
.tac-home a.tac-chip:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--tac-white);
  border: 1.5px solid rgba(93, 74, 54, 0.3);
  color: var(--tac-brown);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.tac-home a.tac-chip:hover {
  border-color: var(--tac-brown);
  color: var(--tac-brown);
}

/* ---------- Sections ---------- */

.tac-section {
  padding-top: 40px;
  padding-bottom: 8px;
}
.tac-section + .tac-section {
  padding-bottom: 40px;
}
.tac-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.tac-home .tac-heading {
  font-size: 26px;
  line-height: 1.15;
  color: var(--tac-text);
  margin-bottom: 16px;
}
.tac-section__head .tac-heading {
  margin-bottom: 0;
}
.tac-home .tac-heading--small {
  font-size: 24px;
  color: var(--tac-brown);
  margin-bottom: 0;
}
.tac-home a.tac-more,
.tac-home a.tac-more:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--tac-brown);
  text-decoration: none;
}
.tac-home a.tac-more:hover {
  color: var(--tac-orange);
}

.tac-home .tac-meta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tac-brown);
}
.tac-home .tac-meta--light {
  font-size: 14px;
  color: var(--tac-peach);
}

/* ---------- Latest episode ---------- */

.tac-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--tac-brown);
  color: var(--tac-white);
  /* full content width, so it lines up with the earlier-episodes grid below */
  width: 100%;
}
.tac-latest__art {
  display: block;
  aspect-ratio: 1 / 1;
  background: #4a3a2a;
}
.tac-latest__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tac-latest__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px 24px;
}
.tac-home .tac-latest__title {
  font-size: 24px;
  line-height: 1.15;
}
.tac-home .tac-latest__title a,
.tac-home .tac-latest__title a:visited,
.tac-home .tac-latest__title a:hover {
  color: var(--tac-white);
  text-decoration: none;
}
.tac-home .tac-latest__summary {
  color: var(--tac-white);
}
.tac-latest__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* ---------- Earlier episodes ---------- */

.tac-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  column-gap: 32px;
}
.tac-episode {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(93, 74, 54, 0.22);
}
.tac-episode__art {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 104px;
  background: #e9dfd6;
}
.tac-episode__art img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
}
.tac-round-play {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tac-orange);
  color: var(--tac-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.tac-round-play:hover {
  background: #d9531a;
}
.tac-episode__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.tac-home .tac-episode__title {
  font-size: 18px;
  line-height: 1.2;
}
.tac-home .tac-episode__title a,
.tac-home .tac-episode__title a:visited {
  color: var(--tac-brown);
  text-decoration: none;
}
.tac-home .tac-episode__title a:hover {
  color: var(--tac-orange);
}
.tac-home .tac-episode__summary {
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Email + Patreon ---------- */

.tac-support {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 48px;
  padding-top: 36px;
  padding-bottom: 44px;
  border-top: 2px solid var(--tac-brown);
  width: auto;
  max-width: 1088px; /* 1120 minus gutters, so the rule lines up with content */
  padding-left: 0;
  padding-right: 0;
  margin-left: 16px;
  margin-right: 16px;
}
@media (min-width: 1120px) {
  .tac-support {
    margin-left: auto;
    margin-right: auto;
  }
}
.tac-support__item {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.tac-support__item .tac-btn {
  margin-top: 4px;
}

/* ---------- About ---------- */

.tac-about {
  background: var(--tac-peach);
  padding: 48px 16px;
}
.tac-about__inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.tac-home .tac-about .tac-heading {
  color: var(--tac-brown);
  margin-bottom: 0;
}
.tac-home .tac-about p {
  font-size: 18px;
  line-height: 1.55;
}
.tac-about .tac-btn {
  margin-top: 8px;
}

/* ---------- Mini player ---------- */

.tac-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900; /* under the menu overlay (999) */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--tac-brown);
  color: var(--tac-white);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
}
.tac-player[hidden] {
  display: none;
}
.tac-player__art {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #4a3a2a;
}
.tac-player__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tac-player p.tac-player__status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tac-peach);
}
.tac-player a.tac-player__title,
.tac-player a.tac-player__title:visited,
.tac-player a.tac-player__title:hover {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tac-white);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tac-player__progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tac-player__seek {
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  margin: 0;
  background: transparent;
  accent-color: var(--tac-orange);
  cursor: pointer;
}
.tac-player__time {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--tac-peach);
}
.tac-player__toggle,
.tac-player__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tac-player__toggle {
  background: var(--tac-white);
  color: var(--tac-brown);
}
.tac-player__close {
  background: transparent;
  color: var(--tac-white);
}
body.tac-player-open {
  padding-bottom: 76px;
}

/* ---------- Larger screens ---------- */

@media (min-width: 40em) {
  .tac-hero__inner {
    padding-top: 150px; /* the logo is 220px wide here */
    padding-bottom: 64px;
  }
  .tac-latest {
    grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  }
  .tac-latest__art--photo {
    aspect-ratio: auto;
  }
  .tac-latest__body {
    justify-content: center;
    padding: 32px;
  }
  .tac-home .tac-latest__title {
    font-size: 30px;
  }
  .tac-home .tac-heading {
    font-size: 30px;
  }
  .tac-section {
    padding-top: 56px;
  }
}

@media (min-width: 64em) {
  .tac-hero::before {
    background: rgba(250, 242, 241, 0.3);
  }
  .tac-hero__inner {
    padding-top: 170px;
    padding-bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tac-btn { transition: none; }
}
