/*
 * single-project.css — Verdant Nest
 * Single project detail page.
 * Loaded: is_singular('project')
 * Stacks after: global.css → page-projects.css
 */


/* ─── LOCAL TOKENS ──────────────────────────────────────────────────── */
:root {
  --spv2-ivory:    var(--bg);
  --spv2-ivory-d:  var(--bg2);
  --spv2-ivory-dd: var(--bg3);
  --spv2-charcoal: var(--coal);
  --spv2-sage:     var(--olive);
  --spv2-sage-l:   #b5c9b7;
  --spv2-text:     var(--ink);
  --spv2-muted:    var(--ink2);
  --spv2-serif:    var(--serif);
  --spv2-sans:     var(--sans);
  --spv2-ease:     var(--ease);
  --spv2-max:      var(--max-w);
  --spv2-pad:      var(--pad-x);

  /* Card palette — warm cream, matches Inspiration meta card */
  --spv2-card-bg:      #eae6dc;
  --spv2-card-border:  rgba(93, 88, 79, 0.16);
  --spv2-card-key:     #8a8378;
  --spv2-card-val:     #46413c;
  --spv2-card-row-sep: rgba(93, 88, 79, 0.10);
  --spv2-card-label:   #8a8378;
}


/* ─── SHARED WRAPPER ────────────────────────────────────────────────── */
.spv2-wrap {
  max-width: var(--spv2-max);
  margin-left:  auto;
  margin-right: auto;
  padding-left:  var(--spv2-pad);
  padding-right: var(--spv2-pad);
}

.spv2-section-label {
  display: block;
  font-family: var(--spv2-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}


/* ─── HERO ──────────────────────────────────────────────────────────── */
.spv2-hero {
  position: relative;
  background-color: var(--coal);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Left-to-right cinematic gradient */
.spv2-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    rgba(20, 22, 18, 0.88) 0%,
    rgba(20, 22, 18, 0.58) 45%,
    rgba(20, 22, 18, 0.18) 100%
  );
  pointer-events: none; z-index: 1;
}

/* Subtle bottom vignette */
.spv2-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(249, 247, 244, 0.10));
  pointer-events: none; z-index: 1;
}

.spv2-hero .spv2-wrap { position: relative; z-index: 2; }

.spv2-hero-full {
  padding: 108px 0 96px;
  max-width: 700px;
}

/* Breadcrumb */
.spv2-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--spv2-sans); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.30); margin-bottom: 40px;
}
.spv2-breadcrumb a { color: rgba(255,255,255,0.30); text-decoration: none; transition: color 0.25s; }
.spv2-breadcrumb a:hover { color: rgba(255,255,255,0.70); }
.spv2-bc-sep { opacity: 0.35; font-size: 10px; }

/* Kicker */
.spv2-kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--spv2-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--spv2-sage-l);
  margin-bottom: 28px;
}
.spv2-kicker-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--spv2-sage-l); opacity: 0.6; flex-shrink: 0;
}

.spv2-title {
  font-family: var(--spv2-serif);
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 300; line-height: 1.04; letter-spacing: -0.015em;
  color: #fff; margin: 0 0 26px;
}

.spv2-summary {
  font-family: var(--spv2-sans); font-size: 15px; font-weight: 300;
  line-height: 1.85; color: rgba(255,255,255,0.48);
  max-width: 500px; margin: 0 0 60px;
}

/* Stats row */
.spv2-stats {
  display: flex; align-items: flex-start; gap: 0;
  border-top: 1px solid rgba(255,255,255,0.10); padding-top: 36px;
}
.spv2-stat { flex: 0 0 auto; padding-right: 40px; }
.spv2-stat.has-border { padding-left: 40px; border-left: 1px solid rgba(255,255,255,0.10); }

.spv2-stat-num {
  font-family: var(--spv2-serif); font-size: 28px; font-weight: 400;
  color: #fff; line-height: 1; margin-bottom: 8px; letter-spacing: -0.01em;
}
.spv2-stat-label {
  font-family: var(--spv2-sans); font-size: 9.5px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.38); line-height: 1.6; max-width: 120px;
}

/* Scroll cue */
.spv2-hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center;
  opacity: 0.38;
}
.spv2-scroll-line {
  display: block; width: 1px; height: 52px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent);
  animation: spv2ScrollPulse 1.8s ease-in-out infinite;
}
@keyframes spv2ScrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* Hero entry animation */
.spv2-hero-full > * { animation: spv2FadeUp 0.70s ease both; }
.spv2-breadcrumb { animation-delay: 0.04s; }
.spv2-kicker     { animation-delay: 0.12s; }
.spv2-title      { animation-delay: 0.20s; }
.spv2-summary    { animation-delay: 0.28s; }
.spv2-stats      { animation-delay: 0.36s; }
@keyframes spv2FadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── OVERVIEW ──────────────────────────────────────────────────────── */
.spv2-overview {
  background: var(--spv2-ivory);
  padding: var(--pad-section) 0;
}

