/* ==========================================================================
   LOZICH — built on the Julia design system, verified against the live
   reference (juliajohnson.com) and retokenized with LOZICH's brand colors.

   Confirmed from the real site (overrides DESIGN.md where they conflicted):
   - Wordmark is a large HORIZONTAL graphic, fixed bottom-left, ~50% viewport
     width / ~32% viewport height — not a vertical full-height spine.
   - A separate small text brand-link (18px, bold) sits top-left, always on.
   - The photo field has NO border/box-shadow on the real site.
   - Category colors are soft/pastel there, tied to nav state.

   LOZICH-specific choices on top of the verified structure (per explicit
   request): chromatic hairline borders on tiles, and LOZICH's own brand
   colors (magenta + hues sampled from its own photography) instead of
   Julia's pastel set — the system's tokens are brand-portable by design.
   ========================================================================== */

@font-face {
  font-family: 'Bauhaus Apex Display';
  src: url('fonts/BauhausApexDisplay-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bauhaus Apex Display';
  src: url('fonts/BauhausApexDisplay-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-canvas: #ffffff;
  --color-ink: #000000;

  --color-frame-magenta: #ec008c;
  --color-frame-cobalt: #2e7db8;
  --color-frame-vermillion: #e2342a;
  --color-frame-fern: #4c8c3c;
  --color-frame-brass: #c9a227;

  --font-brand: 'Bauhaus Apex Display', 'Anton', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand-weight: 800;

  /* Reading font — everything EXCEPT the magenta "Lozich Creative" logos,
     the homepage/menu LOZICH wordmark, the 5 menu list entries and "Message
     sent" (those stay on --font-brand above). Inter: best all-round screen
     readability of the options considered, and reliably web-embeddable
     (unlike Helvetica Neue/Avenir Next, which need a license to serve as a
     real webfont and would otherwise silently fall back per visitor). */
  --font-secondary: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-secondary-weight: 500;

  --text-nav: 12px;
  --tracking-nav: -0.2px;
  --spacing-15: 15px;
  --radius: 0px;

  /* One category colour per content section — the SAME colour the pink
     menu sheet tints to when you hover that word in the list. Used for
     both that hover tint AND (single source of truth, so they can never
     drift apart) the top info bar while that section's popup is open, AND
     that popup's own title — which means each one does double duty as a
     BACKGROUND (white text on it) and as TEXT (sitting on white), so the
     same contrast-vs-white number governs legibility both ways. Every
     colour here is calibrated to clear ~3:1 against white at minimum,
     tuning lightness only (never hue, so each still reads as "the same"
     colour) — before this pass, cyan (2.41) and orange (2.87) were both
     under that floor and would have hit the same "text disappears" issue
     Get in Touch did. */
  --color-cat-purple: #7b2ff2;  /* Photography — 5.95:1, already well clear */
  --color-cat-cyan: #00a3bd;    /* Event Flyers — was #00b7d4 (2.41:1), darkened to 3.01:1 */
  --color-cat-orange: #ff611e;  /* Clients — was #ff6a00 (2.87:1); also nudged hue 25°→18° (more red), since it sat only 22° from yellow on the wheel */
  --color-cat-green: #1faa59;   /* About Me — 3.02:1, already right at the floor */
  /* Get in Touch — deliberately left as-is (2.04:1, the one colour still
     under the 3:1 floor). This is the color you iterated on directly
     across several rounds, explicitly choosing "more yellow" over more
     contrast each time — changing it again here would override that. If
     you want it brought up to the same floor as the others, the closest
     match keeping this hue is #b2911b (~3:1) or #8e7415 (~4.5:1, safer). */
  --color-cat-yellow: #dab120;

  /* Real height of .menu-popup-info (name/Instagram/phone/email), kept in
     sync by menu.js. The white panels (About Me, Get in Touch, Photography,
     Event Flyers) start below this instead of covering it, so that row —
     and its close button, which sits in the same reserved strip — always
     stays visible and clickable no matter which panel is open. The literal
     value here is only a first-paint fallback before JS measures the real
     one; it's intentionally generous (closer to the mobile height) so nothing
     is ever covered even for a split second. */
  --menu-info-h: 140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-secondary);
  font-weight: var(--font-secondary-weight);
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-weight: inherit; }

/* ---------------------------------------------------------------------- */
/* Top nav glass bar — the "Lozich" brand-link and Portfolio/Book links    */
/* both sit on top of this, so it reads as one Liquid Glass bar spanning   */
/* the whole top edge (Apple's own canonical use of the material: a        */
/* translucent bar for navigation/controls floating above content). Plain  */
/* backdrop-filter is enough here — no Canvas mask needed like the         */
/* wordmark, since the shape is just a rectangle.                          */
/* ---------------------------------------------------------------------- */

/* The bar starts perfectly clear (no blur/tint, invisible) and animates to
   full frost on every page load — reads as the glass "freezing" into
   place rather than just appearing. Pure CSS (fixed end values), so it
   replays on every reload with no JS needed. */
@keyframes nav-glass-freeze-in {
  0% {
    opacity: 0;
    -webkit-backdrop-filter: blur(0px) saturate(1) contrast(1) brightness(1);
    backdrop-filter: blur(0px) saturate(1) contrast(1) brightness(1);
  }
  100% {
    opacity: 1;
    -webkit-backdrop-filter: blur(18px) saturate(1.5) contrast(1.05) brightness(1.05);
    backdrop-filter: blur(18px) saturate(1.5) contrast(1.05) brightness(1.05);
  }
}

.nav-glass-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.30) 55%,
    rgba(255, 255, 255, 0.12) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  animation: nav-glass-freeze-in 1.3s cubic-bezier(0.16, 0.8, 0.24, 1) both;
}

/* WebGL refraction takes over the bar (liquid-glass-gl.js): the frosted
   gradient, backdrop blur, hairline border and highlight overlay are dropped —
   the glass is the canvas, which re-draws the photos behind the bar displaced
   by the bevel. Only the same "freeze in" entrance (opacity) remains. */
