/* ─────────────────────────────────────────────────────────────
   HGP ARCHITECTS — Stylesheet
   Dark theme: black background, white text, blue accent
   Type: Montserrat throughout (matching logo)
───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ── TOKENS ── */
:root {
  --bg:         #0D0D0D;
  --ink:        #F0EEE9;
  --ink-mid:    #A0A09A;
  --ink-light:  #4A4A48;
  --rule:       #2A2A2A;
  --blue:       #5B7FD4;

  --font:       'Montserrat', sans-serif;

  --max-w:      1140px;
  --pad-x:      clamp(1.5rem, 5vw, 4rem);
  --pad-y:      clamp(3rem, 6vw, 5rem);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark img {
  height: 64px;
  width: auto;
  display: block;
  filter: invert(1);
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.nav-link.active {
  border-bottom: 1px solid var(--blue);
  padding-bottom: 1px;
}

.header-rule {
  height: 1px;
  background: var(--rule);
}

/* ── HERO ── */
.hero {
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--pad-x) var(--pad-y);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo-wrap {
  margin-bottom: 3.5rem;
}

.hero-logo {
  width: clamp(220px, 40vw, 420px);
  height: auto;
  filter: invert(1);
}

.hero-headline {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.hero-body {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-mid);
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.cta-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.cta-link:hover { opacity: 0.65; }

/* ── SERVICES ── */
.services {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--rule);
}

.section-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.service-item {
  padding: 2rem 2.5rem 2rem 0;
  border-right: 1px solid var(--rule);
  margin-right: 2.5rem;
}

.service-item:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.service-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.service-desc {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink-mid);
}

/* ── CONTACT ── */
.contact {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--rule);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-heading {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--ink);
}

.contact-body {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink-mid);
}

.contact-details {
  padding-top: 0.25rem;
}

.contact-row {
  display: flex;
  gap: 2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.contact-row:first-child {
  border-top: 1px solid var(--rule);
}

.contact-key {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  min-width: 5rem;
}

.contact-val {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink);
}

a.contact-val:hover {
  color: var(--blue);
}

/* ── FOOTER ── */
.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem var(--pad-x);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-name {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.footer-copy {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

/* ── FOLIO PAGE ── */
.folio-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--pad-x) 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.folio-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.folio-grid-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

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

.folio-item {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.folio-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #1A1A1A;
}

.folio-img-wrap.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.folio-img-wrap.img-placeholder::after {
  content: 'Image';
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.folio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.85;
}

.folio-item:hover .folio-img {
  transform: scale(1.03);
  opacity: 1;
}

.folio-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.folio-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.folio-type {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

.folio-year {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.folio-title {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
}

.folio-location {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  margin-top: -0.4rem;
}

.folio-desc {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink-mid);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 1.75rem 0;
    margin-right: 0;
    padding-right: 0;
  }

  .service-item:last-child {
    border-bottom: none;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .folio-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .wordmark img {
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .folio-img { transition: none; }
}

/* ── IMAGE COUNT BADGE ── */
.folio-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240,238,233,0.85);
  background: rgba(0,0,0,0.5);
  padding: 0.3rem 0.6rem;
  backdrop-filter: blur(4px);
}

.folio-img-wrap {
  cursor: pointer;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5,5,5,0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0 1.5rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  background: none;
  border: none;
  color: var(--ink-mid);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox-close:hover { color: var(--ink); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-mid);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 1rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--ink); }

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  padding: 0 4rem;
  flex: 1;
  min-height: 0;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox-info {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  width: 100%;
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
  margin-top: 1rem;
}

.lightbox-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.lightbox-type {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

.lightbox-year {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.lightbox-title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

.lightbox-location {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-light);
}

.lightbox-desc {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-mid);
  flex-basis: 100%;
  max-width: 700px;
}

.lightbox-counter {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  margin-left: auto;
}

/* Thumbnail strip */
.lightbox-thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.85rem 4rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1400px;
  width: 100%;
  flex-shrink: 0;
}

.lb-thumb {
  background: none;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 32px;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-thumb:hover { opacity: 0.8; }
.lb-thumb.active {
  opacity: 1;
  border-color: var(--blue);
}

/* Lightbox responsive */
@media (max-width: 768px) {
  .lightbox-inner {
    padding: 0 1.5rem;
  }

  .lightbox-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .lightbox-counter {
    margin-left: 0;
  }

  .lightbox-thumbs {
    padding: 0.75rem 1.5rem;
  }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}
