/* ==========================================================================
   Lambda Phi Epsilon — Alpha Xi Chapter
   Masthead — corrections to the header furniture that main.js injects, plus
   the decorative band that sits directly beneath it.

   (Fold these into style.css §7 once nothing else is editing that file.)
   ========================================================================== */

/* ---- 1. The Rush plate --------------------------------------------------
   "RUSH ΛΦΕ" was breaking onto two lines inside its rule, which reads as a
   typographic accident rather than a plate. It stays on one line and the
   plate is cut wide enough to carry it. */
.nav__cta {
  white-space: nowrap;
  padding-inline: clamp(0.9rem, 1.5vw, 1.4rem);
  min-width: max-content;
  margin-left: 0;
}

/* In the stacked mobile menu the plate spans the menu instead. */
@media (max-width: 900px) {
  .nav__cta { min-width: 0; margin-top: 0; }
}

/* ---- 2. Masthead layout -------------------------------------------------
   Three zones on one rule: the chapter's mark hard left, the itinerary
   centred, the impression switch hard right. A grid rather than a flex row,
   because only equal outer tracks put the itinerary at the TRUE centre of the
   page instead of merely between its neighbours. */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-4);
}

.nav__brand { justify-self: start; margin-right: 0; }
.nav__links { justify-self: center; }

.nav__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav__theme { margin-left: 0; }

@media (max-width: 900px) {
  /* The itinerary drops out of flow into the menu, leaving mark and switch. */
  .nav { grid-template-columns: 1fr auto; }

  /* Out of flow it is a drawer spanning the whole rule, not a centred track
     item — the centring above would otherwise shrink it to its longest link. */
  .nav__links { justify-self: stretch; }

  /* The switch lives beside the menu button now, not inside the menu, so it
     keeps its engraved-square shape rather than the full-width menu row. */
  .nav__theme {
    width: 2.05rem;
    height: 2.05rem;
    margin-top: 0;
    padding-block: 0;
    font-size: 1.05rem;
  }
  .nav__theme .visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* The three zones only sit true if they FIT. Nine engraved links, a plate, a
   crest and a full chapter line overrun the standard measure at ordinary
   laptop widths, and an overrun collapses the outer tracks and throws the
   itinerary off centre. So the masthead runs to a wider measure than the
   page, its lettering is set tighter than body small-caps, and the chapter
   line drops to its short form well before the row would crowd. */
.site-header .wrap.nav {
  /* Wider than the page's own measure, and inset barely at all: the mark sits
     in the top-left CORNER and the plate and switch sit in the top-right, the
     way a masthead rule runs to the trim rather than to the text block. The
     floor on the padding is the page gutter, so on a phone the mark still
     lines up with the copy below it instead of hanging off the edge. */
  max-width: min(1720px, 98.5vw);
  padding-inline: clamp(1rem, 1.1vw, 1.25rem);
}

/* The itinerary is set tight enough to FIT at the narrowest desktop width —
   just above the 900px drawer breakpoint the row has only a few pixels to
   spare between the mark and the first link. Anything wider than that is spare
   room, so the links spend it on air between themselves: the padding stays at
   its floor until roughly 1200px and then opens out, capped before the row
   could reach the mark on the left or the plate on the right. */
.nav__links a {
  padding-inline: clamp(var(--sp-1), 1.35vw - 0.7rem, var(--sp-4));
  letter-spacing: .07em;
  font-size: .69rem;
}

.nav__cta {
  padding-inline: var(--sp-3) !important;
  font-size: .67rem !important;
  letter-spacing: .1em;
}

.nav__crest { width: 36px; height: 36px; }
.nav__letters { font-size: 1.4rem; }

/* The full chapter line is the first thing to go as the row tightens. */
@media (max-width: 1500px) {
  .nav__chapter--full { display: none; }
  .nav__chapter--short { display: inline; }
}

/* On a phone the right-hand zone carries plate, switch and menu button at
   once. "RUSH" alone still reads as the invitation; the letters go first. */
@media (max-width: 620px) {
  .nav__cta-mark { display: none; }
  .nav__cta { padding-inline: var(--sp-3) !important; font-size: .62rem !important; }
  .nav__toggle { padding-inline: var(--sp-3); }
}
