/* Site menu added to the landing page header (homepage of the static rebuild).
   Loaded after styles.css; the landing page's own styles are unchanged.
   Desktop: a menu row under the logo, with the hero content moved down by its height.
   Mobile/tablet: a menu button at the left of the header, so the layout doesn't move. */
:root { --lp-nav-h: 36px; }

.lp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 30px; }
.lp-nav a { font-family: var(--body); font-size: 12px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.lp-nav a:hover, .lp-nav a:focus-visible { box-shadow: 0 1px 0 var(--ink); outline: none; }

.lp-menu { display: none; }

@media (min-width: 1100px) {
  #landing .site-header { height: calc(88px + var(--lp-nav-h)); flex-direction: column; gap: 14px; }
  .hero { height: calc(clamp(680px, 62.5vw, 1000px) + var(--lp-nav-h)); }
  .hero .poppies { top: calc(8px + var(--lp-nav-h)); }
  .headline { top: calc(clamp(124px, 10.28vw, 148px) + var(--lp-nav-h)); }
  .d-journeys { top: calc(clamp(680px, 62.5vw, 1000px) * 0.54 + var(--lp-nav-h)); }
}

@media (max-width: 1099px) {
  #landing .lp-nav { display: none; }
  .lp-menu { display: block; position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 20px); }
  .lp-menu summary { list-style: none; cursor: pointer; width: 24px; display: grid; gap: 5px; padding: 4px 0; }
  .lp-menu summary::-webkit-details-marker { display: none; }
  .lp-menu summary span { height: 1.5px; background: var(--ink); }
  .lp-menu ul { list-style: none; margin: 0; padding: 8px 20px 16px; position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top, 0px)); background: var(--white); border-bottom: 1px solid var(--hairline); }
  .lp-menu li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
}

/* Leave room for the menu button beside the logo on narrow phones */
@media (max-width: 1099px) { #landing img.logo.hdr-logo { height: 20px; } }

/* Tighter spacing around the headline (homepage only).
   Gap header -> headline: 32px desktop / 24px mobile. Gap subtitle -> top of the poppy heads: 24px.
   The poppy heads start 34.9% down the image, so the image (and the cards over it) move with the
   image's rendered height, which depends on the viewport width. */
@media (min-width: 1100px) {
  :root {
    --lp-h0: clamp(680px, 62.5vw, 1000px);                       /* original hero height */
    --lp-fh: max(var(--lp-h0), calc((100vw + 24px) / 1.792));      /* rendered poppy image height */
    --lp-text: calc(clamp(46px, 3.9vw, 56px) + 72px);              /* headline + gap + 2-line subtitle */
    --lp-ft: calc(88px + var(--lp-nav-h) + 32px + var(--lp-text) + 24px - 0.349 * var(--lp-fh));
    --lp-shift: calc(var(--lp-ft) - 8px - var(--lp-nav-h));
  }
  .headline { top: calc(88px + var(--lp-nav-h) + 32px); }
  .hero .poppies { top: var(--lp-ft); }
  .hero { height: calc(var(--lp-h0) + var(--lp-nav-h) + var(--lp-shift)); }
  .d-journeys { top: calc(var(--lp-h0) * 0.54 + var(--lp-nav-h) + var(--lp-shift)); }
}
@media (max-width: 1099px) {
  :root {
    --lp-mfh: calc(max(810px, 100vw + 24px) / 1.792);
    --lp-mft: calc(64px + 24px + 130px + 24px - 0.349 * var(--lp-mfh));
  }
  .headline { top: 88px; }
  .hero .poppies { top: var(--lp-mft); }
  .hero { height: calc(500px + var(--lp-mft) - 120px); }
}