@keyframes nav-glass-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.nav-glass-bar.gl-glass {
  background: none;
  border-bottom: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: nav-glass-fade-in 1.3s cubic-bezier(0.16, 0.8, 0.24, 1) both;
}
.nav-glass-bar.gl-glass::after { display: none; }
.nav-glass-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Thin bright line along the very top edge — the glass "catching the
   light" of the screen's own top edge, same specular language as the
   wordmark's glass layer. */
.nav-glass-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, transparent 40%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

/* ---------------------------------------------------------------------- */
/* Small persistent text brand-link — top-left, always on                  */
/* ---------------------------------------------------------------------- */

.brand-link {
  position: fixed;
  top: var(--spacing-15);
  left: var(--spacing-15);
  z-index: 25;
  font-size: 18px;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  letter-spacing: -0.2px;
  text-transform: uppercase;
  color: #ffffff; /* white top-left brand text */
}

/* ---------------------------------------------------------------------- */
/* Menu button — a magenta square, fixed on screen just below the top bar, */
/* the same 46x46 size as the popups' own close buttons — a "+" drawn with */
/* the identical SVG line technique as their "×" (same viewBox, same       */
/* stroke), just rearranged into a plus instead of a cross. Opens the menu */
/* popup (menu.js).                                                        */
/* ---------------------------------------------------------------------- */

.menu-trigger {
  position: fixed;
  top: calc(48px + 12px); /* 48px = .nav-glass-bar height */
  right: var(--spacing-15);
  z-index: 25;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-frame-magenta);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-trigger svg { display: block; width: 100%; height: 100%; }

.menu-trigger:hover { background: #c8006f; }

.menu-trigger:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

/* ---------------------------------------------------------------------- */
/* Copyright — small, bottom-right, on EVERY screen: homepage, the pink     */
/* menu, all the white popups and the photo popup. One fixed element (the   */
/* pink menu no longer has its own copy) sitting above all of them, so the  */
/* same text is always there. Colour adapts to what's behind it, see the    */
/* two rules below. Never takes clicks. menu-preview.js, about.js and       */
/* contact-preview.js keep their random photos clear of it.                 */
/* ---------------------------------------------------------------------- */

.site-copyright {
  position: fixed;
  bottom: var(--spacing-15);
  right: var(--spacing-15);
  z-index: 210; /* above the lightbox (200), so it's on every popup */
  pointer-events: none;
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: rgba(0, 0, 0, 0.55); /* homepage / white popups */
  transition: color 0.3s ease;
}

/* Over the coloured pink menu sheet (no white popup or photo popup on top
   of it): white, as it always was there. */
body.menu-open:not(:has(.gallery-panel:is(.active, .leaving), .about-panel:is(.active, .leaving), .contact-panel:is(.active, .leaving), .lightbox.active)) .site-copyright {
  color: #fff;
}

@media (max-width: 860px) {
  .site-copyright { font-size: 11px; max-width: calc(100vw - 30px); text-align: center; left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); white-space: nowrap; }
}

/* ---------------------------------------------------------------------- */
/* Wordmark — live HTML text (Bauhaus Apex 800), not SVG/PNG. Its font-size */
/* and letter-spacing are calc()'d off --wm-w so it keeps the exact same    */
/* proportions the old 1400x340 SVG viewBox produced (300px font / -20px    */
/* tracking at a 1400px-wide box — same ratios, just expressed in CSS       */
/* instead of an SVG viewBox stretch). liquid-glass.js reads this element's */
/* real computed font and turns it into a Canvas mask, clips a             */
/* backdrop-filter layer to exactly that glyph shape, and makes this text   */
/* itself transparent — see that file for the glass effect proper.         */
/* ---------------------------------------------------------------------- */

.wordmark-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  --wm-w: min(90vw, 1400px);
  width: var(--wm-w);
  z-index: 15;
  pointer-events: none;
}

.lozich-logo {
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  font-size: calc(var(--wm-w) * 0.21428571);
  letter-spacing: calc(var(--wm-w) * -0.01428571);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  color: #000;
  user-select: none;
}

/* One glass layer PER LETTER — created by liquid-glass.js, each positioned
   over the live .lozich-logo text's full box and masked (via a
   Canvas-generated PNG, built from that text's own real computed
   font/size/tracking) to exactly ONE glyph's silhouette, so each letter can
   freeze in independently. backdrop-filter reads whatever photo tiles are
   actually painted behind it in real time — no duplicate photo field, no
   offset syncing, always in sync with what's really there, gaps included.
   backdrop-filter/opacity start at "clear glass" (set inline on creation)
   and transition up to their real values on a schedule liquid-glass.js
   sets per letter (transition-delay varies per letter, so it's set inline
   there too, not here). */
.lozich-liquid-glass-letter {
  position: fixed;
  z-index: 16;
  pointer-events: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  /* Light material tint — kept translucent, never white, so the photo
     content stays the star and the letters read as glass, not paint. */
  background: linear-gradient(165deg,
    rgba(255, 255, 255, 0.26) 0%,
    rgba(255, 255, 255, 0.11) 12%,
    rgba(255, 255, 255, 0.025) 38%,
    rgba(255, 255, 255, 0.018) 62%,
    rgba(255, 255, 255, 0.075) 82%,
    rgba(255, 255, 255, 0.17) 100%);
}

/* Specular reflection — bright upper-edge glint + soft diagonal sheen,
   confined to the letter because the parent itself is already masked. */
.lozich-liquid-glass-letter::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* Crisp bright hairline right at the top edge — same "fiozinho" the
       nav bar's glass shows at its own top/bottom edge, so both read as
       the same glass material catching light the same way. */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.9) 1.5%,
      transparent 4.5%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.50) 0%,
      rgba(255, 255, 255, 0.24) 7%,
      rgba(255, 255, 255, 0.075) 17%,
      transparent 35%),
    linear-gradient(125deg,
      rgba(255, 255, 255, 0.20),
      transparent 24%,
      transparent 68%,
      rgba(255, 255, 255, 0.07)),
    radial-gradient(ellipse at 28% 10%, rgba(255, 255, 255, 0.24), transparent 44%);
  mix-blend-mode: screen;
  opacity: 0.82;
}

/* Optical edge — restrained cyan/magenta dispersion at the left/right edges
   plus a lighter-top/darker-bottom gradient for a sense of glass thickness. */
