/* The homepage uses the same authored Blocks for reading and Play. */
.site-frame:has(.home-hero) {
  display: block;
  padding-top: 0;
}
.site-frame:has(.home-hero) > .site-aside,
.site-main:has(.home-hero) > .pmx-breadcrumbs {
  display: none;
}
.pmx-document:has(.home-hero) {
  --pmx-document-measure: 76rem;
}
.home-section {
  box-sizing: border-box;
  padding-block: clamp(2rem, 5vw, 4rem);
}
.home-section h1,
.home-section h2,
.home-section h3 {
  font-family: var(--pmx-font-heading);
  text-wrap: balance;
}
.home-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 1.25rem;
}
.home-section h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-block: 0 0.45rem;
}
.home-section p {
  line-height: 1.65;
  text-wrap: pretty;
}
.home-section a {
  text-underline-offset: 0.22em;
}
.home-section a:focus-visible {
  outline: 2px solid var(--pmx-color-focus);
  outline-offset: 5px;
  border-radius: 4px;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(2rem, 6vw, 5rem);
}
.home-intro h1 {
  font-size: clamp(2.7rem, 5.4vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin: 0 0 1.6rem;
}
.home-lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--pmx-color-muted);
}
.home-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.6rem;
  margin-block: 1.75rem;
}
.home-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  font-weight: 600;
}
.home-actions > p {
  margin: 0;
}
.home-actions .home-button {
  padding: 0.6rem 1.15rem;
  border-radius: 0.6rem;
  background: var(--pmx-color-fg);
  color: var(--pmx-color-bg);
  text-decoration: none;
  box-sizing: border-box;
  transition: opacity 140ms ease;
}
.home-actions .home-button:hover {
  opacity: 0.85;
}
.home-note,
.home-eyebrow {
  font-size: 0.85rem;
  color: var(--pmx-color-muted);
}
.home-eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.home-start {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--pmx-color-surface);
  border: 1px solid var(--pmx-color-border);
  border-radius: 1rem;
}
.home-start::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, #6755e8, #d560ca, #f6a259);
}
.home-start h2 {
  font-size: 1.65rem;
}
.home-start p {
  font-size: 0.9rem;
}
.home-start pre {
  background: color-mix(in oklch, var(--pmx-color-bg) 65%, transparent);
  font-size: 0.8rem;
  max-width: 100%;
  overflow-x: auto;
}
.home-start .pmx-code-block pre {
  padding: 1rem;
}
.home-start .pmx-code-block code {
  font-size: inherit;
  padding: 0;
  background: transparent;
}
.home-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-block: 2rem 0;
}
.home-example {
  color: var(--pmx-color-fg);
  text-decoration: none;
  min-width: 0;
}
.home-example h3 {
  margin-top: 1.1rem;
}
.home-example h3 span {
  color: var(--pmx-color-muted);
}
.home-example p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--pmx-color-muted);
}
.home-example:hover h3 {
  color: var(--pmx-color-accent);
  text-decoration: underline;
}
.home-preview {
  height: 14rem;
  border-radius: 0.6rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.home-books {
  background: #604632 url("/examples/bookcase/assets/oak-grain.webp") center /
    cover;
  gap: 0.6rem;
  padding: 2rem 1rem;
}
.home-books img {
  width: 27%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 4px 5px 8px #0005;
}
.home-chess {
  background: #334438 url("/examples/chess/assets/felt.webp") center / cover;
  padding: 1rem;
}
.home-chess img {
  height: 100%;
  width: auto;
  max-width: 100%;
}
.home-lesson {
  padding: 0;
  background: #183c43;
}
.home-lesson img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-why {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.home-why-intro > p {
  max-width: 48ch;
}
.home-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2rem;
}
.home-reasons p {
  color: var(--pmx-color-muted);
  font-size: 0.95rem;
  margin: 0;
}
.home-research {
  max-width: 52rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

@media (max-width: 52rem) {
  .home-hero,
  .home-why {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .home-intro h1 {
    max-width: 14ch;
  }
  .home-examples {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .home-preview {
    height: 15rem;
  }
  .home-books img {
    width: auto;
    max-width: 28%;
  }
}
@media (max-width: 34rem) {
  .home-reasons {
    grid-template-columns: 1fr;
  }
}

html[data-pmx-play-active] .home-section {
  padding-block: 0;
}
html[data-pmx-play-mode="presentation"] {
  .home-intro h1 {
    font-size: clamp(2rem, 4.5vw, 4rem);
  }
  .home-section h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
  }
  .home-actions {
    margin-block: 1rem;
  }
  .home-preview {
    height: clamp(7rem, 24vh, 14rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-actions .home-button {
    transition: none;
  }
}

/* Native radios provide keyboard selection without a client-side dependency. */
.home-start-toggle {
  display: inline-flex;
  padding: 3px;
  margin: 0 0 0.5rem;
  border: 1px solid var(--pmx-color-border);
  border-radius: 0.6rem;
  background: var(--pmx-color-bg);
}
.home-start-toggle label { position: relative; cursor: pointer; }
.home-start-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.home-start-toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding-inline: 1rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pmx-color-muted);
}
.home-start-toggle input:checked + span {
  background: var(--pmx-color-fg);
  color: var(--pmx-color-bg);
}
.home-start-toggle input:focus-visible + span {
  outline: 2px solid var(--pmx-color-focus);
  outline-offset: 3px;
}
.home-start-panels { display: grid; }
.home-start-panels > div { grid-area: 1 / 1; min-width: 0; }
.home-start-agent { visibility: hidden; }
.home-start:has(input[value="agents"]:checked) .home-start-human { visibility: hidden; }
.home-start:has(input[value="agents"]:checked) .home-start-agent { visibility: visible; }
.home-start-agent pre { white-space: pre-wrap; overflow-wrap: anywhere; }
