/* phils.pics — dark gallery */
:root {
  --bg: #0c0c0d;
  --bg-raise: #161618;
  --text: #e8e6e1;
  --muted: #9b988f;
  --accent: #c9a06a;
  --serif: "Fraunces", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Hero */
.hero { position: relative; min-height: 72svh; display: grid; place-items: end start; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Scrim: protect the text at the bottom, let the photo stay vivid up top. */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top,
    rgba(12, 12, 13, 0.92) 0%,
    rgba(12, 12, 13, 0.6) 28%,
    rgba(12, 12, 13, 0.18) 58%,
    rgba(12, 12, 13, 0) 100%);
}
.hero-text { position: relative; z-index: 1; padding: 2rem 1.25rem 2.5rem; max-width: 50rem; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; margin: 0 0 0.5rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 1.05; margin: 0 0 0.75rem; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.venue { color: var(--text); margin: 0; font-size: 1rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }

/* Layout */
main { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
section { padding: 3.5rem 0 0; }
h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.1rem); margin: 0 0 0.75rem; }
section > p { color: var(--muted); max-width: 42rem; }

/* Gallery — shared item styles */
.g-item { margin: 0; }
.g-item img { width: 100%; height: auto; display: block; border-radius: 2px; transition: opacity 0.2s; }
.g-item a:hover img { opacity: 0.85; }
.g-item figcaption { color: var(--muted); font-size: 0.85rem; padding-top: 0.4rem; }

/* Primary (monochrome art): masonry columns keep aspect ratios and avoid ragged rows. */
.grid-primary { column-width: 320px; column-gap: 1rem; }
.grid-primary .g-item { break-inside: avoid; margin: 0 0 1rem; }

/* Context (color accessory shots): smaller, lower visual weight, sits below the art. */
#context { border-top: 1px solid #1c1c1f; margin-top: 1rem; }
.grid-context { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0.75rem; margin-top: 1rem; }
.grid-context .g-item img { opacity: 0.95; }

/* About */
#about p { color: var(--text); }
#about .prints { color: var(--accent); }

/* Forms */
form { background: var(--bg-raise); border: 1px solid #232326; border-radius: 6px; padding: 1.25rem; max-width: 32rem; margin-top: 1rem; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0.25rem; }
input, textarea {
  width: 100%; padding: 0.65rem 0.75rem; border-radius: 4px;
  border: 1px solid #2e2e32; background: var(--bg); color: var(--text);
  font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #14110b; border: 0; border-radius: 4px;
  padding: 0.65rem 1.4rem; margin-top: 0.9rem;
}
button:hover { filter: brightness(1.08); }
button[disabled] { opacity: 0.5; cursor: wait; }
.row { display: flex; gap: 0.5rem; }
.row input { flex: 1; }
.row button { margin-top: 0; }
.turnstile-slot { margin-top: 0.9rem; min-height: 0; }
.form-status { font-size: 0.9rem; margin: 0.6rem 0 0; min-height: 1.2em; }
.form-status.ok { color: #8fce8f; }
.form-status.err { color: #e08080; }

/* Lightbox */
dialog#lightbox {
  border: 0; padding: 0; background: rgba(10, 10, 11, 0.97);
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  display: none; place-items: center;
}
dialog#lightbox[open] { display: grid; }
#lb-img { max-width: 94vw; max-height: 84vh; object-fit: contain; }
#lb-caption { color: var(--muted); text-align: center; margin: 0.5rem 0 0; }
#lb-close {
  position: fixed; top: 0.75rem; right: 1rem; background: none; color: var(--text);
  font-size: 2rem; line-height: 1; padding: 0.25rem 0.6rem; margin: 0;
}

footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 4rem 1rem 2rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 600px) {
  .hero { min-height: 60svh; }
  .grid-primary { column-width: auto; column-count: 2; column-gap: 0.5rem; }
  .grid-primary .g-item { margin-bottom: 0.5rem; }
  .grid-context { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  /* Captions stay visible — phones are the primary device (QR scans). */
  .g-item figcaption { font-size: 0.8rem; padding-top: 0.3rem; }
}