.spv2-overview-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 80px;
  align-items: start;
}
.spv2-overview-grid.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 780px;
}

/* Prose */
.spv2-prose .prose-content {
  font-family: var(--spv2-sans); font-size: 17px; font-weight: 300;
  line-height: 1.90; color: var(--spv2-muted);
}
.spv2-prose .prose-content p { margin-bottom: 24px; }
.spv2-prose .prose-content p:last-child { margin-bottom: 0; }
/* Drop-cap first paragraph — matches si-article intro style */
.spv2-prose .prose-content p:first-child {
  font-family: var(--spv2-serif); font-size: 21px; font-weight: 300;
  line-height: 1.65; color: var(--spv2-text); margin-bottom: 30px;
}
.spv2-prose .prose-content h2 {
  font-family: var(--spv2-serif); font-size: clamp(22px,2.2vw,28px);
  font-weight: 300; line-height: 1.2; color: var(--spv2-text);
  margin: 48px 0 16px; letter-spacing: -0.01em;
}
.spv2-prose .prose-content blockquote {
  border-left: 2px solid rgba(93,88,79,0.20); padding: 4px 0 4px 24px; margin: 36px 0;
}
.spv2-prose .prose-content blockquote p {
  font-family: var(--spv2-serif); font-size: 19px; font-style: italic;
  line-height: 1.65; color: var(--spv2-text); margin: 0;
}

/* ── Details card — warm cream, no longer dead black ──────────────── */
.spv2-details-card {
  background: var(--spv2-card-bg);
  border: 1px solid var(--spv2-card-border);
  padding: 36px 32px 32px;
  position: sticky;
  top: calc(var(--nav-h) + var(--ann-h) + 24px);
}

.spv2-card-label {
  display: block;
  font-family: var(--spv2-sans); font-size: 9px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--spv2-card-label); margin-bottom: 28px;
}

.spv2-meta-list { display: flex; flex-direction: column; }

.spv2-meta-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--spv2-card-row-sep);
}
.spv2-meta-row:first-child { border-top: 1px solid var(--spv2-card-row-sep); }
.spv2-meta-row:last-child  { border-bottom: none; padding-bottom: 0; }

.spv2-meta-key {
  font-family: var(--spv2-sans); font-size: 9px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--spv2-card-key); margin-bottom: 6px;
}

.spv2-meta-val {
  font-family: var(--spv2-serif); font-size: 17px; font-weight: 300;
  color: var(--spv2-card-val); line-height: 1.3;
}


/* ─── GALLERY ────────────────────────────────────────────────────────── */
.spv2-gallery {
  background: var(--spv2-ivory-d);
  padding: var(--pad-section) 0;
}

.spv2-gallery-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px;
}
.spv2-gallery-title {
  font-family: var(--spv2-serif); font-size: clamp(30px,3vw,44px);
  font-weight: 300; line-height: 1.08; letter-spacing: -0.01em;
  color: var(--spv2-text); margin: 10px 0 0;
}
.spv2-gallery-count {
  font-family: var(--spv2-sans); font-size: 11px; letter-spacing: 0.08em;
  color: var(--stone); padding-bottom: 6px;
}

/* Single image — tall cinematic crop */
.spv2-gallery-single {
  display: block; overflow: hidden; cursor: zoom-in; line-height: 0;
}
.spv2-gallery-single img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block;
  transition: transform 0.9s var(--spv2-ease);
}
.spv2-gallery-single:hover img { transform: scale(1.02); }

/* Caption below single image */
.spv2-gallery-caption {
  font-family: var(--spv2-sans); font-size: 12px; font-weight: 300;
  letter-spacing: 0.06em; color: var(--stone); margin-top: 16px;
  text-align: center; font-style: italic;
}

/* Duo */
.spv2-gallery-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.spv2-gallery-item { display: block; overflow: hidden; cursor: zoom-in; line-height: 0; }
.spv2-gallery-item img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block;
  transition: transform 0.85s var(--spv2-ease);
}
.spv2-gallery-item:hover img { transform: scale(1.04); }

/* Mosaic (3+) */
.spv2-gallery-mosaic { display: flex; flex-direction: column; gap: 6px; }

.spv2-mosaic-feature { display: block; overflow: hidden; cursor: zoom-in; width: 100%; line-height: 0; }
.spv2-mosaic-feature img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block;
  transition: transform 0.9s var(--spv2-ease);
}
.spv2-mosaic-feature:hover img { transform: scale(1.025); }

