/* dwfotos — dark, minimal photography portfolio */

/* Brand fonts (from the business card): PT Sans for text, Lucida Console for the wordmark. */
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ptsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ptsans-700.woff2") format("woff2");
}

:root {
  --bg: #0b0b0d;
  --bg-elev: #141417;
  --fg: #ededed;
  --muted: #9a9a9f;
  --line: rgba(255, 255, 255, 0.09);
  --caution: #e6b34a;
  --maxw: 1500px;
  --gap: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", Monaco, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--fg);
}

.brand-mark {
  width: 1.35em;
  height: 1.35em;
  flex: none;
  stroke: currentColor;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav a {
  position: relative;
  padding: 0.15rem 0;
  transition: color 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Intro / page heading ---------- */
.intro {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.intro h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.intro p {
  margin: 0.9rem 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

/* ---------- Gallery (CSS masonry) ---------- */
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
  column-count: 4;
  column-gap: var(--gap);
}

@media (max-width: 1200px) { .gallery { column-count: 3; } }
@media (max-width: 820px)  { .gallery { column-count: 2; } }
@media (max-width: 480px)  { .gallery { column-count: 1; } }

.gallery figure {
  break-inside: avoid;
  margin: 0 0 var(--gap);
}

.tile {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-elev);
  cursor: zoom-in;
  position: relative;
}

.tile img {
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), filter 0.4s var(--ease);
  opacity: 0;
}

.tile img.loaded { opacity: 1; }

.tile:hover img { transform: scale(1.04); filter: brightness(1.06); }

.tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- Contact ---------- */
.contact {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact h2 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.contact p { margin: 0.75rem 0 0; color: var(--muted); }

.contact .email {
  display: inline-block;
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.contact .email:hover { border-color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.96);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.lightbox.open { display: flex; opacity: 1; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  padding: 0.5rem;
  line-height: 0;
}

.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 34px; height: 34px; stroke: currentColor; stroke-width: 1.6; fill: none; }

.lb-close { top: max(1rem, env(safe-area-inset-top)); right: 1.25rem; }
.lb-prev { left: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

.lb-counter {
  position: absolute;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

@media (max-width: 600px) {
  .lb-btn svg { width: 28px; height: 28px; }
  .lightbox img { max-width: 96vw; max-height: 82vh; }
}

/* ---------- Age gate ---------- */
.agegate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #050506;
}

.agegate-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1.75rem, 5vw, 2.75rem);
}

.agegate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--caution);
  color: var(--caution);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.agegate-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 400;
}

.agegate-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.agegate-card .fineprint {
  font-size: 0.8rem;
  color: #6f6f75;
}

.agegate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.15s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--fg);
  color: #0b0b0d;
  border-color: var(--fg);
  font-weight: 600;
}

.btn-primary:hover { background: #ffffff; }
.btn-ghost:hover { border-color: var(--muted); }

/* Gate is closed by default so it fails safe if JS is disabled. */
body.gated { overflow: hidden; }
body.gated .site-header,
body.gated main,
body.gated .site-footer { display: none; }

.js-noscript {
  color: var(--caution);
  font-size: 0.85rem;
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .tile:hover img { transform: none; }
}
