/*
Theme Name: DLP Unit Stills
Template: twentytwentyfive
Version: 1.1
Description: Child theme for DLP Unit Stills – minimal white, matches David Levine Photography.
Author: David Levine
*/

/* ── Reset ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: rgba(17,17,17,0.65);
  --line: rgba(0,0,0,0.12);
  --footer-space: 34px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 300;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Suppress all Twenty Twenty-Five chrome ──────────── */

.wp-site-blocks > header,
.wp-site-blocks > footer,
#masthead, #colophon,
.site-header, .site-footer,
.main-navigation, .nav-primary,
.wp-block-template-part,
.wp-block-site-title,
.wp-block-navigation {
  display: none !important;
}

.wp-site-blocks {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.wp-site-blocks > main {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Page shell ──────────────────────────────────────── */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#dlp-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
}

/* ── Header ──────────────────────────────────────────── */

#dlp-header {
  position: relative;
  text-align: center;
  margin-bottom: 10px;
  height: auto;
  min-height: 44px;
  z-index: 80;
  flex: 0 0 auto;
  padding-top: 18px;
}

.dlp-title-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 90;
}

.dlp-masthead-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.dlp-logo-trigger {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  color: inherit;
  text-decoration: none;
}

.dlp-logo-text-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dlp-logo {
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1;
  color: rgba(17,17,17,0.92);
  text-transform: uppercase;
  margin: 0;
}

.dlp-menu-icon {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(17,17,17,0.62);
  transition: color 0.2s ease;
  transform: translateY(-1px);
}

.dlp-logo-trigger:hover .dlp-menu-icon,
body.dlp-menu-open .dlp-menu-icon {
  color: rgba(17,17,17,0.92);
}

.dlp-section-name {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(17,17,17,0.55);
  line-height: 1;
  white-space: nowrap;
}

/* ── Nav ─────────────────────────────────────────────── */

.dlp-nav {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.08s ease;
  z-index: 100;
  white-space: nowrap;
  padding-top: 6px;
  pointer-events: none;
}

.dlp-title-toggle:hover .dlp-nav,
.dlp-title-toggle:focus-within .dlp-nav,
body.dlp-menu-open .dlp-nav {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
}

.dlp-nav a {
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 300;
  color: rgba(17,17,17,0.60);
  transition: color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.dlp-nav a:hover {
  color: rgba(17,17,17,0.88);
}

/* ── Backdrop ────────────────────────────────────────── */

#dlp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  cursor: pointer;
}

body.dlp-menu-open #dlp-backdrop {
  display: block;
}

/* ── Main content ────────────────────────────────────── */

#dlp-content {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px var(--footer-space);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Inner pages — title at top, content fills naturally */

#dlp-content.dlp-inner {
  justify-content: flex-start;
  padding: 10px 0 var(--footer-space);
  align-items: flex-start;
}

/* ── Homepage film grid ──────────────────────────────── */

.dlp-film-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: min(calc(100% - 80px), 1100px);
  margin: 0 auto;
}

.dlp-film-tile {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 2/3;
  display: block;
}

.dlp-film-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.dlp-film-tile:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

.dlp-film-tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.52), transparent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dlp-film-tile:hover .dlp-film-tile-label {
  opacity: 1;
}

/* ── Inner page title ────────────────────────────────── */

.dlp-page-title {
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  text-align: center;
  width: 100%;
}

/* ── Page content wrapper ────────────────────────────── */

.dlp-page-content {
  width: 100%;
}

/* ── Envira gallery overrides ────────────────────────── */

.envira-gallery-wrap,
.envira-gallery-public,
.envira-gallery-theme-default {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.envira-gallery-item a {
  display: block;
  overflow: hidden;
}

.envira-gallery-item img {
  transition: opacity 0.3s ease !important;
}

.envira-gallery-item:hover img {
  opacity: 0.85 !important;
}

/* ── Footer ──────────────────────────────────────────── */

#dlp-footer {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(17,17,17,0.30);
  padding: 0 0 20px;
  line-height: 1;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 900px) {
  #dlp-content {
    padding: 10px 24px var(--footer-space);
  }
  .dlp-film-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: min(calc(100% - 40px), 600px);
    margin: 20px auto 0;
  }
}

@media (max-width: 560px) {
  #dlp-header { padding-top: 14px; }
  .dlp-logo { font-size: 1.15rem; letter-spacing: 0.08em; }
  .dlp-section-name { font-size: 0.78rem; }
  .dlp-nav {
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    padding: 14px 20px 18px;
    min-width: 200px;
    text-align: center;
  }
  .dlp-film-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: min(calc(100% - 24px), 360px);
    margin: 16px auto 0;
  }
  #dlp-content {
    padding: 10px 12px var(--footer-space);
  }
}
