/* ==========================================================================
   HTX Realty Media — Portfolio & listing page styles
   Loads AFTER styles.css and reuses its tokens (--ink, --gold, --paper, ...)
   Used by: portfolio.html and each listing page (e.g. 1016-ruthven-st.html)
   ========================================================================== */

/* ── SUB-PAGE HEADER (clears the fixed nav) ── */
.subhead {
  padding: 9rem 4rem 3.5rem;
  background: var(--paper);
}

.subhead-inner { max-width: 1200px; margin: 0 auto; }

.subhead .eyebrow {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
  display: inline-flex; align-items: center; gap: 0.75rem;
}

.subhead .eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--gold); }

.subhead h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 300; line-height: 1.08; letter-spacing: -0.01em;
  color: var(--ink-text); margin-bottom: 1.25rem;
}

.subhead h1 em { font-style: italic; color: var(--gold); }

.subhead .lead {
  font-size: 0.9rem; line-height: 1.85; color: var(--muted); max-width: 520px;
}

/* ── PORTFOLIO LISTINGS GRID ── */
.listings {
  padding: 1rem 4rem 7rem;
  background: var(--paper);
}

.listings-inner { max-width: 1200px; margin: 0 auto; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* A single listing. Copy the whole <a class="listing-card"> block in the HTML
   to add another property. */
.listing-card {
  position: relative; display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 2px;
  text-decoration: none;
  background: var(--ink);
  border: 1px solid var(--line);
}

.listing-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), filter 0.4s;
}

.listing-card:hover img { transform: scale(1.05); filter: brightness(0.92); }

.listing-card::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(10,20,40,0.82) 0%, rgba(10,20,40,0.15) 45%, transparent 70%);
}

.listing-card-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 2rem;
}

.listing-card-tag {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 0.6rem; display: block;
}

.listing-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem; font-weight: 400; line-height: 1.1;
  color: #fff; margin-bottom: 0.75rem;
}

.listing-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245,242,236,0.7);
}

.listing-card-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.listing-card-meta span::before {
  content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--gold);
}

.listing-card-view {
  position: absolute; top: 1.5rem; right: 1.5rem; z-index: 2;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(245,242,236,0.35);
  background: rgba(10,20,40,0.25);
  color: #fff;
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.listing-card:hover .listing-card-view {
  background: var(--gold); border-color: var(--gold); transform: translate(2px,-2px);
}

/* Placeholder card for a "coming soon" / future listing slot */
.listing-card.placeholder {
  aspect-ratio: 3 / 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem;
  background: var(--warm); border: 1px dashed var(--line);
}

.listing-card.placeholder::before { display: none; }
.listing-card.placeholder svg { width: 34px; height: 34px; color: var(--gold); opacity: 0.5; }
.listing-card.placeholder span {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}

/* ── LISTING DETAIL HERO ── */
.listing-hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.listing-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}

.listing-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.72) 100%);
}

.listing-hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 6rem 4rem 4rem;
}

.back-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none;
  margin-bottom: 1.75rem;
  transition: color 0.25s, gap 0.25s;
}

.back-link:hover { color: #fff; gap: 0.85rem; }

.listing-hero-content .listing-tag {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 0.9rem; display: block;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.listing-hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300; line-height: 1.05; color: #fff;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.listing-hero-content h1 em { font-style: italic; color: var(--gold-light); }

/* ── SHOOT META BAR ── */
.shoot-meta {
  background: var(--ink);
  border-top: 1px solid rgba(184,147,90,0.2);
  border-bottom: 1px solid rgba(184,147,90,0.2);
}

.shoot-meta-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}

.shoot-meta-item {
  padding: 2rem 2.5rem;
  border-right: 1px solid rgba(184,147,90,0.15);
}

.shoot-meta-item:last-child { border-right: none; }

.shoot-meta-item .k {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.55rem;
}

.shoot-meta-item .v {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 400; color: var(--paper); line-height: 1.15;
}

/* ── SHOOT GALLERY GRID ── */
.shoot-gallery {
  padding: 6rem 4rem;
  background: var(--paper);
}

.shoot-gallery-inner { max-width: 1200px; margin: 0 auto; }

.shoot-gallery-head { margin-bottom: 3rem; }

.shoot-gallery-head .eyebrow {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.75rem;
}

.shoot-gallery-head .eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--gold); }

.shoot-gallery-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.9rem, 3vw, 2.75rem); font-weight: 300;
  color: var(--ink); line-height: 1.15;
}

.shoot-gallery-head h2 em { font-style: italic; color: var(--gold); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Optional wide tile: add class "wide" to a .photo to span two columns */
.photo.wide { grid-column: span 2; }

.photo {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  background: var(--ink);
  border: 1px solid var(--line);
}

.photo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}

.photo:hover img { transform: scale(1.06); }

.photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  color: rgba(255,255,255,0.85);
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.photo:hover .photo-caption { opacity: 1; transform: none; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(8,14,26,0.94);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 4rem 5rem;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
  animation: lbIn 0.35s cubic-bezier(0.22,1,0.36,1);
}

@keyframes lbIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

.lightbox-caption {
  position: absolute; bottom: 1.75rem; left: 0; right: 0;
  text-align: center;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,242,236,0.7);
}

.lightbox-count {
  display: block; margin-top: 0.4rem;
  color: var(--gold); font-size: 0.6rem; letter-spacing: 0.2em;
}

.lb-btn {
  position: absolute;
  background: rgba(245,242,236,0.06);
  border: 1px solid rgba(245,242,236,0.2);
  color: var(--paper);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 50%;
  transition: background 0.25s, border-color 0.25s;
}

.lb-btn:hover { background: var(--gold); border-color: var(--gold); }

.lb-close { top: 1.5rem; right: 1.5rem; }
.lb-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* ── PAGE-BOTTOM CTA (shared, navy) ── */
.page-cta {
  padding: 6rem 4rem;
  background: var(--ink);
  text-align: center;
  position: relative; overflow: hidden;
}

.page-cta-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(184,147,90,0.12) 0%, transparent 70%);
}

.page-cta h2 {
  position: relative; z-index: 1;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 300;
  color: var(--paper); max-width: 640px; margin: 0 auto 1.25rem;
}

.page-cta h2 em { font-style: italic; color: var(--gold-light); }

.page-cta p {
  position: relative; z-index: 1;
  font-size: 0.88rem; line-height: 1.8; color: rgba(245,242,236,0.55);
  max-width: 480px; margin: 0 auto 2.5rem;
}

.page-cta-btns {
  position: relative; z-index: 1;
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .subhead { padding: 8rem 2rem 3rem; }
  .listings { padding: 1rem 2rem 5rem; }
  .listings-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .listing-hero-content { padding: 6rem 2rem 3rem; }
  .shoot-meta-inner { grid-template-columns: repeat(2, 1fr); }
  .shoot-meta-item:nth-child(2n) { border-right: none; }
  .shoot-meta-item { padding: 1.5rem; }
  .shoot-gallery { padding: 4rem 2rem; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo.wide { grid-column: span 2; }
  .page-cta { padding: 5rem 2rem; }
  .lightbox { padding: 3rem 1rem; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo.wide { grid-column: span 1; }
  .shoot-meta-inner { grid-template-columns: 1fr; }
  .shoot-meta-item { border-right: none; border-bottom: 1px solid rgba(184,147,90,0.15); }
  .shoot-meta-item:last-child { border-bottom: none; }
  .listing-card h3 { font-size: 1.4rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .listing-card img, .photo img, .lightbox-img,
  .listing-card-view, .back-link { transition: none; animation: none; }
}
