/* Composição editorial de base. */
#sobre .profile-social { gap: 4px 20px; }
#sobre .profile-social a,
#cursos .course-youtube,
#agenda .agenda-examples summary {
  min-height: 44px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  text-underline-offset: .2em;
  text-decoration: underline;
}
#sobre .profile-social a:hover,
#cursos .course-youtube:hover,
#agenda .agenda-examples summary:hover {
  background: transparent;
  text-decoration-thickness: .13em;
}
#cursos .course-youtube { color: white; margin-top: 8px; }

main > #agenda {
  padding-block: clamp(28px, 3vw, 44px) calc(clamp(28px, 3vw, 44px) + var(--chapter-overlap));
}
.agenda-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: start;
  gap: 8px clamp(24px, 5vw, 72px);
}
.agenda-overview h2 { margin: 0; }
#agenda-empty { color: var(--deep); font-size: 1.0625rem; line-height: 1.6; margin: 0; }
#agenda .agenda-examples summary {
  display: list-item;
  width: fit-content;
  padding-block: 10px;
  color: var(--deep);
  cursor: pointer;
}
#agenda .agenda-list { margin-top: 16px; }

#temas .theme-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
#temas .theme {
  display: block;
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-align: start;
}
#temas .theme h3 { max-width: 22ch; margin: 0 0 8px; }
#temas .theme p { margin-inline: 0; }
#temas .theme-invite { margin: 24px 0 0; }

#cursos .course-list .course {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: start;
}
#cursos .course h3 { margin-block: 8px; }
#cursos .course p { margin: 0; }
#cursos .course a { margin: 12px 0 0; }

main > #leoes-nordestinos {
  --leoes-green: #153f3c;
  --leoes-cream: #fff9eb;
  background: var(--leoes-green);
  color: var(--leoes-cream);
}
.leoes-layout {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  grid-template-areas: "heading photo" "story photo";
  gap: 16px clamp(24px, 5vw, 72px);
}
.leoes-heading { grid-area: heading; align-self: end; }
.leoes-mark { display: block; width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; }
#leoes-title { margin: 0; color: inherit; }
.leoes-photo {
  grid-area: photo;
  align-self: center;
  justify-self: center;
  display: block;
  width: min(100%, 360px);
  height: auto;
  border-radius: 20px;
}
.leoes-story { grid-area: story; }
.leoes-story p {
  max-width: 46ch;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.leoes-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.leoes-link:hover { text-decoration-thickness: .13em; }
.leoes-link:focus-visible { outline-color: var(--leoes-cream); box-shadow: none; }

@media (max-width: 760px) {
  .agenda-overview,
  #temas .theme-grid,
  .leoes-layout { grid-template-columns: minmax(0, 1fr); }
  .leoes-layout { grid-template-areas: "heading" "photo" "story"; }
  .leoes-heading { display: flex; align-items: center; gap: 12px; }
  .leoes-mark { flex: none; width: 36px; height: 36px; margin: 0; }
  .leoes-photo { width: min(100%, 248px); border-radius: 14px; }
}

@media (max-width: 700px) {
  .hero-portrait {
    position: relative;
    inset: auto;
    width: min(100%, 405px);
    aspect-ratio: 1 / 1.02;
    overflow: hidden;
  }
  .hero-portrait img {
    position: absolute;
    top: -12%;
    left: 50%;
    width: 120%;
    max-width: none;
    height: auto;
    translate: -52% 0;
  }
}


/* Enquadramento de desktop. A imagem mantém a base apoiada em Sobre. */
@media (min-width: 1001px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-copy { padding-bottom: clamp(72px, 8vw, 112px); }
  .hero-portrait {
    position: relative;
    aspect-ratio: 9 / 10.4;
    overflow: hidden;
  }
  .hero-portrait img {
    position: absolute;
    top: -10%;
    left: 50%;
    width: 138%;
    max-width: none;
    height: auto;
    translate: -59% 0;
  }
}

/* V9 · revisão de agenda, catálogo e contato. */
@media (min-width: 1001px) {
  .site-header #main-nav > a { border-radius: 10px; white-space: nowrap; }
}
@media (min-width: 1001px) and (max-width: 1180px) {
  .site-header #main-nav { gap: 6px; }
  .site-header #main-nav > a { padding-inline: 8px; font-size: .9375rem; }
}

#sobre .profile-networks { margin-top: 24px; }
#sobre .profile-networks > p { margin: 0; color: #415d72; font-size: .875rem; font-weight: 700; }
#sobre .profile-social { gap: 4px clamp(12px, 3vw, 24px); margin: 0; }
#sobre .profile-social a { font-weight: 700; text-decoration: none; white-space: nowrap; }
#sobre .profile-social a:is(:hover, :focus-visible) { text-decoration: underline; }
#sobre .profile-social svg { flex: none; }

#agenda .agenda-examples summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-weight: 700;
}
#agenda .agenda-examples summary { border-radius: 6px; text-decoration: none; }
#agenda .agenda-examples summary:is(:hover, :focus-visible) :is(.agenda-show, .agenda-hide) {
  text-decoration: underline;
  text-underline-offset: .2em;
}
#agenda .agenda-examples summary:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px;
  box-shadow: none;
}
#agenda .agenda-examples summary::-webkit-details-marker { display: none; }
.agenda-toggle-icon { font-size: 1.2em; line-height: 1; }
.agenda-toggle-icon::before { content: "+"; }
.agenda-examples[open] .agenda-toggle-icon::before { content: "−"; }
.agenda-examples:not([open]) .agenda-hide,
.agenda-examples[open] .agenda-show { display: none; }
#agenda .agenda-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
#agenda .compact-event {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 12px;
}
#agenda .event-heading {
  display: grid;
  grid-template-columns: minmax(48px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
#agenda .compact-date {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 0;
  padding: 0;
}
#agenda .compact-date strong { font-size: 1.65rem; line-height: 1; }
#agenda .compact-date span { font-size: .75rem; }
#agenda .event-title h3 { margin: 2px 0 0; }
#agenda .event-title .event-status { color: #415d72; font-size: .75rem; line-height: 1.35; }
#agenda .event-details > p { margin: 0; }
#agenda .event-action { margin: 0; max-width: 100%; text-align: start; white-space: normal; }
@media (min-width: 761px) {
  #agenda .agenda-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #agenda .agenda-list:has(> .compact-event:only-child) { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1150px) {
  #agenda .agenda-list:has(> .compact-event:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#livros .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#livros .book-card {
  display: grid;
  grid-template-columns: clamp(140px, 14vw, 184px) minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: clamp(14px, 2vw, 24px);
  background: #f5efe3;
  border: 1px solid #e4dacb;
  text-align: start;
}
#livros .book-cover { grid-row: auto; height: auto; margin: 0; }
#livros .book-cover img { display: block; width: 100%; height: auto; border-radius: 7px; }
#livros .book-copy h3 { margin: 0 0 8px; }
#livros .book-copy p { margin: 0; font-size: 1rem; }
#livros .book-copy .book-credit { margin-bottom: 8px; font-size: .875rem; }
#livros .book-copy { min-width: 0; }

