/* ============================================================
   Marc Smith Photography — dark cinematic theme
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --text: #f4f4f2;
  --muted: #9a9a9f;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #d8c6a5;           /* restrained warm sand */
  --maxw: 1600px;
  --gutter: clamp(16px, 4vw, 48px);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ---------- Preview banner ---------- */
.preview-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--accent);
  color: #1a1408;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-align: center;
  padding: 9px 16px;
}
.preview-banner:not([hidden]) + .nav { top: 38px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.nav__links { display: flex; gap: clamp(16px, 3vw, 34px); }
.nav__links a {
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroDrift 22s ease-out forwards;
}
@keyframes heroDrift { to { transform: scale(1); } }
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.15) 45%, rgba(10,10,11,0.35) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) clamp(60px, 12vh, 130px);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 9vw, 132px);
  line-height: 0.95;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.hero__tagline {
  font-size: clamp(15px, 2.2vw, 22px);
  color: rgba(244,244,242,0.86);
  font-weight: 300;
  max-width: 40ch;
  margin: 0;
}
.hero__cue {
  position: absolute;
  z-index: 2;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
}
.hero__cue span {
  display: block;
  width: 20px; height: 20px;
  border-right: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(4px,4px); opacity: 1; }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 10vh, 120px) var(--gutter);
}
.section__head { margin-bottom: clamp(28px, 5vh, 54px); }
.section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 4.5vw, 52px);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.section__sub { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Masonry gallery ---------- */
.masonry {
  column-count: 3;
  column-gap: 14px;
}
@media (max-width: 1100px) { .masonry { column-count: 2; } }
@media (max-width: 640px)  { .masonry { column-count: 1; } }

.tile {
  display: block;
  position: relative;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 2px;
}
.tile__inner {
  position: relative;
  width: 100%;
  background: var(--bg-soft);
}
.tile img {
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 6s ease;
}
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.05); }
.tile__badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
}
.tile__badge::before {
  content: "";
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tile:hover .tile__overlay { opacity: 1; }

.grid-status { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.grid-status a { color: var(--accent); border-bottom: 1px solid var(--line); }

/* ---------- About ---------- */
.about { border-top: 1px solid var(--line); }
.about__inner {
  display: flex;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  flex-wrap: wrap;
}
.about__avatar {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--bg-soft) center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.about__body { flex: 1; min-width: 280px; max-width: 640px; }
.about__body p { color: rgba(244,244,242,0.8); font-size: 17px; line-height: 1.7; }
.about__meta {
  display: flex; gap: 30px;
  margin: 22px 0 26px;
  color: var(--muted); font-size: 14px;
}
.about__meta strong { color: var(--text); font-weight: 500; display: block; font-size: 22px; }
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 13px 26px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 60px var(--gutter);
}
.footer__brand { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.footer__note { color: var(--muted); font-size: 13px; margin: 4px 0; }
.footer__copy { color: rgba(154,154,159,0.6); font-size: 12px; margin-top: 18px; }

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6,6,7,0.96);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 60px);
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox__stage {
  max-width: min(1400px, 92vw);
  max-height: 82vh;
  display: inline-flex;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 82vh;
  width: auto; height: auto;
  border-radius: 2px;
}
.lightbox__caption {
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
  max-width: 70ch;
  margin-inline: auto;
  line-height: 1.6;
}
.lightbox__caption a { color: var(--accent); border-bottom: 1px solid var(--line); }
.lightbox__close {
  position: absolute;
  top: 20px; right: 26px;
  background: none; border: none;
  color: #fff; font-size: 34px;
  cursor: pointer; line-height: 1;
  opacity: 0.7; transition: opacity 0.2s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: #fff; font-size: 46px;
  cursor: pointer;
  padding: 10px 18px;
  opacity: 0.55; transition: opacity 0.2s;
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

@media (max-width: 640px) {
  .lightbox__nav { font-size: 34px; padding: 8px 10px; }
  .about__avatar { width: 130px; height: 130px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero__media { animation: none; transform: none; }
  .tile img { transition: opacity 0.4s ease; transform: none; }
  .hero__cue span { animation: none; }
  html { scroll-behavior: auto; }
}