.lozich-liquid-glass-letter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(65, 190, 255, 0.13),
      transparent 6%,
      transparent 91%,
      rgba(65, 190, 255, 0.055)),
    linear-gradient(270deg,
      rgba(255, 90, 180, 0.10),
      transparent 7%,
      transparent 92%,
      rgba(255, 90, 180, 0.04)),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.15),
      transparent 20%,
      transparent 72%,
      rgba(0, 0, 0, 0.11));
  mix-blend-mode: screen;
  opacity: 0.68;
}

/* Crisp white outline around all the glyphs together, above the glass
   fill — a plain white block masked to a Canvas-stroked version of the
   SAME glyph paths each letter's fill mask uses (see liquid-glass.js), not
   real text, so it can never drift out of alignment with the fill. This is
   what appears first, alone, 2s after load — the per-letter glass fills
   above freeze in afterward, on their own randomized schedule set inline
   by liquid-glass.js (not here, since it varies letter to letter). */
/* Homepage letters use REFRACTION (liquid-glass.js): a transparent layer whose
   backdrop-filter is an SVG displacement filter, with no milky tint, no
   gradient wash and no dispersion overlay. Its light comes from the rim
   texture on #lozich-liquid-glass-stroke, generated from the glyph geometry.
   (The pink-menu wordmark, menu-glass.js, still uses the base styling above.) */
.lozich-liquid-glass-letter.lg-refract {
  background: none;
}
.lozich-liquid-glass-letter.lg-refract::before,
.lozich-liquid-glass-letter.lg-refract::after {
  content: none;
}

/* WebGL refraction canvas (liquid-glass-gl.js): sits exactly over the logo, above
   the photo field and below the tiles that travel in front of the logo. */
#lozich-glass-gl {
  position: fixed;
  z-index: 17;
  pointer-events: none;
}

#lozich-liquid-glass-stroke {
  position: fixed;
  z-index: 18;
  pointer-events: none;
  margin: 0;
  padding: 0;
  /* Rim light texture (image set by liquid-glass.js) — light along the glass
     edge, not a drawn outline. */
  background: transparent no-repeat 0 0 / 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* ---------------------------------------------------------------------- */
/* Infinite parallax field — fixed full-viewport, mouse-panned, wraps       */
/* ---------------------------------------------------------------------- */

.parallax-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  touch-action: none;
}

/* Static home for the fixed, deterministic subset of tiles parallax.js
   assigns to travel in front of the logo — populated once at creation,
   never reparented at runtime. Stacked above the wordmark's glass layers
   (z-index up to 18) so those tiles paint in front of the logo instead of
   only ever showing through it. */
.logo-tile-overlay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 19;
  pointer-events: none;
  touch-action: none;
}

.logo-tile-overlay .tile {
  pointer-events: auto;
}

.tile {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
  will-change: transform;
}