.spv2-mosaic-row { display: grid; grid-template-columns: 62fr 38fr; gap: 6px; }
.spv2-mosaic-land,
.spv2-mosaic-port { display: block; overflow: hidden; cursor: zoom-in; line-height: 0; }
.spv2-mosaic-land img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  transition: transform 0.85s var(--spv2-ease);
}
.spv2-mosaic-port img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.85s var(--spv2-ease);
}
.spv2-mosaic-land:hover img,
.spv2-mosaic-port:hover img { transform: scale(1.04); }

.spv2-mosaic-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.spv2-mosaic-cell { display: block; overflow: hidden; cursor: zoom-in; position: relative; line-height: 0; }
.spv2-mosaic-cell img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
  transition: transform 0.85s var(--spv2-ease);
}
.spv2-mosaic-cell:hover img { transform: scale(1.04); }
.spv2-mosaic-cell.has-more::after {
  content: attr(data-more); position: absolute; inset: 0;
  background: rgba(26,24,22,0.56); color: #fff;
  font-family: var(--spv2-serif); font-size: 34px; font-weight: 300; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: center; transition: background 0.3s;
}
.spv2-mosaic-cell.has-more:hover::after { background: rgba(26,24,22,0.4); }

.spv2-gallery-hidden { position: absolute; opacity: 0; pointer-events: none; }

/* Lightbox */
.vn-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(14,12,10,0.97); z-index: 9999;
  align-items: center; justify-content: center;
}
.vn-lightbox.is-open { display: flex; }
.vn-lightbox-img { max-width: 88vw; max-height: 88vh; object-fit: contain; display: block; }
.vn-lightbox-close,
.vn-lightbox-nav {
  position: absolute; background: none;
  border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.75);
  cursor: pointer; border-radius: 50%; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: background 0.25s, border-color 0.25s, color 0.25s; font-family: var(--spv2-sans); line-height: 1;
}
.vn-lightbox-close { top: 24px; right: 24px; font-size: 22px; }
.vn-lightbox-close:hover,
.vn-lightbox-nav:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.45); color: #fff;
}
.vn-lb-prev { left: 24px;  top: 50%; transform: translateY(-50%); }
.vn-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }


/* ─── TESTIMONIAL ────────────────────────────────────────────────────── */
.spv2-testimonial {
  background: var(--spv2-charcoal);
  padding: var(--pad-section) 0;
}
.spv2-testimonial-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.spv2-testimonial-mark {
  font-family: var(--spv2-serif); font-size: 88px; line-height: 0.5;
  color: var(--spv2-sage-l); opacity: 0.35; margin-bottom: 40px; display: block;
}
.spv2-testimonial-text {
  font-family: var(--spv2-serif); font-size: clamp(21px,2.6vw,30px);
  font-weight: 300; font-style: italic; line-height: 1.58;
  color: rgba(255,255,255,0.82); margin: 0 0 32px;
}
.spv2-testimonial-attr {
  display: block; font-family: var(--spv2-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); font-style: normal;
}


/* ─── FEATURED PRODUCTS ──────────────────────────────────────────────── */
.spv2-products {
  background: var(--spv2-ivory);
  padding: var(--pad-section) 0;
}
.spv2-section-head { margin-bottom: 48px; }
.spv2-section-title {
  font-family: var(--spv2-serif); font-size: clamp(30px,3vw,44px);
  font-weight: 300; line-height: 1.08; letter-spacing: -0.01em;
  color: var(--spv2-text); margin: 10px 0 0;
}

.spv2-product-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.spv2-product-grid .prod-card-img        { aspect-ratio: 3/4; }
.spv2-product-grid .prod-card-img-inner  { width: 100%; height: 100%; }


/* ─── RELATED PROJECTS ───────────────────────────────────────────────── */
.spv2-related {
  background: var(--spv2-ivory-d);
  padding: var(--pad-section) 0;
  border-top: 1px solid var(--border);
}
.spv2-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.spv2-related-item { display: block; text-decoration: none; color: inherit; overflow: hidden; }

.spv2-related-img {
  overflow: hidden; aspect-ratio: 4/3; background: var(--spv2-ivory-dd); line-height: 0;
}
.spv2-related-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.9s var(--spv2-ease);
}
.spv2-related-item:hover .spv2-related-img img { transform: scale(1.04); }
.spv2-related-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(155deg,#D0C8B4,#A8A088,#787060);
}

