/* ============================================================================
   DEVV'S PHOTO DUMP — THE site header. One file, one look, every page.
   ----------------------------------------------------------------------------
   This is the SINGLE source of truth for the header. It replaces the three
   separate implementations that used to live in landing.css, blog-cinematic.css
   and pages-cinematic.css (which drifted apart in size, position and mobile
   behaviour).

   Deliberately uses fresh `.dpd-*` class names: the legacy style.css (70 KB) and
   blog.css (49 KB) both style `.header` / `.navbar` / `.nav--list` and blog.css
   even sets `* { font-family: monospace }`. Namespacing means zero conflicts.

   Load this LAST in every page's <head>. Markup lives in:
     - index.html            (landing)
     - src/_includes/header.njk  (blog + photos, via base.njk)
     - src/about.njk, src/about.html, src/contact.html
   Keep those five blocks byte-identical.
   ========================================================================== */

:root {
  --sh-bg:     rgba(10, 10, 12, 0.85);
  --sh-bg-deep: rgba(10, 10, 12, 0.94);
  --sh-ink:    #f4f2ee;
  --sh-dim:    #a7a39b;
  --sh-gold:   #c9a86a;
  --sh-line:   rgba(255, 255, 255, 0.10);
  --sh-serif:  "Cormorant Garamond", Georgia, serif;
  --sh-sans:   "Rubik", system-ui, -apple-system, sans-serif;
  --sh-ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --sh-h:      66px;
}

/* Beat blog.css's `* { font-family: monospace }` */
.dpd-header,
.dpd-header * { font-family: var(--sh-sans); box-sizing: border-box; }

.dpd-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--sh-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--sh-line);
  transition: transform 0.5s var(--sh-ease), background 0.5s var(--sh-ease);
}

/* State classes — only the landing's JS applies these; inert elsewhere. */
.dpd-header.is-scrolled { background: var(--sh-bg-deep); }
.dpd-header.is-hidden   { transform: translateY(-110%); }
.dpd-header.is-locked   { transform: translateY(-110%); pointer-events: none; }

.dpd-header__inner {
  width: min(1200px, 92vw);
  margin-inline: auto;
  height: var(--sh-h);
  display: flex;
  align-items: center;
  justify-content: center;   /* no brand — nav sits centred */
  gap: 1.5rem;
}

/* ---- Nav ----------------------------------------------------------------- */
.dpd-nav__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.dpd-nav__list li { margin: 0; padding: 0; }
.dpd-nav__list a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--sh-dim);
  /* px, NOT rem: style.css sets html{font-family:monospace}, and browsers drop the
     default size from 16px to 13px for bare monospace - so rem shrank this nav to
     10.4px on About/Contact/Blog. px makes it identical on every page. */
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.35s var(--sh-ease);
}
.dpd-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--sh-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--sh-ease);
}
.dpd-nav__list a:hover { color: var(--sh-ink); }
.dpd-nav__list a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---- Mobile toggle (pure CSS checkbox — no JS, works on static pages) ----- */
.dpd-nav__checkbox { display: none; }
.dpd-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 34px; height: 34px;
  cursor: pointer;
  padding: 4px;
}
.dpd-nav__toggle span {
  display: block;
  height: 2px; width: 100%;
  background: var(--sh-ink);
  border-radius: 2px;
  transition: transform 0.35s var(--sh-ease), opacity 0.25s var(--sh-ease);
}

@media (max-width: 760px) {
  .dpd-nav__toggle { display: flex; }
  /* nav collapses into the full-screen panel, so the toggle is the only
     in-flow child — push it to the right edge instead of centring it */
  .dpd-header__inner { justify-content: flex-end; }

  /* FULL-SCREEN menu (Devv, 2026-10-12). It slides down and covers the whole
     screen. Note: NOT position:fixed — .dpd-header has backdrop-filter, which
     makes it the containing block for fixed children, so "fixed" would be
     trapped inside the 66px bar. Instead it's absolute from the top of the
     (sticky, always-at-top) header and 100dvh tall: the real visible screen
     height on phones, including when the URL bar shows/hides. */
  .dpd-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100vh;                 /* fallback for old browsers */
    height: 100dvh;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* SOLID, not translucent: a backdrop-filter nested inside the header's own
       backdrop-filter does not blur the page, so page text showed through. */
    background: #0a0a0c;
    transform: translateY(-100%);
    transition: transform 0.45s var(--sh-ease);
    pointer-events: none;
  }
  .dpd-nav__checkbox:checked ~ .dpd-nav { transform: translateY(0); pointer-events: auto; }
  /* keep the hamburger / X above the menu so it can always be closed */
  .dpd-nav__toggle { position: relative; z-index: 2; }
  /* stop the page behind from scrolling while the menu is open */
  html:has(#dpd-nav-toggle:checked) { overflow: hidden; }

  .dpd-nav__list { flex-direction: column; align-items: center; gap: 6px; }
  .dpd-nav__list li { width: 100%; text-align: center; }
  .dpd-nav__list a { display: block; padding: 14px 0; font-size: 22px; letter-spacing: 0.2em; }
  .dpd-nav__list a::after { display: none; }

  /* hamburger -> X */
  .dpd-nav__checkbox:checked ~ .dpd-nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .dpd-nav__checkbox:checked ~ .dpd-nav__toggle span:nth-child(2) { opacity: 0; }
  .dpd-nav__checkbox:checked ~ .dpd-nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dpd-header, .dpd-header * { transition-duration: 0.01ms !important; }
}
