/*
  The Heron's Nest - 2026 styles
  Used by the current issue and the main site pages (loaded AFTER styles.css).
  Older issues do not load this file, so they are not affected by it.

  Sections:
    1. Menu bar          5. Haiku pages (incl. the heron)
    2. Page header       6. Main pages
    3. Issue links       7. Home page
    4. Page titles       8. Small screens (iPad / phone)
*/

/* ---------- 1. Menu bar: all caps, slight tracking, stays at top ---------- */
#top-menu a,
div.prmenu_container a {
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}
div.prmenu_container {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: auto !important;
  padding: 8px;
  background: #fff;
  z-index: 1000;
  box-sizing: content-box;
}
nav.main { padding-top: 50px; }   /* keeps the page from sliding up under the menu */

/* ---------- 2. Page header: centered title, logo 1 inch in ---------- */
header { position: relative; }
.logobox {
  display: flow-root;
  position: static !important;
  width: auto !important;
  left: auto !important;
  text-align: center;
  min-height: 150px;
  padding-top: 0;
  margin-top: -10px;
}
.logobox img.logo { position: absolute; left: 96px; top: 72px; float: none; }
.logobox h1 { margin: 39px 0 10px; }
.logobox h2 { margin: 0; }

/* ---------- 3. Issue links (Editors' Choices / Haiku / Index) ---------- */
nav.issue-menu { width: auto; left: 0; }
ul.issue {
  display: flex;
  justify-content: center;
  gap: 4em;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  font-size: 1.25em;
}
ul.issue li { width: auto; float: none; white-space: nowrap; }

/* ---------- 4. Page titles and Previous / Next ---------- */
h3[style*="clear:both"] { margin-top: 0 !important; }
nav.pagification a { text-decoration: none; }
nav.pagification a:hover { text-decoration: underline; }

/* ---------- 5. Haiku pages: the side artwork (each issue folder has its own side-art.webp) ---------- */
.heron-col { display: none; }
article.has-heron { position: relative; display: flow-root; }
@media (min-width: 768px) {
  .heron-col {
    display: block;
    position: absolute;
    left: 0;
    top: 38px;                    /* level with the page title */
    bottom: 120px;                /* stops at the last poem */
    width: calc(40% - 70px);      /* poems start at 40% */
    pointer-events: none;
  }
  .heron-col img {
    display: block;
    position: sticky;
    top: calc(66px + 7vh);        /* settles a little below the menu bar */
    width: 100%;
    height: auto;                 /* keeps the picture's shape */
    max-height: calc(100vh - 66px - 12vh);
    object-fit: contain;
    object-position: right top;
    opacity: 0.65;
  }
}

/* ---------- 6. Main pages ---------- */
/* (page-specific touches, e.g. on Submit, stay in that page) */

/* ---------- 7. Home page ---------- */
body > h2.center { margin-top: -4px; }          /* volume line sits 1/4" closer to the menu */
img.logo-front { max-height: 58vh; }            /* picture shrinks on short screens */
.home-wide { width: min(clamp(645px, 50.2vw, 861px), 83.3vh) !important; }  /* links + text match picture width */

/* ---------- 8. Small screens ---------- */

/* iPad and narrow windows: bring the logo in so it clears the title */
@media (max-width: 1099px) {
  .logobox img.logo { left: 24px; }
}

/* Phones */
@media (max-width: 767px) {
  body { margin: 0 12px; }

  /* menu: the menu's own phone mode shows a single MENU button */
  div.prmenu_container { padding: 6px 0; }

  /* header: logo on top, then title */
  .logobox { min-height: 0; margin-top: 0; }
  .logobox img.logo { position: static; display: block; height: 90px; margin: 10px auto 0; }
  .logobox h1 { margin: 8px 0 4px; font-size: 1.7em; }
  .logobox h2 { font-size: 1.05em; }

  /* issue links */
  ul.issue { gap: 0.5em 1.4em; flex-wrap: wrap; font-size: 1.05em; margin-top: 1.2em; }

  /* page titles: a bit less air */
  h3[style*="clear:both"] { padding-top: 24px !important; padding-bottom: 20px !important; }

  /* poems: centered column instead of starting 40% across */
  div.haiku {
    float: none;
    left: auto;
    width: min(100%, 300px);
    margin: 0 auto 2.5em;
  }
  p.haiku { white-space: normal; }
  .signature, p.signature { width: auto; left: 0; margin-bottom: 0; white-space: normal; }

  /* Previous / Next */
  nav.pagification { line-height: 3em; }
  nav.pagification ul { padding: 0; font-size: 1.2em; }

  /* text columns use the full width */
  .centered-half, .essay, .index {
    left: 0 !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
  }
  .home-wide { width: auto !important; }
  .flourish-row { left: 0 !important; }
  img.logo-front { width: 100% !important; height: auto !important; }
  .award, .award-long {
    width: 100% !important;
    left: 0 !important;
    background-size: contain !important;
  }
  .order-item { width: 100% !important; margin-left: 0 !important; float: none !important; height: auto !important; }
  img.cover { display: block; left: auto !important; margin-left: auto; margin-right: auto; max-width: 100%; height: auto; }
  footer { padding-left: 0; }
}
