/* Essence Photography — static site styles */
:root {
  --text: #474747;
  --heading: #222;
  --muted: #888;
  --gold: #af9f66;
  --frame: #444;
  --line: #ececec;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Mulish", "Open Sans", Arial, sans-serif;
  font-size: 14px; line-height: 1.8;
  color: var(--text); background: #fff;
}

/* Thin dark frame around the whole page, as on the original site */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  border: 10px solid var(--frame);
}
@media (max-width: 760px) { body::before { border-width: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--heading); text-decoration: none; }
a:hover, a:focus-visible { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: "Montserrat", "Open Sans", Arial, sans-serif; font-weight: 400;
  color: var(--heading); line-height: 1.3; margin: 0 0 .6em;
}
p { margin: 0 0 1.2em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 30px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 300; }
.skip-link:focus { left: 16px; top: 16px; }

.tagline {
  font-family: "Noto Serif", Georgia, serif; font-style: italic;
  color: var(--gold); font-size: 17px; line-height: 1.6;
}

/* ---------- Header ---------- */
.site-header { background: #fff; position: relative; z-index: 50; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 104px; padding-top: 10px;
}
.logo img { width: 240px; height: auto; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); cursor: pointer;
  font: 12px/1 "Montserrat", Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
  padding: 10px 12px; color: var(--heading);
}

.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav li { position: relative; }
.site-nav a {
  display: block; padding: 10px 14px;
  font: 12px/1.4 "Montserrat", Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
  color: var(--heading);
}
.site-nav a[aria-current="page"], .site-nav .is-section > a { color: var(--gold); }

/* Portfolio drop-down */
.site-nav .sub {
  list-style: none; margin: 0; padding: 8px 0; min-width: 210px;
  position: absolute; top: 100%; left: 0; background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.1); border-top: 2px solid var(--gold);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.site-nav li:hover > .sub, .site-nav li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { padding: 8px 18px; text-transform: none; letter-spacing: .3px; font-size: 13px; }

@media (max-width: 860px) {
  .site-header .container { min-height: 76px; flex-wrap: wrap; padding: 8px 20px; }
  .logo img { width: 180px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding: 6px 0 14px; }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 11px 4px; }
  .site-nav .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0;
  }
  .site-nav .sub a { padding: 7px 4px; }
}

/* ---------- Home slideshow ---------- */
.hero {
  position: relative; overflow: hidden; background: #111;
  height: calc(100vh - 104px - 64px); min-height: 360px; max-height: 820px;
  margin: 0 10px;
}
@media (max-width: 860px) { .hero { height: calc(100vh - 76px - 64px); height: calc(100svh - 76px - 64px); min-height: 320px; margin: 0; } }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease-in-out; }
.hero .slide.is-active { opacity: 1; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 22px; line-height: 48px;
}
.hero-btn:hover { background: rgba(0,0,0,.6); }
.hero-btn.prev { left: 18px; } .hero-btn.next { right: 18px; }
.hero-count {
  position: absolute; right: 22px; bottom: 16px; z-index: 2;
  font: 12px/1 "Montserrat", Arial, sans-serif; letter-spacing: 2px; color: #fff;
  background: rgba(0,0,0,.35); padding: 7px 10px;
}
@media (prefers-reduced-motion: reduce) { .hero .slide { transition: none; } }

/* ---------- Page heading ---------- */
.page-head { text-align: center; padding: 40px 0 34px; }
.page-head h1 { font-size: 24px; text-transform: uppercase; letter-spacing: 1px; margin: 0; }
.page-head h1.plain { text-transform: none; letter-spacing: 0; }
.page-head .tagline { margin: 14px auto 0; max-width: 640px; }

.section { padding-bottom: 70px; }

/* ---------- Portfolio overview ---------- */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin: 0 10px;
}
@media (max-width: 900px)  { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px)  { .portfolio-grid { margin: 0; } }
@media (max-width: 460px)  { .portfolio-grid { grid-template-columns: 1fr; } }
.tile { position: relative; display: block; overflow: hidden; aspect-ratio: 650 / 406; background: #222; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.tile span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 14px/1.3 "Montserrat", Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.35); text-align: center; padding: 10px;
  transition: background .3s;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover span, .tile:focus-visible span { background: rgba(175,159,102,.75); color: #fff; }

/* ---------- Gallery (masonry) ---------- */
.gallery { column-count: 3; column-gap: 12px; margin: 0 30px; }
@media (max-width: 1000px) { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; margin: 0 16px; } }
.gallery a {
  display: block; margin: 0 0 12px; break-inside: avoid; overflow: hidden; background: #f2f2f2;
}
.gallery img { width: 100%; transition: opacity .3s, transform .6s; }
.gallery a:hover img, .gallery a:focus-visible img { opacity: .85; transform: scale(1.03); }

.gallery-nav {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 40px 30px 0; padding-top: 24px; border-top: 1px solid var(--line);
  font: 12px/1.4 "Montserrat", Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(12,12,12,.95);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); width: auto; height: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); user-select: none;
}
.lb-btn {
  position: absolute; background: none; border: 0; color: #ddd; cursor: pointer;
  font-size: 34px; line-height: 1; padding: 14px; font-family: Arial, sans-serif;
}
.lb-btn:hover, .lb-btn:focus-visible { color: #fff; }
.lb-close { top: 10px; right: 14px; font-size: 38px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  color: #aaa; font: 12px/1 "Montserrat", Arial, sans-serif; letter-spacing: 2px;
}
@media (max-width: 560px) {
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 120px); }
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; padding-top: 30px; }
.about h1 { font-size: 30px; margin-bottom: .5em; }
.about .tagline { margin-bottom: 1.4em; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; align-items: start; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.contact h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 .2em;
}
.contact-form .field { margin-bottom: 14px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 11px 14px; border: 1px solid #e2e2e2; background: #fafafa; border-radius: 0;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.contact-form textarea { min-height: 170px; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn {
  font: 12px/1 "Montserrat", Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 34px; border: 1px solid var(--heading); background: var(--heading); color: #fff; cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--gold); border-color: var(--gold); }
.btn[disabled] { opacity: .6; cursor: wait; }
.notice { padding: 12px 16px; margin-bottom: 18px; display: none; }
.notice.show { display: block; }
.notice--ok { background: #f3f0e4; border: 1px solid #d9cfa8; color: #5d5226; }
.notice--err { background: #fbeceb; border: 1px solid #efc2bf; color: #7a1f1a; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 22px 20px 26px; font-size: 12px; color: var(--muted);
}

.notfound { text-align: center; padding: 90px 0 120px; }
