/* =========================================================
   Posey Photo Co. — styles.css
   Palette: cream, forest, charcoal, olive, terracotta,
   marigold, and teal. Fonts: Cormorant Garamond + Inter.
   ========================================================= */

:root {
  --cream: #F7F3EA;
  --paper: #FBF9F4;
  --alt-bg: #F1EBDD;
  --forest: #1F3A32;
  --charcoal: #2B2B28;
  --olive: #6B7A4B;
  --terracotta: #B65D3C;
  --marigold: #D9A531;
  --teal: #1F5C66;
  --muted: #5D625B;
  --line: #E3DCCB;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 80px; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); }
.container { width: min(calc(100% - 3rem), var(--max)); margin-inline: auto; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--forest);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--forest); color: var(--paper); padding: .5rem 1rem; z-index: 200;
}
.skip-link:focus { left: 1rem; }

.eyebrow {
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600; margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.5rem; border: 1px solid var(--forest);
  background: var(--forest); color: var(--paper);
  text-decoration: none; font-weight: 500; font-size: .95rem; letter-spacing: .02em;
  border-radius: 2px; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--forest); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--paper); }
.text-link {
  color: var(--teal); text-decoration: none; font-size: .95rem;
  border-bottom: 1px solid currentColor;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 234, .96);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-color: var(--line); }

.nav-wrap {
  display: flex; align-items: center; justify-content: space-between; height: 76px;
}
.wordmark {
  display: flex; flex-direction: column; text-decoration: none;
  color: var(--forest); line-height: 1;
}
.wordmark-main {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 700; letter-spacing: .14em;
}
.wordmark-sub {
  font-family: var(--serif); font-size: .85rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--olive); font-weight: 600; margin-top: .25rem;
}

.site-nav ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.site-nav a {
  color: var(--charcoal); text-decoration: none; font-size: .9rem; font-weight: 500;
  position: relative; padding: .25rem 0; white-space: nowrap;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--terracotta); transition: width .25s;
}
.site-nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--forest);
  margin: 5px auto; transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s, transform .3s, visibility .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .25rem 0; }
  .site-nav a { display: block; padding: 1rem 1.5rem; font-size: 1rem; border-top: 1px solid var(--line); }
  .site-nav a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero-text .lead { font-size: 1.12rem; color: var(--muted); max-width: 30rem; margin: 0 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-media {
  margin: 0; aspect-ratio: 4 / 5; overflow: hidden;
  background: linear-gradient(160deg, var(--teal), var(--forest));
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 4 / 4.2; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--alt-bg); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p:not(.eyebrow) { color: var(--muted); }
.sample-link { display: inline-block; margin-top: 1rem; }

/* ---------- Masonry gallery ---------- */
.gallery { columns: 2; column-gap: 12px; }
@media (min-width: 720px) { .gallery { columns: 3; column-gap: 16px; } }

.tile {
  display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0;
  background: #E9E2D2; cursor: zoom-in; break-inside: avoid; overflow: hidden;
}
@media (min-width: 720px) { .tile { margin-bottom: 16px; } }
.tile img {
  width: 100%; height: auto;
  transition: transform .6s ease;
}
.tile:hover img { transform: scale(1.02); }
.tile:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; }

.tile.is-missing {
  aspect-ratio: 4 / 5; cursor: default; padding: 1rem;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: .8rem; color: var(--muted); border: 1px dashed var(--olive);
  font-family: var(--sans);
}

/* ---------- Pricing ---------- */
.pricing-group { margin-bottom: 4rem; }
.pricing-group:last-child { margin-bottom: 0; }
.pricing-group h3 { margin-bottom: 1.5rem; }
.price-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.price-card {
  background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--marigold);
  padding: 2rem; display: flex; flex-direction: column;
}
.pricing-group[data-group="weddings"] .price-card { border-top-color: var(--terracotta); }
.pricing-group[data-group="seniors"] .price-card { border-top-color: var(--marigold); }
.pricing-group[data-group="brand"] .price-card { border-top-color: var(--teal); }

.price-name { font-size: 1.4rem; margin-bottom: .75rem; }
.price-from {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin: 0;
}
.price-amount { font-family: var(--serif); font-size: 2.4rem; color: var(--forest); line-height: 1.1; margin: 0; }
.price-hours { color: var(--olive); font-weight: 500; margin: .25rem 0 0; }
.price-card ul { padding-left: 1.1rem; color: var(--muted); font-size: .95rem; margin: 1rem 0 1.5rem; }
.price-card .btn { margin-top: auto; }

/* ---------- Booking ---------- */
.book-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.book-card {
  display: block; padding: 2rem; background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; color: var(--charcoal); transition: border-color .2s, transform .2s;
}
.book-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.book-card h3 { margin-bottom: .5rem; }
.book-card span { color: var(--teal); font-size: .9rem; font-weight: 500; }

.embed-box {
  margin-top: 3rem; padding: 2rem; min-height: 220px;
  background: var(--paper); border: 1px dashed var(--olive);
}
.embed-placeholder { color: var(--muted); font-style: italic; text-align: center; }
.book-fallback { margin-top: 1.5rem; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #D9D4C5; padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
.footer-logo {
  width: 100%; max-width: 220px; height: auto;
  background: var(--cream); padding: 1rem; border-radius: 4px;
}
.site-footer h4 {
  color: #F4EFE3; font-size: 1.2rem; font-weight: 600; letter-spacing: .04em; margin-bottom: .75rem;
}
.site-footer p { margin: 0 0 .5rem; }
.site-footer a {
  color: #E9E3D2; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.site-footer a:hover { color: var(--marigold); border-color: var(--marigold); }
.social { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem; color: #A9A593; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 24, 22, .95);
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 4.5rem;
  animation: fadeIn .25s ease;
}
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lb-figure img {
  max-width: 100%; max-height: calc(100vh - 9rem);
  width: auto; height: auto; object-fit: contain;
}
.lb-figure figcaption { color: #CFC9B8; font-size: .85rem; margin-top: .75rem; letter-spacing: .08em; }
.lb-btn {
  position: absolute; background: none; border: 0; color: #F4EFE3;
  font-size: 2.6rem; line-height: 1; cursor: pointer; padding: .5rem 1rem; opacity: .8;
}
.lb-btn:hover, .lb-btn:focus-visible { opacity: 1; color: var(--marigold); }
.lb-close { top: .5rem; right: .5rem; font-size: 2.2rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox { padding: 3.5rem .5rem 4.5rem; }
  .lb-prev, .lb-next { top: auto; bottom: .5rem; transform: none; font-size: 2.2rem; }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
