/* Inner pages — portfolio, about, process, contact, case studies */
.section { padding: 4rem 0; }
.section.dark {
  background: var(--ink);
  color: #fff;
}
.section.dark .lede { color: #c8c0b4; font-weight: 300; }
.section h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .85rem; font-weight: 600; }
.section .lede { max-width: 52ch; margin-bottom: 1.75rem; color: var(--muted); font-weight: 300; line-height: 1.7; }

.grid-2 { display: grid; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: 0 12px 40px rgba(44,40,36,.08); transform: translateY(-2px); }
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-fallback,
.media-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 4/3;
  width: 100%;
  background: linear-gradient(160deg, #2a2622 0%, #1e1b18 58%, #3d3428 100%);
  color: #c4a574;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: .18em;
}
.project-intro-media .media-fallback { min-height: 220px; }
.card-body { padding: 1.25rem 1.3rem 1.4rem; }
.card-body h3 {
  font-size: 1.35rem; margin-bottom: .4rem; font-family: var(--font-display); font-weight: 600;
}
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { color: var(--accent-dark); }
.card-body p { font-size: .88rem; color: var(--muted); font-weight: 300; line-height: 1.55; }
.card-body a.more {
  display: inline-block; margin-top: .75rem;
  font-family: var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  font-size: .68rem; font-weight: 600; color: var(--accent-dark); text-decoration: none;
}
.card-body a.more:hover { color: var(--accent); }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.75rem 3rem; margin: 1.75rem 0; }
.stat-row div strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--accent-dark); line-height: 1;
  font-weight: 600;
}
.stat-row div span {
  font-size: .72rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .14em; font-weight: 500;
}

.gallery-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-grid img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: pointer;
}
.gallery-grid img:first-child { grid-column: span 2; aspect-ratio: 16/9; }

.spec-list { display: grid; gap: .9rem; margin-top: 1.25rem; }
.spec-list li {
  list-style: none; padding-left: 1.5rem; position: relative;
  font-size: .95rem; color: #d0c8bc; font-weight: 300; line-height: 1.6;
}
.spec-list li::before {
  content: "—"; position: absolute; left: 0; color: var(--accent-light);
}

.section.dark .unit-cards { display: grid; gap: 1.25rem; }
.section.dark .unit-card {
  border: 1px solid rgba(255,255,255,.1); padding: 1.4rem 1.5rem;
  background: rgba(255,255,255,.03);
}
.section.dark .unit-card.sold { opacity: .72; }
.section.dark .unit-card h3 { font-size: 1.5rem; margin: .3rem 0 .55rem; font-family: var(--font-display); }
.section.dark .unit-card .tag {
  font-family: var(--font-body); font-size: .62rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-light); font-weight: 600;
}
.section.dark .unit-card p { font-weight: 300; line-height: 1.65; color: #c8c0b4; }
.section.dark .unit-card .meta { font-size: .85rem; color: #9a9288; margin-top: .65rem; }

.process-steps { display: grid; gap: 2rem; counter-reset: step; }
.process-steps li {
  list-style: none; display: grid; gap: .5rem;
  padding-left: 3.75rem; position: relative;
}
.process-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 600;
  color: var(--accent-dark); line-height: 1;
}
.process-steps li strong {
  font-family: var(--font-display); letter-spacing: 0;
  font-size: 1.35rem; font-weight: 600;
}
.process-steps li p { color: var(--muted); font-weight: 300; line-height: 1.7; }

.contact-grid { display: grid; gap: 2.5rem; }
.contact-info p { margin-bottom: .65rem; color: var(--muted); font-weight: 300; }
.contact-info a { color: var(--accent-dark); text-decoration: none; }
.prose a { color: var(--accent-dark); text-decoration: none; }
.prose a:hover { color: var(--accent); }

.completion-section { background: var(--cream); }
.completion-section h2 {
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  margin: .5rem 0 1.25rem;
  font-weight: 600;
  max-width: 22ch;
}
.completion-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: .85rem;
}
.completion-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--black);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.65;
  max-width: 52ch;
}
.completion-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .4rem;
  height: .4rem;
  background: var(--accent-dark);
  border-radius: 50%;
}
.prose .completion-list li { max-width: none; color: var(--black); }

.unit-copy.prose p { max-width: none; }
.featured-copy.prose p { max-width: none; }

.project-intro { align-items: start; }
.project-intro .prose p { max-width: none; }
.project-intro-media {
  margin: 0;
  position: sticky;
  top: 6rem;
}
.project-intro-media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border: 1px solid var(--line);
}
@media (max-width: 767px) {
  .project-intro-media { position: static; order: -1; }
  .project-intro-media img { aspect-ratio: 16/10; }
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .section.dark .unit-cards { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .grid-3.portfolio { grid-template-columns: repeat(3, 1fr); }
}

/* Project detail — full media grid */
.project-media { background: var(--paper); }
.g-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
.g-item {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: block;
  overflow: hidden;
}
.g-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, opacity .35s ease;
}
.g-item:hover img { transform: scale(1.04); opacity: .92; }

/* Gallery lightbox */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gallery-lightbox.is-open { display: flex; }
.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, .94);
}
.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
}
.gallery-lightbox-figure { margin: 0; }
.gallery-lightbox-figure img {
  width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  background: var(--ink);
  border: 1px solid var(--line-dark);
}
.gallery-lightbox-figure figcaption {
  margin-top: .85rem;
  color: #c8c0b4;
  font-size: .88rem;
  text-align: center;
  font-weight: 300;
  letter-spacing: .04em;
}
.gallery-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-lightbox-close:hover { color: var(--accent-light); }
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 27, 24, .9);
  border: 1px solid var(--line-dark);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.gallery-lightbox-nav:hover { border-color: var(--accent); color: var(--accent-light); }
.gallery-prev { left: -3rem; }
.gallery-next { right: -3rem; }

@media (min-width: 640px) {
  .g-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .g-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 899px) {
  .gallery-prev { left: .25rem; }
  .gallery-next { right: .25rem; }
}
