/* Shared typography matches the Domicelė Petrutytė biography. */
:root {
  --font-body: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --text-size: 1.0625rem;
  --text-leading: 1.65;
  --photo-width: 20rem;
}

body.site-format {
  font-family: var(--font-body);
  font-size: var(--text-size);
  line-height: var(--text-leading);
}

html { scroll-padding-top: calc(var(--header-height, 99px) + 5rem); }
body.site-format .section-jump-nav { top: var(--header-height, 99px); }

body.site-format p:not(.hero-quote, .kicker, .pioneer-role, .stage-type, .event-date),
body.site-format .notable-sources li {
  font-family: var(--font-body);
  font-size: var(--text-size);
  font-weight: 400;
  line-height: var(--text-leading);
  letter-spacing: normal;
}

body.site-format .history-story p:first-child,
body.site-format .about-copy .large-copy {
  font-style: normal;
}

body.site-format :is(h1, h2, h3, h4, h5, h6),
body.site-format :is(.kicker, .pioneer-role, .stage-type),
body.site-format :is(.principles, .pricing-details) > details > summary,
body.site-format .principles summary,
body.site-format .pricing-details summary {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: normal;
  overflow-wrap: break-word;
}

body.site-format h1 { font-size: clamp(2rem, 3.3vw, 2.625rem); }
body.site-format h2 { font-size: clamp(1.75rem, 2.6vw, 2.125rem); }
body.site-format h3 { font-size: clamp(1.5rem, 2.2vw, 1.875rem); }
body.site-format :is(h4, h5, h6) { font-size: 1.5rem; }
body.site-format :is(.kicker, .pioneer-role, .stage-type) {
  font-size: var(--text-size);
  text-transform: none;
}
body.site-format .principles summary,
body.site-format .pricing-details summary { font-size: 1.5rem; }

body.site-format .hero-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  line-height: 1.4;
}

body.site-format :is(.section-jump-nav a, .text-link, .button, .menu-toggle),
body.site-format #navigation a { font-size: var(--text-size); }
body.site-format .notable-sources summary { font-size: 1rem; }
body.site-format :is(.event-date, .price-option > span, .event-label, .value-ribbon span) {
  font-size: var(--text-size);
  line-height: var(--text-leading);
}
body.site-format .price-option strong { font-size: 1.875rem; line-height: 1.25; }
body.site-format .price-option strong small { font-size: var(--text-size); }

/* Compact, consistent 4:3 school-photo previews. Source images are unchanged. */
body.site-format .photo-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
  max-width: var(--photo-width);
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: visible;
  border-radius: 8px;
  background: transparent;
  grid-column: auto;
  grid-row: auto;
}

body.site-format .photo-frame::before,
body.site-format .photo-frame::after,
body.site-format .hero-shape { display: none; }

.school-photo-link {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px 28px 8px 8px;
  background: var(--soft);
  cursor: zoom-in;
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

body.site-format .photo-frame .school-photo-link img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center 35%;
  box-shadow: none;
  transform: none;
}

body.site-format .photo-frame :is(figcaption, .image-label) {
  position: static;
  display: block;
  width: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 12px 0 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-size);
  font-weight: 400;
  line-height: var(--text-leading);
  text-transform: none;
  letter-spacing: normal;
}

body.site-format .hero-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.site-format .hero-visual figcaption span + span::before { display: none; }

body.site-format :is(.gallery, .method-gallery, .event-gallery, .events-photo-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), var(--photo-width)));
  grid-auto-rows: auto;
  gap: 26px;
  columns: auto;
  justify-content: start;
  align-items: start;
}

body.site-format .event-gallery { margin-top: 24px; }
body.site-format .event-spotlight {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), var(--photo-width)));
  gap: 26px;
  align-items: start;
}
body.site-format .event-video-card {
  width: 100%;
  max-width: var(--photo-width);
  background: var(--soft);
  border-radius: 8px 28px 8px 8px;
}
body.site-format .event-video-card video {
  aspect-ratio: 4 / 3;
  max-height: 15rem;
  object-fit: contain;
  background: #e7eee8;
}
body.site-format .event-video-card p { padding: 14px; color: var(--ink); }

body.site-format :is(.hero, .page-hero-grid) {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--photo-width));
  gap: 56px;
  min-height: 0;
  align-items: center;
}
body.site-format .hero { padding-block: 48px 56px; }
body.site-format .page-hero { padding-block: 48px 56px; overflow: visible; }
body.site-format :is(.about-grid, .method-layout) {
  grid-template-columns: minmax(0, var(--photo-width)) minmax(0, 1fr);
  gap: 48px;
}
body.site-format .method-photo { top: auto; }
body.site-format .event-entry { padding: clamp(22px, 4vw, 40px); }
body.site-format :is(.hero-copy, .page-hero-copy, .about-copy, .principles) { min-width: 0; }

@media (hover: hover) and (pointer: fine) {
  .school-photo-link:hover {
    z-index: 3;
    transform: scale(1.055);
    box-shadow: 0 14px 36px rgb(55 50 52 / 20%);
  }
}
.school-photo-link:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 4px; }

/* Full uncropped view supports mouse, touch and keyboard. */
.photo-viewer {
  width: min(94vw, 1100px);
  max-width: 94vw;
  max-height: 92vh;
  max-height: 92dvh;
  padding: 52px 22px 18px;
  border: 2px solid var(--green);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}
.photo-viewer::backdrop { background: rgb(24 43 32 / 76%); }
.photo-viewer img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  max-height: 70dvh;
  object-fit: contain;
}
.photo-viewer-close {
  position: absolute;
  top: 8px;
  right: 10px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  cursor: pointer;
}
.photo-viewer p { margin: 14px 0 0; }
.photo-viewer-open { overflow: hidden; }

@media (max-width: 760px) {
  body.site-format :is(.hero, .page-hero-grid, .about-grid, .method-layout) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  body.site-format .hero-copy { max-width: none; }
  body.site-format .photo-frame { justify-self: center; }
  body.site-format :is(.gallery, .method-gallery, .event-gallery, .events-photo-grid, .event-spotlight) {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .photo-viewer { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .school-photo-link { transition: none; }
  .school-photo-link:hover { transform: none; }
}
