/* JB Photography: rebuilt from the Adobe Portfolio site (see ../archive/site-notes.md). */
:root {
  --bg: #f0ead6;
  --text: #333;
  --heading: #111;
  --muted: #aaa;
  --subtle: #999;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --slab: "Zilla Slab", Rockwell, Georgia, serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 20px/1.4 var(--serif);
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 25px;
}
.site-title {
  font: 600 22px/1 var(--serif);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  font: 600 15px/28px var(--serif);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .15s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--heading); }
.menu-toggle { display: none; }

/* Page headings and text pages */
.page-title {
  font: 700 60px/70px var(--serif);
  color: var(--heading);
  margin: 100px 0 90px;
}
.text-page { max-width: 800px; margin: 0 auto; padding: 0 25px; }
.text-page p { margin: 0 0 20px; }
.gallery-title { max-width: 800px; margin-left: auto; margin-right: auto; padding: 0 25px; }

/* Footer */
.site-footer { text-align: center; padding: 90px 20px 50px; }
.back-to-top {
  display: inline-block;
  font: 400 18px/1 var(--serif);
  color: var(--subtle);
  text-decoration: none;
  margin-bottom: 40px;
}
.footer-contact { font: 400 38px/1.45 var(--serif); margin: 0; }
.footer-contact a { text-decoration: none; }

/* Home */
.home { background: #222; }
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: 83px 20px 120px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -1;
}
.hero > :not(.hero-bg) { position: relative; }
.hero-logo { width: 150px; height: auto; }
.hero-title {
  align-self: center;
  margin: 0;
  font: italic 700 100px/1 var(--slab);
  color: #d8d4cf;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -0.01em;
}
.hero-button {
  font: 700 22px/40px var(--serif);
  color: var(--text);
  background: rgba(240, 234, 214, .85);
  border-radius: 100px;
  padding: 2px 34px;
  text-decoration: none;
  transition: background .15s;
}
.hero-button:hover { background: rgba(240, 234, 214, 1); }

/* Portfolio covers */
.covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding-top: 70px;
}
.cover { position: relative; display: block; border-radius: 124px; overflow: hidden; aspect-ratio: 718 / 562; }
/* An odd card out on the last row sits centered instead of hanging left. */
.cover:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 2px); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
/* --reveal (0..1) is set by site.js from how close the card is to the middle of the screen. */
.cover-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  opacity: var(--reveal, 0);
  transition: opacity .2s ease-out;
}
.cover-label > * { transform: translateY(calc((1 - var(--reveal, 0)) * 14px)); transition: transform .2s ease-out; }
.cover:hover .cover-label, .cover:focus-visible .cover-label { opacity: 1; }
.cover:hover .cover-label > *, .cover:focus-visible .cover-label > * { transform: none; }
@media (prefers-reduced-motion: reduce) { .cover-label > * { transform: none; } }
.cover:hover img { transform: scale(1.02); }
.cover-title { font: 700 30px/34px var(--serif); text-align: center; padding: 0 20px; }
.cover-year { font: 600 13px/17px var(--serif); }

