/* Englabochus 0.5.1: proportion and alignment correction. */
:root {
  --eng-wide: min(1080px, calc(100vw - 64px));
  --eng-copy: min(720px, calc(100vw - 48px));
}

body {
  font-size: 17px;
  line-height: 1.62;
}

.wp-block-template-part > header > .wp-block-group {
  min-height: 72px;
  padding: 16px 0 !important;
}

.eng-wordmark {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  letter-spacing: .115em;
}

.wp-block-navigation {
  font-size: .8rem;
  letter-spacing: .045em;
}

.eng-hero {
  width: var(--eng-wide) !important;
  max-width: 1080px !important;
  margin: 32px auto 0 !important;
  padding: clamp(64px, 8vw, 96px) !important;
  box-sizing: border-box;
}

.eng-hero > * {
  width: 100%;
  max-width: 900px;
  margin-inline: 0;
}

.eng-hero h1 {
  max-width: 860px;
  font-size: clamp(2.55rem, 5.2vw, 4.55rem) !important;
  line-height: 1.03 !important;
  letter-spacing: -.025em;
}

.eng-home-section {
  width: var(--eng-wide);
  padding: clamp(54px, 6vw, 76px) 0 !important;
}

.eng-home-section > h2 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 2rem;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
}

.eng-home-section > .wp-block-query,
.eng-home-section > .wp-block-columns {
  width: 100% !important;
  max-width: none !important;
}

.eng-home-books .wp-block-post-template {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.eng-home-books .wp-block-post-template > li {
  min-width: 0;
}

.eng-home-books .wp-block-post-title {
  font-size: 1.2rem !important;
  line-height: 1.25;
}

.eng-imprints .wp-block-columns {
  width: 100% !important;
  max-width: none !important;
  gap: clamp(22px, 3vw, 38px);
  margin: 0 0 1.25rem;
}

.eng-imprints .wp-block-column {
  min-height: 72px;
  padding: 16px 0 8px;
  border-top-width: 2px;
}

.eng-imprints h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.2;
}

.eng-home-journal .wp-block-post-template {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.eng-home-journal .wp-block-post-title {
  font-size: clamp(1.45rem, 2.3vw, 2rem) !important;
  line-height: 1.08;
}

.eng-footer {
  padding: 56px 32px !important;
}

.eng-footer > * {
  width: var(--eng-wide);
  max-width: none !important;
}

.eng-footer .eng-wordmark {
  font-size: 1.65rem;
}

main:not(.eng-home) {
  width: var(--eng-wide);
  max-width: 1080px !important;
  margin-inline: auto;
  padding-inline: 0 !important;
}

main:not(.eng-home) > .wp-block-post-title,
main:not(.eng-home) > .wp-block-query-title,
main:not(.eng-home) > h1 {
  width: 100%;
  max-width: 760px;
  margin-inline: 0;
}

@media (max-width: 780px) {
  :root {
    --eng-wide: calc(100vw - 32px);
    --eng-copy: calc(100vw - 32px);
  }

  body { font-size: 16px; }
  .wp-block-template-part > header > .wp-block-group { min-height: 60px; }
  .eng-wordmark { font-size: 1.2rem; }

  .eng-hero {
    margin-top: 16px !important;
    padding: 54px 24px !important;
  }

  .eng-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.35rem) !important;
  }

  .eng-home-section { padding: 48px 0 !important; }

  .eng-home-books .wp-block-post-template,
  .eng-home-journal .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .eng-home-books .wp-block-post-template > li { max-width: 320px; }

  .eng-imprints .wp-block-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
  }

  .eng-imprints .wp-block-column { min-height: 0; }
  .eng-footer { padding: 44px 16px !important; }
}