.spv2-related-meta { padding: 22px 0 28px; border-bottom: 1px solid var(--border); }
.spv2-related-type-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.spv2-related-type {
  font-family: var(--spv2-sans); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone);
}
.spv2-related-loc {
  font-family: var(--spv2-sans); font-size: 9.5px; letter-spacing: 0.1em;
  color: var(--stone); opacity: 0.6;
}
.spv2-related-title {
  font-family: var(--spv2-serif); font-size: clamp(19px,2vw,25px);
  font-weight: 300; line-height: 1.2; color: var(--coal); margin: 0 0 14px;
  transition: color 0.2s;
}
.spv2-related-item:hover .spv2-related-title { color: var(--olive); }
.spv2-related-cta {
  font-family: var(--spv2-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--stone);
  display: inline-block; transition: color 0.2s, letter-spacing 0.3s;
}
.spv2-related-item:hover .spv2-related-cta { color: var(--coal); letter-spacing: 0.2em; }


/* ─── CTA ────────────────────────────────────────────────────────────── */
/*
 * Elevated CTA: dark background, editorial two-column layout.
 * Provides strong visual punctuation at the end of the project journey.
 */
.spv2-cta {
  background: #2e2c28;          /* warm dark — not pure black */
  padding: 100px 0 104px;
}

.spv2-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 80px;
}

.spv2-cta-text { max-width: 540px; }

/* Override shared .spv2-section-label for dark bg */
.spv2-cta .spv2-section-label {
  color: rgba(181, 201, 183, 0.6);      /* sage tint */
}

.spv2-cta-title {
  font-family: var(--spv2-serif);
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 300; line-height: 1.04; letter-spacing: -0.015em;
  color: #f2ede6;                         /* warm off-white */
  margin: 12px 0 20px;
}

.spv2-cta-desc {
  font-family: var(--spv2-sans); font-size: 14.5px; font-weight: 300;
  line-height: 1.85; color: rgba(242, 237, 230, 0.42);
  margin: 0; max-width: 420px;
}

.spv2-cta-actions {
  display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; min-width: 228px;
}

/* Override global .btn colours for dark CTA bg */
.spv2-cta .btn-primary {
  background: #f2ede6; color: #2e2c28; border-color: #f2ede6;
}
.spv2-cta .btn-primary:hover {
  background: #fff; border-color: #fff; color: #2e2c28;
}
.spv2-cta .btn-secondary {
  background: transparent; color: rgba(242,237,230,0.78);
  border: 1.5px solid rgba(242,237,230,0.25);
}
.spv2-cta .btn-secondary:hover {
  border-color: rgba(242,237,230,0.65); color: #f2ede6;
}


/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .spv2-overview-grid { grid-template-columns: 1fr 280px; gap: 56px; }
  .spv2-cta-inner { gap: 60px; }
}

@media (max-width: 1024px) {
  .spv2-hero-full { max-width: 100%; padding: 84px 0 76px; }
  .spv2-overview-grid { grid-template-columns: 1fr; gap: 48px; }
  .spv2-details-card  { position: static; }
  .spv2-product-grid  { grid-template-columns: repeat(2,1fr); }
  .spv2-related-grid  { grid-template-columns: repeat(3,1fr); }
  .spv2-cta-inner     { grid-template-columns: 1fr; gap: 44px; }
  .spv2-cta-actions   { flex-direction: row; min-width: auto; }
}

@media (max-width: 860px) {
  .spv2-mosaic-row { grid-template-columns: 1fr; }
  .spv2-mosaic-port img { aspect-ratio: 16/9; height: auto; }
  .spv2-gallery-duo { grid-template-columns: 1fr; }
  .spv2-gallery-item img { aspect-ratio: 16/9; }
  .spv2-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .spv2-hero-full  { padding: 68px 0 64px; }
  .spv2-summary    { margin-bottom: 48px; max-width: 100%; }

  .spv2-overview   { padding: 68px 0; }
  .spv2-gallery    { padding: 68px 0; }
  .spv2-products   { padding: 68px 0; }
  .spv2-related    { padding: 68px 0; }
  .spv2-cta        { padding: 72px 0; }

  .spv2-gallery-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .spv2-mosaic-grid  { grid-template-columns: repeat(2,1fr); }
  .spv2-details-card { padding: 28px 24px; }
  .spv2-cta-actions  { flex-direction: column; width: 100%; }
  .spv2-cta-actions .btn { width: 100%; text-align: center; }
  .spv2-hero-scroll  { display: none; }
  .vn-lb-prev { left: 12px; }
  .vn-lb-next { right: 12px; }
}

@media (max-width: 640px) {
  .spv2-related-grid { grid-template-columns: 1fr; }
  .spv2-product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .spv2-title  { font-size: 38px; }
  .spv2-stats  { flex-wrap: wrap; row-gap: 20px; }
  .spv2-stat   { flex: 0 0 50%; padding-right: 0; }
  .spv2-stat.has-border { border-left: none; padding-left: 0; }
  .spv2-mosaic-grid { grid-template-columns: 1fr; }
  .spv2-mosaic-cell img { aspect-ratio: 16/10; }
}
