/* The site header and menu. scripts/nav.js writes the markup into every guest
   page; colors and fonts come from theme.css.
   Phones: a ☰ Menu button at the top left slides the menu in from the left.
   It's a <details>, so it needs no JavaScript: while open, the dimmed
   backdrop is part of the button, so tapping anywhere outside the menu
   closes it.
   900px and wider: a row of links across the top instead.
   Jack, 2026-11-01: lay both out more clearly. Phones: Menu and the
   wordmark make one bar over a rule. Wider: a centered masthead, the
   wordmark over a row of links between two rules. */

.site-head {
  width: 100%;
  max-width: 26rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  --menu-left: max(1.25rem, calc((100vw - 26rem) / 2));
}
/* Jack, 2026-11-05: the roof fades out a bit more around EFFIE & JACK, on
   every page: a soft glow of the page's color behind the names. */
.site-head .mark { position: relative; }
.site-head .mark::before {
  content: "";
  position: absolute;
  inset: -55% -22%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side,
    var(--bg) 40%,
    color-mix(in srgb, var(--bg) 70%, transparent) 65%,
    transparent);
}
.site-head .mark {
  font-family: var(--font-display);
  text-transform: var(--display-case);
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
}
/* Jack, 2026-11-05: EFFIE & JACK is the biggest words in the header, bigger
   than the page's own title (each page's h1 steps down to make room). */

/* Winter Garden ceiling trusses. The SVG is black line art on a transparent
   canvas, used as a mask so the lines take the ink token. The ink is a
   gradient, so the lines fade out toward the bottom and the page comes up
   under them (Jack, 2026-10-30: extend the top, fade into the background).
   An eased curve, not two straight ramps, so there's no visible line where
   the fade starts or stops; gone by 85%. Home sizes its full band itself;
   every other page gets the strip below (Jack, 2026-10-31). */
.ceiling {
  background: linear-gradient(to bottom,
    var(--ink) 0%,
    color-mix(in srgb, var(--ink) 96%, transparent) 12%,
    color-mix(in srgb, var(--ink) 86%, transparent) 23%,
    color-mix(in srgb, var(--ink) 70%, transparent) 34%,
    color-mix(in srgb, var(--ink) 51%, transparent) 45%,
    color-mix(in srgb, var(--ink) 33%, transparent) 55%,
    color-mix(in srgb, var(--ink) 18%, transparent) 64%,
    color-mix(in srgb, var(--ink) 8%, transparent) 72%,
    color-mix(in srgb, var(--ink) 2%, transparent) 79%,
    transparent 85%);
  opacity: 0.78;
  -webkit-mask: url(/roof.svg?v=f3e9964b) center top / cover no-repeat;
  mask: url(/roof.svg?v=f3e9964b) center top / cover no-repeat;
}
/* The glass roof: the artist's ceiling.svg, untouched, with glass panes
   added in its own perspective (Jack, 2026-11-05: "use the initial drawing,
   that perspective is perfect, but add window panes"; option 00a). Phones
   get a copy drawn twice as big with heavier panes. */
@media (max-width: 899px) {
  .ceiling {
    -webkit-mask: url(/roof-phone.svg?v=4eba88c7) center top / cover no-repeat;
    mask: url(/roof-phone.svg?v=4eba88c7) center top / cover no-repeat;
  }
}
/* Every page but home: the short band home used to have, the top slice of
   the same roof (Jack, 2026-11-05: home gets the whole roof; pages with real
   info keep it out of the way). --strip also sets where the header starts. */
:root { --strip: min(calc(100vw * 200 / 1275), 13rem); }
@media (max-width: 640px) {
  :root { --strip: 32vw; }
}
.ceiling.strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: var(--strip);
  pointer-events: none;
}
/* On the roof, a soft halo in the page's color clears the lines from behind
   Menu and the wordmark, so they stay easy to find (no pill: Jack,
   2026-11-01). */
.ceiling.strip + .site-head .toggle,
.ceiling.strip + .site-head .mark {
  filter: drop-shadow(0 0 3px var(--bg)) drop-shadow(0 0 6px var(--bg)) drop-shadow(0 0 10px var(--bg));
}
/* Opening the menu keeps the Close X where Menu was tapped, and the drawer's
   contents move down to clear it. */
.ceiling.strip + .site-head {
  margin-top: calc(var(--strip) * 0.55);
  --menu-top: calc(1.1rem + var(--strip) * 0.55);
}
.ceiling.strip + .site-head .drawer { padding-top: calc(4.6rem + var(--strip) * 0.55); }

/* Phones */
.menu { justify-self: start; min-height: 2.75rem; }
.menu > summary {
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu > summary::-webkit-details-marker { display: none; }
/* Above anything drawn later in the page, like the home page's trusses. */
.toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-family: var(--font-caps);
  font-size: 1.25rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--menu-ink);
  -webkit-text-stroke: var(--menu-stroke);
}
/* Jack, 2026-11-05: bigger Menu and bars; guests couldn't see how to get to
   the other pages. */