/* Galleries: rows of two, equal height; flex-grow = aspect ratio (same technique as the original) */
.video { width: calc(100% - 28px); margin: 0 auto 6px; aspect-ratio: 16 / 9; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.gallery { padding: 0 50px; }
.row { display: flex; gap: 5px; margin-bottom: 6px; }
.photo { flex-basis: 0; display: block; cursor: zoom-in; }
.photo img { width: 100%; height: auto; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(20, 20, 20, .96);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(20, 20, 20, .96); }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 60px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute;
  background: none; border: 0; color: #eee; cursor: pointer;
  font: 300 48px/1 var(--sans);
  padding: 12px 18px;
}
.lb-close { top: 8px; right: 8px; font-size: 40px !important; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* About */
.about-photo { width: 300px; margin: 0 auto 70px; }

/* Packages */
.packages { font-size: 20px; line-height: 28px; }
.packages .centered { text-align: center; }
.packages section.centered { font-size: 15px; line-height: 1.6; }
.packages section.centered .lead { font-size: 20px; }
.packages h2 { font: 700 32px/34px var(--serif); margin: 0 0 24px; }
.packages h2.big { font-size: 35px; }
.packages h3 { font: 700 26px/34px var(--serif); margin: 40px 0 24px; }
.packages section h3 { font-size: 28px; }
.packages h4 { font: 700 18px/1.4 var(--serif); margin: 32px 0 12px; }
.packages .package h3, .packages h3.addons { font-size: 20px; margin: 40px 0 20px; }
.packages hr { border: 0; border-top: 1px solid rgba(51, 51, 51, .35); margin: 56px auto; width: 70%; }
.packages hr.short { width: 40%; margin: 36px auto; }
.packages ul { list-style: none; padding: 0; margin: 0 0 20px; }
.packages ul.dash li::before { content: "- "; }
.packages ul.dash li { margin-bottom: 8px; }
.packages ul.bullets li { position: relative; padding-left: 16px; margin-bottom: 12px; }
.packages ul.bullets li::before { content: "•"; position: absolute; left: 0; }
.packages strong { color: var(--heading); }
.pkg-intro { text-align: center; margin: 0 0 40px; }
.pkg-heading { margin: 64px 0 16px !important; }
.pkg { border-top: 1px solid rgba(51, 51, 51, .25); }
.pkg:last-of-type { border-bottom: 1px solid rgba(51, 51, 51, .25); }
.pkg summary {
  display: flex; align-items: baseline; gap: 16px;
  padding: 22px 4px;
  cursor: pointer; list-style: none;
}
.pkg summary::-webkit-details-marker { display: none; }
.pkg summary::after {
  content: ""; flex: none; align-self: center;
  width: 9px; height: 9px; margin-left: 4px;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
.pkg[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.pkg-name { font: 700 26px/1.2 var(--serif); color: var(--heading); }
.pkg-price { margin-left: auto; font-size: 17px; color: var(--subtle); white-space: nowrap; }
.pkg-body { padding: 0 4px 32px; }
.pkg-body > .package:first-child h3, .pkg-body > h4:first-child { margin-top: 0; }

/* Contact form */
.contact-form { max-width: 486px; margin: 60px auto 0; font-family: var(--sans); }
.contact-form label { display: block; font-size: 15px; font-weight: 700; color: var(--subtle); margin: 0 0 8px; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%;
  font: 400 18px/1.4 var(--sans); color: var(--text);
  background: #fff;
  border: 1px solid #ddd; border-radius: 3px;
  padding: 8px 10px;
  margin: 0 0 22px;
}
.contact-form textarea { min-height: 128px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid #333; outline-offset: 1px; }
.contact-form button {
  font: 700 16px/40px var(--sans);
  color: #fff; background: #333;
  border: 0; border-radius: 4px;
  padding: 0 29px;
  cursor: pointer;
}
.contact-form button:disabled { opacity: .6; cursor: wait; }
.form-status { font-size: 17px; margin: 18px 0 0; min-height: 1.4em; }
.form-status.ok { color: #2d5a27; }
.form-status.err { color: #8a1c1c; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Tablet / mobile */
@media (max-width: 932px) {
  .site-header { padding: 25px 20px; position: relative; }
  .menu-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: 0; padding: 8px 4px; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    flex-direction: column; align-items: flex-start; gap: 6px;
    background: var(--bg);
    padding: 10px 20px 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .06);
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 18px; line-height: 36px; }
  .covers { grid-template-columns: 1fr; padding: 20px 0 0; gap: 4px; }
  .cover:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .cover { border-radius: 100px; }
  .hero-title { font-size: clamp(44px, 9vw, 100px); }
}
@media (max-width: 540px) {
  body { font-size: 17px; }
  .site-title { font-size: 19px; }
  .page-title { font-size: 32px; line-height: 40px; margin: 30px 0 30px; }
  .gallery-title, .text-page { padding: 0 20px; }
  .gallery { padding: 0 8px; }
  .row { gap: 4px; margin-bottom: 4px; }
  .video { width: calc(100% - 16px); }
  .footer-contact { font-size: 19px; }
  .back-to-top { font-size: 14px; margin-bottom: 20px; }
  .site-footer { padding: 60px 20px 40px; }
  .cover { border-radius: 90px; }
  .hero { padding: 19vh 20px 22vh; }
  .hero-logo { width: 34px; }
  .hero-title { font-size: 32px; }
  .hero-button { font-size: 16px; line-height: 32px; padding: 2px 26px; }
  .about-photo { width: 192px; margin-bottom: 50px; }
  .packages { font-size: 17px; line-height: 1.5; }
  .packages h2, .packages h2.big { font-size: 26px; line-height: 1.25; }
  .packages section h3 { font-size: 22px; }
  .pkg-name { font-size: 21px; }
  .pkg-price { font-size: 14px; }
  .pkg summary { gap: 10px; padding: 18px 2px; }
  /* dvh = the area Safari leaves visible above its bottom toolbar, so the arrows stay clear of it. */
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
  .lb-prev, .lb-next { top: auto; bottom: 28px; transform: none; }
}