#cursos .course-list .course {
  padding: clamp(16px, 2vw, 24px);
  background: #e7f0f8;
}
#cursos .course-artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 240px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 10px;
  background: #2d3b50;
}
#cursos .course-artwork--antifragil {
  --art-left: linear-gradient(#591921, #791a28 54%, #5d1923);
  --art-right: linear-gradient(#181916, #1e1818 54%, #181916);
}
#cursos .course-artwork--casais {
  --art-left: linear-gradient(#2c4535, #072610 40%, #010600);
  --art-right: linear-gradient(#0a2e14, #041a0e 40%, #020803);
}
#cursos :is(.course-artwork--antifragil, .course-artwork--casais) {
  background: var(--art-left) left / 50% 100% no-repeat,
              var(--art-right) right / 50% 100% no-repeat;
}
#cursos .course-art {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  margin: auto;
  object-fit: contain;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
@media (min-width: 901px) {
  #cursos .course-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header .wordmark { font-size: clamp(.875rem, 4.2vw, 1rem); }
  .site-header .wordmark > span:first-child { font-size: .6875rem; }
  #livros .books-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #livros .book-card { grid-template-columns: minmax(0, 104px) minmax(0, 1fr); padding: 12px; gap: 14px; }
  #cursos .course-list { grid-template-columns: minmax(0, 1fr); }
  #cursos .course-artwork { aspect-ratio: 16 / 9; max-height: 176px; }
}
@media (max-width: 350px) {
  #livros .book-card { grid-template-columns: minmax(0, 1fr); }
  #livros .book-cover { width: min(100%, 128px); }
}

#convites .direct-contact {
  min-height: 48px;
  width: fit-content;
  padding: 10px 16px;
}
#convites .direct-contact strong { margin: 0; letter-spacing: normal; }
#convites .contact-email {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin-top: 8px;
  color: var(--deep);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: .2em;
}
@media (max-width: 760px) {
  #convites .field-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}


@media (max-width: 760px) {
  #agenda .event-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    gap: 2px;
  }
}

/* Reserva de movimento proporcional, só nas folhas que deslizam. */
@media (prefers-reduced-motion: no-preference) {
  main > .section:not(#leoes-nordestinos, #convites) {
    padding-bottom: calc(max(var(--chapter-space), var(--sheet-travel) + 14px) + var(--chapter-overlap));
  }
}
main > #cursos { background: #0e2a43; }