/* Jack, 2026-11-01: the menu type read too soft. The face has no bold
   weight, so a thin stroke firms it up, the same in every browser. */
:root { --menu-stroke: 0.45px currentColor; }
.bars,
.bars::before,
.bars::after {
  display: block;
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
/* Jack, 2026-11-05: folding into an X looked buggy, because the bars jumped
   to the middle (top can't ease) and only then turned. One transform now
   slides and turns them together, and the middle bar fades out. */
.bars { position: relative; transition: background-color 0.15s ease; }
.bars::before,
.bars::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.bars::before { transform: translateY(-8px); }
.bars::after { transform: translateY(8px); }
.menu .when-open,
.menu[open] .when-closed { display: none; }
.menu[open] .when-open { display: inline; }

/* Open: the button stays put at the top left, now a close X over the menu. */
.menu[open] .toggle {
  position: fixed;
  top: var(--menu-top, 1.1rem);
  left: var(--menu-left);
  z-index: 12;
}
.menu[open] .bars { background-color: transparent; }
.menu[open] .bars::before { transform: rotate(45deg); }
.menu[open] .bars::after { transform: rotate(-45deg); }
.menu[open] > summary::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
}
body:has(.menu[open]) { overflow: hidden; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  width: min(84vw, 20rem);
  overflow-y: auto;
  background: var(--card);
  box-shadow: 0 0 40px var(--shadow);
  padding: 4.6rem 1.5rem 2rem;
}
.menu[open] .drawer { animation: drawer-in 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.menu[open] > summary::before { animation: menu-fade 0.2s ease-out; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@keyframes menu-fade { from { opacity: 0; } }
.drawer-mark {
  display: block;
  font-family: var(--font-display);
  text-transform: var(--display-case);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 1.1rem;
}
.drawer ul { list-style: none; border-bottom: 1px solid var(--line); }
.drawer li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
  font-family: var(--font-display);
  text-transform: var(--display-case);
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  -webkit-text-stroke: var(--menu-stroke);
}
/* The link fills the row's padding, so the whole row is the tap target. */
.drawer li a {
  flex: 1;
  display: flex;
  justify-content: space-between;
  margin: -0.75rem 0;
  padding: 0.75rem 0;
  color: var(--menu-ink);
  text-decoration: none;
}
.drawer li a::after { content: "\2192"; font-family: var(--font-body); }
.drawer .soon { color: var(--menu-ink); opacity: 0.8; }
.drawer small {
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.menu-foot {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.topnav { display: none; }

/* Wider screens: the wordmark on the left, the sections in a row on the
   right. Coming-soon ones are greyed out and say so on hover. Sized to read
   from across a laptop (Jack, 2026-10-30: too small); the gap shrinks on
   narrower windows so the row still fits at 900px. */
@media (min-width: 900px) {
  .site-head {
    max-width: 56rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 0;
  }
  .site-head .mark { font-size: 3.5rem; }
  .menu { display: none; }
  /* The links spread across the content width, between two rules. */
  .topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0 0.25rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    /* Jack, 2026-11-05: the row got lost in the glass roof's lines, then
       "make this menu clear". The roof fades out behind the words: a band
       of the page's color, nearly solid in the middle, soft at both ends. */
    background: linear-gradient(to right,
      transparent,
      color-mix(in srgb, var(--bg) 92%, transparent) 10%,
      color-mix(in srgb, var(--bg) 92%, transparent) 90%,
      transparent);
  }
  .topnav a,
  .topnav .soon {
    filter: drop-shadow(0 0 3px var(--bg)) drop-shadow(0 0 6px var(--bg));
  }
  /* Jack, 2026-10-31: still too small. Full size from 1000px; a little
     smaller at 900px so the row still fits on one line. */
  .topnav a,
  .topnav .soon {
    position: relative;
    font-family: var(--font-caps);
    font-size: clamp(1.2rem, 2.25vw, 1.5rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    -webkit-text-stroke: var(--menu-stroke);
    padding: 0.6rem 0;
  }
  /* The whole row in the menu's own color (Jack, 2026-11-01: make it stand
     out); the page you're on underlined in the floor's rose. */
  .topnav a {
    color: var(--menu-ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
  }
  .topnav a:hover { border-bottom-color: currentColor; }
  .topnav a[aria-current="page"] { border-bottom-color: var(--floor-rose); }
  .topnav .soon { color: var(--menu-ink); opacity: 0.8; cursor: default; }
  .topnav .soon small {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
  }
  .topnav .soon:hover small { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .menu[open] .drawer,
  .menu[open] > summary::before { animation: none; }
  .bars::before,
  .bars::after { transition: none; }
}