/* Hover indicator — a circle badge centered on the tile, signaling it's
   clickable. A subtle dark scrim behind it keeps it visible on any photo. */
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.tile::after {
  /* Square "+" the size of the menu button (.menu-trigger): 46x46, magenta outline, the
     same SVG plus (46-unit viewBox, 2-unit stroke) drawn as a background
     since a pseudo-element can't hold an <svg>. */
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  box-sizing: border-box;
  border: 2px solid var(--color-frame-magenta); /* pink stroke only — no pink fill */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M23 8 L23 38 M8 23 L38 23' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat border-box;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.tile:hover::before { background: rgba(0, 0, 0, 0.25); }
.tile:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------------------------------------------------------------------- */
/* Menu popup — full-screen magenta sheet that slides DOWN from the top.   */
/* Closed = parked above the screen (translateY(-100%)) and hidden; open  */
/* = slid into place. The page behind stays visible during the slide (it   */
/* is only frozen, see menu.js), so the sheet visibly drops over it.       */
/* ---------------------------------------------------------------------- */

.menu-popup {
  --sheet-color: var(--color-frame-magenta);
  position: fixed;
  inset: 0;
  z-index: 100;
  color: #fff;
  font-family: var(--font-secondary);
  overflow: hidden;
  cursor: pointer;
  transform: translateY(-100%);
  visibility: hidden;
  /* Parked (closed) state — no transition of its own. Leaving is animated by
     the .leaving state below (see panel-motion.js), which carries the sheet
     on OUT the side it came in from. */
  transition: none;
}

.menu-popup.active {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.85s cubic-bezier(0.16, 0.8, 0.24, 1), visibility 0s;
}

.menu-popup a { color: inherit; }

/* The magenta itself. menu-glass.js cuts the LOZICH letters out of it with
   a CSS mask (the mask is generated from the wordmark's real font), so the
   page behind — the gallery, still drifting — shows through those letters. */
.menu-popup-sheet {
  position: absolute;
  inset: 0;
  background: var(--sheet-color);
  transition: background-color 0.45s ease;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Top row — name / Instagram / contact, on the same 4-column grid the
   menu list hangs from (list starts at the 3rd column). */
.menu-popup-info {
  position: relative; /* so it paints above the (positioned) magenta sheet */
  z-index: 3; /* above the preview thumbnails (2) — they must never cover this row */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  /* Equal top/bottom padding on purpose — the white panels start right at
     this row's own bottom edge (see --menu-info-h), so this bottom gap IS
     the gap between the text and the popup below it, and it should match
     the gap above the text for the row to read as evenly centered rather
     than glued to the popup. */
  padding: 15px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

/* The name top-left is the SAME text (and logo) as the homepage's
   .brand-link — same size, font, tracking, case and position — so it reads
   as the one element staying put while the sheet drops over it. Stays on
   --font-brand like that logo does, even though the rest of this info row
   (Instagram/phone/email) switched to --font-secondary. */
.menu-popup-name {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: var(--font-brand-weight);
  letter-spacing: -0.2px;
  line-height: normal;
  text-transform: uppercase;
}

.menu-popup-contact { display: flex; flex-direction: column; }

/* Grid items (and flex items, like the phone number inside
   .menu-popup-contact) stretch to fill their column/container width by
   default — so these links' actual CLICKABLE box was the full column
   width, not just the visible text, which is what let a click well past
   "info@lozich.com" itself still trigger the mailto: link. Shrinking each
   to its own content fixes the hit area for all of them (Instagram, phone,
   email) at once. */
.menu-popup-info a { width: fit-content; }

/* The email sits in the 4th column — the mirror of the Instagram handle in
   the 2nd — between the phone numbers and the close button. */
.menu-popup-email { grid-column: 4; }

.menu-popup-close {
  position: absolute;
  z-index: 3; /* above the preview thumbnails (2) */
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.menu-popup-close:hover { background: rgba(0, 0, 0, 0.45); }
.menu-popup-close:focus:not(:focus-visible) { outline: none; }
.menu-popup-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Disabled (hidden, unclickable, untabbable) while any of the white panels
   is open — that panel has its own close button now, in the same corner,
   so there must only ever be ONE visible/working close control there at a
   time. :has() reads the panels' live 'active' state directly, so this can
   never drift out of sync with which one is actually open. */
body:has(.about-panel:is(.active, .leaving)) .menu-popup-close,
body:has(.contact-panel:is(.active, .leaving)) .menu-popup-close,
body:has(.gallery-panel:is(.active, .leaving)) .menu-popup-close {
  visibility: hidden;
}
.menu-popup-close svg { display: block; width: 100%; height: 100%; }

/* Big list — starts at the 3rd column, ~15% down. */
.menu-popup-list {
  position: absolute;
  z-index: 3; /* above the preview thumbnails (2) — they must never cover this */
  top: 15%;
  left: calc(50% + 10px);
  display: flex;
  flex-direction: column;
}

.menu-popup-list a {
  font-family: var(--font-brand); /* stays on the brand face, unlike the rest of the popup */
  font-size: clamp(28px, 2.4vw, 64px);
  font-weight: var(--font-brand-weight);
  line-height: 1.07;
  letter-spacing: -0.03em;
  /* Entries rise into place, one after another, once the sheet is down. */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

/* The entry-by-entry delays below apply to opacity and transform only —
   colour (the hover feedback) must never wait on them, hence the
   three-value delay lists. */
.menu-popup.active .menu-popup-list a {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 0.8, 0.24, 1), color 0.25s ease;
}

.menu-popup.active .menu-popup-list a:nth-child(1) { transition-delay: 0.35s, 0.35s, 0s; }
.menu-popup.active .menu-popup-list a:nth-child(2) { transition-delay: 0.41s, 0.41s, 0s; }
.menu-popup.active .menu-popup-list a:nth-child(3) { transition-delay: 0.47s, 0.47s, 0s; }
.menu-popup.active .menu-popup-list a:nth-child(4) { transition-delay: 0.53s, 0.53s, 0s; }
.menu-popup.active .menu-popup-list a:nth-child(5) { transition-delay: 0.59s, 0.59s, 0s; }

/* The hovered (or keyboard-focused) word turns a much lighter version of
   the colour the sheet takes on — 30% of it over white — so it's clear
   which entry the pointer is on. Values are the sheet colours below mixed
   30/70 with white. */
.menu-popup-list a[data-hover="purple"] { --word-hover: #d7c1fb; }
.menu-popup-list a[data-hover="cyan"] { --word-hover: #b3e9f2; }
.menu-popup-list a[data-hover="orange"] { --word-hover: #ffd2b3; }
.menu-popup-list a[data-hover="green"] { --word-hover: #bce6cd; }
.menu-popup-list a[data-hover="mustard"] { --word-hover: #f1e1b3; }
.menu-popup-list a:hover,
.menu-popup-list a:focus-visible { color: var(--word-hover, #fff); }

/* Hovering (or keyboard-focusing) a list entry tints the whole sheet —
   menu.js sets data-hover on the popup to the entry's colour name, which
   swaps --sheet-color (used by the sheet and the letter fillers). */
.menu-popup[data-hover="purple"] { --sheet-color: var(--color-cat-purple); }
.menu-popup[data-hover="cyan"] { --sheet-color: var(--color-cat-cyan); }
.menu-popup[data-hover="orange"] { --sheet-color: var(--color-cat-orange); }
.menu-popup[data-hover="green"] { --sheet-color: var(--color-cat-green); }
.menu-popup[data-hover="mustard"] { --sheet-color: var(--color-cat-yellow); }

/* Same tint, but PERSISTENT for as long as that section's popup stays
   open — not just while the pointer happens to be hovering the word.
   #menu-popup (an ID) always wins over the [data-hover] class rules
   above regardless of source order, so this correctly takes over the
   moment a popup opens, and a stray hover elsewhere in the list while one
   is open can't fight it. :has() reads the panels' live 'active' state
   directly, so it can never drift out of sync with which one is open. */
body:has(#photography-panel.active) #menu-popup { --sheet-color: var(--color-cat-purple); }
body:has(#flyers-panel.active) #menu-popup { --sheet-color: var(--color-cat-cyan); }
body:has(#clients-panel.active) #menu-popup { --sheet-color: var(--color-cat-orange); }
body:has(#about-panel.active) #menu-popup { --sheet-color: var(--color-cat-green); }
body:has(#contact-panel.active) #menu-popup { --sheet-color: var(--color-cat-yellow); }

/* While a panel is still sliding OUT (.leaving) keep its tint, so the info
   bar doesn't flash back to magenta under a panel that's still on screen —
   it eases back only once the panel is gone. Only when no other panel is
   already open (that one's tint, above, must win). */
body:has(#photography-panel.leaving):not(:has(.gallery-panel.active, .about-panel.active, .contact-panel.active)) #menu-popup { --sheet-color: var(--color-cat-purple); }
body:has(#flyers-panel.leaving):not(:has(.gallery-panel.active, .about-panel.active, .contact-panel.active)) #menu-popup { --sheet-color: var(--color-cat-cyan); }
body:has(#clients-panel.leaving):not(:has(.gallery-panel.active, .about-panel.active, .contact-panel.active)) #menu-popup { --sheet-color: var(--color-cat-orange); }
body:has(#about-panel.leaving):not(:has(.gallery-panel.active, .about-panel.active, .contact-panel.active)) #menu-popup { --sheet-color: var(--color-cat-green); }
body:has(#contact-panel.leaving):not(:has(.gallery-panel.active, .about-panel.active, .contact-panel.active)) #menu-popup { --sheet-color: var(--color-cat-yellow); }

/* Giant wordmark, bottom-left — same face and tracking as the main logo.
   Like the homepage's, the live text is invisible: it only defines the
   box and font the glass layers (menu-glass.js) are built from. Those
   layers are its children, so they always sit exactly on the letters. */
.menu-popup-wordmark {
  position: absolute;
  z-index: 1; /* under the preview thumbnails (2) — those are allowed to cover it */
  left: 12px;
  bottom: 14px;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  font-size: 14vw;
  line-height: 0.74;
  letter-spacing: -0.0667em;
  white-space: nowrap;
  user-select: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* WebGL glass for the wordmark (liquid-glass-gl.js) — a canvas the size of the
   word, above the colour plugs, inside the sliding popup. */
.menu-glass-gl {
  position: absolute;
  pointer-events: none;
}

/* Solid patch of sheet colour in a letter's shape (menu-glass.js), covering
   the cut-out until that letter's glass has frozen in. */
.menu-glass-fill {
  position: absolute;
  pointer-events: none;
  background: var(--sheet-color);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Same glass as the homepage letters (.lozich-liquid-glass-letter carries
   the tint, specular and edge-dispersion styling) — only re-anchored to sit
   inside the wordmark instead of fixed to the viewport. */
.menu-popup-wordmark .lozich-liquid-glass-letter {
  position: absolute;
  inset: 0;
  z-index: auto;
}

/* ---------------------------------------------------------------------- */
/* Menu preview thumbnails — LAYOUT PLACEHOLDER ONLY (menu-preview.js).    */
/* Three photos drift up into random spots while a category is hovered;   */
/* real per-category content replaces this pool split later.              */
/* ---------------------------------------------------------------------- */

.menu-preview-layer {
  position: absolute;
  inset: 0;
  z-index: 2; /* above the wordmark (1), below the info row/list/close (3) */
  pointer-events: none;
  overflow: hidden;
}

.menu-preview-thumb {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  opacity: 0;
  /* The actual position (translate(x, y)) and the rise/descend offset
     stacked on top of it are both set inline by menu-preview.js, per
     thumbnail — only the transition and the opacity toggle live here. */
  transition: transform 0.55s cubic-bezier(0.16, 0.8, 0.24, 1), opacity 0.4s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.menu-preview-thumb.is-shown { opacity: 1; }

@media (max-width: 860px) {
  .menu-popup-info { grid-template-columns: 1fr 1fr; row-gap: 10px; padding-right: 70px; }
  .menu-popup-contact { grid-column: 1 / -1; }
  .menu-popup-email { grid-column: 1 / -1; }
  .menu-popup-list { top: 24%; left: 18px; }
  .menu-popup-list a { font-size: clamp(30px, 9vw, 52px); }
  .menu-popup-wordmark { font-size: 24vw; }
}

/* Fixed stage for the white panels — see index.html. z-index/clipping live
   here, once, instead of on each panel. */
.panel-stage {
  position: fixed;
  top: var(--menu-info-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 150; /* above the menu popup (100) */
  overflow: hidden;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* "Photography" / "Event Flyers" gallery panels — plain white sheets       */
/* holding an auto-scrolling horizontal filmstrip (photo-gallery.js).       */
/* Photography enters from the TOP, Event Flyers from the BOTTOM — picked   */
/* per panel by [data-enter]; everything else about them is identical.      */
/* ---------------------------------------------------------------------- */

.gallery-panel {
  /* Fills .panel-stage, which starts below the pink menu's info row (see
     --menu-info-h) and provides the z-index/clipping. */
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: var(--color-canvas);
  color: var(--color-ink);
  overflow: hidden;
  cursor: default;
  visibility: hidden;
  transition: none; /* parked; the exit is the .leaving state (panel-motion.js) */
}

.gallery-panel[data-enter="top"] { transform: translateY(-100%); }
.gallery-panel[data-enter="bottom"] { transform: translateY(100%); }

/* Each panel's own category colour (see --color-cat-* in :root) — read by
   .gallery-panel-title below. Same colour the pink menu sheet tints to
   when you hover this section's word in the list. */
#photography-panel { --panel-color: var(--color-cat-purple); }
#flyers-panel { --panel-color: var(--color-cat-cyan); }
#clients-panel { --panel-color: var(--color-cat-orange); }

.gallery-panel.active {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), visibility 0s;
}

.gallery-panel-close {
  /* Anchored to .gallery-panel itself (it has its own transform, which
     already makes it the containing block for a `fixed` descendant — this
     is just making that explicit) so it sits at this panel's own top-right
     corner, below the pink menu's now-persistent info row/close button,
     never on top of or fighting with it for clicks. */
  position: absolute;
  z-index: 151;
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.gallery-panel-close:hover { background: rgba(0, 0, 0, 0.12); }
.gallery-panel-close:focus:not(:focus-visible) { outline: none; }
.gallery-panel-close:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.gallery-panel-close svg { display: block; width: 100%; height: 100%; }

/* Panel name — "Photography" / "Event Flyers", stays on --font-brand like
   the same words in the menu list. Fixed top-left, above the strip but
   never intercepting its hover/click (pointer-events: none), so it never
   fights the gallery for mouse events the way the About panel's text
   block once accidentally did (see the fix in .about-panel-inner). */
/* Groups the title with the strip so they move and center as ONE unit —
   the title always sits a fixed 16px above the actual photos, wherever
   that lands vertically, instead of being pinned near the panel's own top
   edge (which, now that the panel starts below the pink info row, isn't
   the same place as "just above the gallery" on every viewport). Spans
   the full panel so the group can be vertically centered, but stays
   click-through except where the strip itself re-enables it — the same
   "transparent wrapper" fix .about-panel-inner needed. */
.gallery-panel-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 0 var(--spacing-15);
  pointer-events: none;
}

.gallery-panel-title {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  /* Same size as the words in the pink menu list (.menu-popup-list a). */
  font-size: clamp(28px, 2.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-transform: none; /* first letter capital only, like the pink menu list */
  color: var(--panel-color);
}

/* The scrollable viewport, tiles laid out left-to-right in
   .gallery-strip-track by photo-gallery.js and translated horizontally
   (toroidal wrap, same trick as parallax.js's tiles: one DOM node per
   photo, modulo-wrapped position, never duplicated or re-cloned). */
.gallery-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: ew-resize;
  pointer-events: auto; /* re-enable — .gallery-panel-body disabled it */
}

.gallery-strip-track {
  position: relative;
  width: 100%;
}

/* Edge zones (photo-gallery.js) — hovering one speeds the strip up (right)
   or reverses it (left) and reveals a chevron: half of the close
   buttons' "×", drawn the same way (46x46 viewBox, 2-unit stroke, scaled
   up), in the panel's own title colour with no box behind it. They
   sit over the outermost photos, so they only exist for hover-capable
   pointers; on touch they'd just block taps. */
.gallery-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(92px, 9vw, 150px);
  z-index: 3;
  display: none;
  align-items: center;
  cursor: pointer;
}
@media (hover: hover) { .gallery-edge { display: flex; } }
.gallery-edge-left { left: 0; justify-content: flex-start; padding-left: 12px; }
.gallery-edge-right { right: 0; justify-content: flex-end; padding-right: 12px; }

.gallery-edge-arrow {
  width: 68px;
  height: 68px;
  color: var(--panel-color); /* same colour as this panel's title */
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.gallery-edge-arrow svg { display: block; width: 100%; height: 100%; }
.gallery-edge:hover .gallery-edge-arrow { opacity: 1; }

.gallery-tile {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Same hover affordance as the homepage tiles (.tile::after) — a small "+"
   badge confirming these open the lightbox too. */
.gallery-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}
.gallery-tile::after {
  /* Square "+" the size of the menu button (.menu-trigger): 46x46, magenta outline, the
     same SVG plus (46-unit viewBox, 2-unit stroke) drawn as a background
     since a pseudo-element can't hold an <svg>. */
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  box-sizing: border-box;
  border: 2px solid var(--color-frame-magenta); /* pink stroke only — no pink fill */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M23 8 L23 38 M8 23 L38 23' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat border-box;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.gallery-tile:hover::before { background: rgba(0, 0, 0, 0.25); }
.gallery-tile:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Clients — logo grid instead of a photo strip. Sits in the same
   .gallery-panel-body as the other two panels, so the title lands in the
   exact same spot, and the grid fills the same vertical band the photo
   tiles do (photo-gallery.js's tileSize(): 60% of the viewport height,
   clamped 220-620px) so the popups share one visual identity. Scrolls
   inside that band if the logos outgrow it. Click-through wrapper, so
   the grid re-enables pointer events for itself. */
.clients-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  height: clamp(220px, 60vh, 620px);
  overflow-y: auto;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  pointer-events: auto;
}

/* PLACEHOLDER logo tiles — plain grey rectangles until the real PNGs exist. */
.clients-logo {
  aspect-ratio: 3 / 2;
  background: #d9d9d9;
}

@media (max-width: 860px) {
  .gallery-panel-title { font-size: clamp(30px, 9vw, 52px); } /* matches .menu-popup-list a's own mobile size */
}

/* ---------------------------------------------------------------------- */
/* "About Me" panel — plain white sheet that slides in from the LEFT, over */
/* the still-open pink menu popup (about.js) — the mirror image of the     */
/* "Get in Touch" panel below, which slides in from the right. Closing it  */
/* just hides it again — the pink popup underneath was never closed.       */
/* ---------------------------------------------------------------------- */

/* Same category colour the pink menu sheet tints to on hover — read by
   .about-name below (see --color-cat-* in :root). */
#about-panel { --panel-color: var(--color-cat-green); }

.about-panel {
  /* Fills .panel-stage, which starts below the pink menu's info row (see
     --menu-info-h) and provides the z-index/clipping. */
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: var(--color-canvas);
  color: var(--color-ink);
  overflow-y: auto;
  cursor: default;
  transform: translateX(-100%);
  visibility: hidden;
  transition: none; /* parked; the exit is the .leaving state (panel-motion.js) */
}

.about-panel.active {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), visibility 0s;
}

.about-panel-close {
  /* Anchored to .about-panel itself — see the identical note on
     .gallery-panel-close. */
  position: absolute;
  z-index: 151;
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.about-panel-close:hover { background: rgba(0, 0, 0, 0.12); }
.about-panel-close:focus:not(:focus-visible) { outline: none; }
.about-panel-close:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.about-panel-close svg { display: block; width: 100%; height: 100%; }

.about-panel-inner {
  position: relative;
  z-index: 2; /* above the random photos (1) */
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 110px 60px 60px;
  /* This flex container spans the panel's full width even though its
     content (.about-text) doesn't — without this, its empty space was
     silently capturing hover/clicks meant for the photos underneath,
     including over about-photo-b, which killed the hover-swap. Only the
     text itself needs to stay interactive/selectable. */
  pointer-events: none;
}

/* Name (stays on --font-brand, like the other logo-ish text on this site) +
   bio (reading text, so --font-secondary like everything else this size),
   left-aligned on the left side of the panel. Capped width so the random
   photos always have real room to land in without crowding the text. */
.about-text {
  max-width: 560px;
  text-align: left;
  pointer-events: auto;
}

.about-name {
  margin: 0 0 20px 0;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  /* Same size as the words in the pink menu list (.menu-popup-list a). */
  font-size: clamp(28px, 2.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-transform: none; /* first letter capital only, like the pink menu list */
  color: var(--panel-color);
}

.about-bio {
  margin: 0;
  font-family: var(--font-secondary);
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.8);
}

/* Random-position photo layer, covering the whole panel — about.js places
   both photos (up to double their original size) anywhere they fit
   without covering .about-text or the close button, or each other,
   re-rolled fresh every time the panel opens. Same positioning convention
   as .contact-preview-layer/.menu-preview-layer: each .about-photo gets an
   inline translate(x, y) for its resting spot plus width/height, all set
   by JS, with only the transition and rise/enter animation living here. */
.about-photos {
  position: absolute;
  inset: 0;
  z-index: 1; /* below the text (2) */
  pointer-events: none;
  overflow: hidden;
}

.about-photo {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: auto; /* re-enable — the layer above disables it, but each photo must still catch hover */
  cursor: pointer;
  /* The resting position (translate(x, y)) and the rise-in offset stacked
     on top of it are both set inline by about.js, per photo — see
     menu-preview.js/contact-preview.js for the same convention. */
  transition: width 0.5s cubic-bezier(0.16, 0.8, 0.24, 1), height 0.5s cubic-bezier(0.16, 0.8, 0.24, 1),
    transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), opacity 0.45s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.about-photo.is-shown { opacity: 1; }

@media (max-width: 860px) {
  .about-panel-inner { align-items: flex-start; padding: 90px 20px 40px; }
  .about-text { max-width: none; }
  .about-name { font-size: clamp(30px, 9vw, 52px); } /* matches .menu-popup-list a's own mobile size */
}

/* ---------------------------------------------------------------------- */
/* "Get in Touch" contact panel — plain white sheet that slides in from    */
/* the right, over the still-open pink menu popup (contact-form.js).      */
/* Closing it, or a successful send, just hides it again — the pink popup  */
/* underneath was never closed, so it's what reappears.                    */
/* ---------------------------------------------------------------------- */

/* Same category colour the pink menu sheet tints to on hover — read by
   .contact-form-title and .contact-sent below (see --color-cat-* in
   :root). */
#contact-panel { --panel-color: var(--color-cat-yellow); }

.contact-panel {
  /* Fills .panel-stage, which starts below the pink menu's info row (see
     --menu-info-h) and provides the z-index/clipping. */
  position: absolute;
  inset: 0;
  pointer-events: auto;
  background: var(--color-canvas);
  color: var(--color-ink);
  overflow-y: auto;
  cursor: default;
  transform: translateX(100%);
  visibility: hidden;
  transition: none; /* parked; the exit is the .leaving state (panel-motion.js) */
}

.contact-panel.active {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), visibility 0s;
}

/* Random photos filling the white space around the form (contact-
   preview.js) — reuses .menu-preview-thumb's look. Sits below the form and
   the close button, and never geometrically overlaps them (their own
   bounding boxes are excluded zones at placement time), so this z-index
   ordering is a belt-and-braces guard rather than the thing doing the work. */
.contact-preview-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.contact-panel-close {
  /* Anchored to .contact-panel itself — see the identical note on
     .gallery-panel-close. */
  position: absolute;
  z-index: 151;
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.contact-panel-close:hover { background: rgba(0, 0, 0, 0.12); }
.contact-panel-close:focus:not(:focus-visible) { outline: none; }
.contact-panel-close:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.contact-panel-close svg { display: block; width: 100%; height: 100%; }

.contact-panel-inner {
  position: relative;
  z-index: 2; /* above the preview photos (1) */
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 60px;
}

.contact-form {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-form-title {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  /* Same size as the words in the pink menu list (.menu-popup-list a). */
  font-size: clamp(28px, 2.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-transform: none; /* first letter capital only, like the pink menu list */
  color: var(--panel-color);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 0;
  background: transparent;
  padding: 8px 2px;
  font-family: var(--font-secondary);
  font-size: 17px;
  font-weight: 400;
  color: var(--color-ink);
  text-transform: none;
  letter-spacing: normal;
  transition: border-color 0.2s ease;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-bottom-color: var(--panel-color); /* the panel's own colour (yellow), not the brand pink */
}
.contact-field textarea { resize: vertical; min-height: 90px; }

.contact-error {
  margin: -10px 0 0 0;
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-frame-vermillion);
}

.contact-submit {
  align-self: flex-start;
  margin-top: 4px;
  padding: 14px 36px;
  border: 0;
  border-radius: 0;
  background: var(--panel-color);
  /* --panel-color here is the bright yellow — white text on it would be
     close to unreadable, so this uses the page ink instead of the white
     used elsewhere for magenta/dark buttons. */
  color: var(--color-ink);
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.contact-submit:hover { filter: brightness(0.88); }
.contact-submit:disabled { opacity: 0.55; cursor: default; }

.contact-sent {
  display: none;
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  /* Same size as the words in the pink menu list (.menu-popup-list a). */
  font-size: clamp(28px, 2.4vw, 64px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--panel-color);
}

/* Swap: the confirmation replaces the form entirely rather than sitting
   alongside it, so there's never a moment with both (or neither) visible. */
.contact-panel.is-sent .contact-form { display: none; }
.contact-panel.is-sent .contact-sent { display: block; }

@media (max-width: 860px) {
  .contact-panel-inner { align-items: flex-start; padding: 90px 20px 40px; }
  /* Match .menu-popup-list a's own mobile size. */
  .contact-form-title,
  .contact-sent { font-size: clamp(30px, 9vw, 52px); }
}

/* ---------------------------------------------------------------------- */
/* Leaving — every popup exits through the side OPPOSITE the one it came    */
/* in from, i.e. it keeps travelling in the direction it entered (down in,  */
/* down out; left in, left out...). panel-motion.js adds .leaving the       */
/* moment .active is removed and drops it once the slide is over, which     */
/* snaps the sheet back to its (hidden) parked spot for next time. The      */
/* easing pulls back a little against the direction of travel before it     */
/* flies off — the "slight elastic" feel (an ease-in-back curve).           */
/* ---------------------------------------------------------------------- */

.menu-popup.leaving,
.gallery-panel.leaving,
.about-panel.leaving,
.contact-panel.leaving {
  visibility: visible;
  transition: transform 0.65s cubic-bezier(0.55, -0.22, 0.75, 0.05);
}

/* The pink menu is the one exception: it doesn't fall on through the bottom,
   it goes back up to where it was parked — the reverse of its entrance, with
   a plain ease-in (no elastic dip). */
.menu-popup.leaving {
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.84, 0);
}
.gallery-panel.leaving[data-enter="top"] { transform: translateY(100%); }
.gallery-panel.leaving[data-enter="bottom"] { transform: translateY(-100%); } /* slides under .panel-stage's top edge */
.about-panel.leaving { transform: translateX(100%); }              /* came in from the left   */
.contact-panel.leaving { transform: translateX(-100%); }           /* came in from the right  */

/* ---------------------------------------------------------------------- */
/* Lightbox — full-screen pop-up: enlarged photo + credits/story sidebar   */
/* ---------------------------------------------------------------------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200; /* above every white panel (150) — it can be opened from inside any of them now */
  background: var(--color-canvas);
  overflow-y: auto;
}

.lightbox.active { display: flex; cursor: pointer; }

/* Same close button as every white panel's (.gallery-panel-close etc.):
   46x46 square, light grey fill, the same SVG "×". Sits at the same 12px
   corner offset. */
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 201; /* above .lightbox itself (200) */
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close svg { display: block; width: 100%; height: 100%; }

.lightbox-close:hover { background: rgba(0, 0, 0, 0.12); }
.lightbox-close:focus:not(:focus-visible) { outline: none; }
.lightbox-close:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

.lightbox-inner {
  /* Equal padding top and bottom (was 90px top / 15px bottom, purely to
     clear the close button — that button is position:fixed and doesn't
     need flow space reserved for it) so margin:auto centers this block
     with the same amount of white space above and below. */
  --lightbox-pad-y: 40px;
  margin: auto;
  width: 100%;
  max-width: 1700px;
  padding: var(--lightbox-pad-y) var(--spacing-15);
  display: flex;
  gap: 100px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-image {
  position: relative;
  flex: 1 1 650px;
  max-width: 1050px;
  /* Capped to the viewport (minus this block's own top/bottom padding) so
     a tall portrait photo shrinks to fit instead of forcing the page to
     scroll — object-fit:contain on the img then keeps its aspect ratio. */
  max-height: calc(100vh - var(--lightbox-pad-y) * 2);
  line-height: 0;
}

.lightbox-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - var(--lightbox-pad-y) * 2);
  margin: 0 auto;
  object-fit: contain;
}

/* Client testimonial — lives in the info sidebar next to title/story/date,
   not overlaid on the photo. A thin left rule marks it as a quote,
   distinct from the plain description text above it. */
.lightbox-testimonial {
  margin-top: 8px;
  padding-left: 18px;
  border-left: 2px solid var(--color-frame-magenta);
  font-family: var(--font-secondary);
}

.lightbox-testimonial p {
  margin: 0;
}

#lightbox-testimonial-quote {
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-ink);
}

#lightbox-testimonial-author {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
}

.lightbox-info {
  flex: 0 1 380px;
  color: var(--color-ink);
  font-family: var(--font-secondary);
  align-self: flex-start;
}

.lightbox-info h2 {
  font-family: var(--font-brand);
  font-weight: var(--font-brand-weight);
  font-size: 36px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 18px 0;
}

.lightbox-info p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  margin: 0 0 18px 0;
  color: rgba(0, 0, 0, 0.75);
}

.lightbox-date {
  font-family: var(--font-brand) !important; /* the year stays on the brand face, like the title above it */
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 24px !important;
  font-weight: var(--font-brand-weight) !important;
  color: var(--color-frame-magenta) !important;
}

body.lightbox-open .parallax-field,
body.lightbox-open .logo-tile-overlay,
body.lightbox-open .wordmark-box,
body.lightbox-open #lozich-glass-gl,
body.lightbox-open .lozich-liquid-glass-letter,
body.lightbox-open #lozich-liquid-glass-stroke,
body.lightbox-open .nav-glass-bar,
body.lightbox-open .brand-link,
body.lightbox-open .menu-trigger {
  visibility: hidden;
}

@media (max-width: 860px) {
  .wordmark-box { --wm-w: 92vw; width: var(--wm-w); }
  .lightbox-inner { padding-top: 70px; gap: 25px; }
}

/* Photos cannot be dragged out of the page (see protect.js). */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Phones: whole photos in two columns, scrolling (see mobileGrid in parallax.js). */
.parallax-field.is-mobile-grid {
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  padding: 64px 4px 24px;
  -webkit-overflow-scrolling: touch;
  columns: 2;
  column-gap: 4px;
}
.parallax-field.is-mobile-grid .mobile-tile {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  margin: 0 0 4px;
  transform: none;
  will-change: auto;
  break-inside: avoid;
}
.parallax-field.is-mobile-grid .mobile-tile img {
  width: 100%;
  height: auto;
  display: block;
}

/* Phones: the top-left brand text is centered at the top. */
@media (max-width: 767px) {
  .brand-link {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
}

/* Lightbox: miniatures of the other photos of the same person (lightbox.js). */
.lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.lightbox-thumbs button {
  width: 112px;
  height: 140px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.lightbox-thumbs button.is-current,
.lightbox-thumbs button:hover { opacity: 1; }
.lightbox-thumbs button.is-current { outline: 1px solid #fff; outline-offset: 2px; }
.lightbox-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Category buttons on the Photography panel (the panel is white, so the
   buttons take the panel colour) */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.cat-filter, .cat-filter button { pointer-events: auto; } /* .gallery-panel-body turns pointer events off for its children */
.cat-filter button { background: transparent; border: 1px solid var(--panel-color, #000); color: var(--panel-color, #000); padding: 9px 13px; font: 600 11px/1 Inter, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.cat-filter button:hover { background: color-mix(in srgb, var(--panel-color, #000) 12%, transparent); }
.cat-filter button.on { background: var(--panel-color, #000); color: #fff; }
.cat-empty { color: var(--panel-color, #000); font-size: 13px; margin: 0 0 12px; }

/* Photos in the Photography / Event Flyers strip slide in from outside the page */
.gallery-tile-inner { width: 100%; height: 100%; opacity: 0; transform: translateX(60vw); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease; will-change: transform, opacity; }
.gallery-tile-inner.is-in { opacity: 1; transform: none; }
.gallery-tile-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Client name in the corner of a photo, visible on hover */
.gallery-tile-name { position: absolute; left: 10px; bottom: 10px; z-index: 3; max-width: calc(100% - 20px); padding: 4px 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font: 600 11px/1.3 Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; }
.gallery-tile:hover .gallery-tile-name { opacity: 1; }


/* "Menu" hint next to the magenta + button: shows for ~3 s on page load (menu.js). */
.menu-hint {
  position: fixed;
  top: calc(48px + 12px + 23px);
  right: calc(var(--spacing-15) + 46px + 12px);
  transform: translateY(-50%) translateX(6px);
  z-index: 26;
  padding: 9px 12px;
  background: var(--color-frame-magenta);
  color: #fff;
  font: 500 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .3em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease, transform .4s ease;
}
.menu-hint.is-on { opacity: 1; transform: translateY(-50%) translateX(0); }
