:root {
  --page: #ffffff;
  --text: #202020;
  --muted: #717171;
  --line: #e5e5e5;
  --soft: #f5f5f3;
  --accent: #8d6a43;
  --max: 1360px;
  --content-pad: clamp(18px, 3vw, 42px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.site-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: clamp(23px, 2vw, 30px);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.045em;
  color: #555;
}
.brand strong { color: #111; font-weight: 780; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #252525;
  margin: 5px 0;
}

.site-nav { display: flex; align-items: center; gap: clamp(15px, 2vw, 32px); }
.site-nav a {
  position: relative;
  padding: 32px 0 27px;
  color: #797979;
  text-decoration: none;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { color: #222; }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

main { min-height: 60vh; }

.hero { padding: 22px 0 0; }
.hero-frame {
  position: relative;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 16 / 9;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero-frame img.active { opacity: 1; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  cursor: pointer;
}
.hero-dots button.active { background: #fff; }

.page-intro {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: 36px 0 22px;
}
.intro-copy { padding-right: 12px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 750;
  margin: 0 0 10px;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 620;
}
.intro-copy p {
  margin: 0 0 18px;
  color: #555;
  font-size: 16px;
}

.gallery-panel { min-width: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.gallery-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 3 / 2;
  text-decoration: none;
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.gallery-card:hover img { transform: scale(1.025); filter: brightness(.92); }
.gallery-card .card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 10px 8px;
  color: #fff;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  background: linear-gradient(transparent, rgba(0,0,0,.66));
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.category { margin: 0 0 34px; }
.category-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 12px;
}
.category-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 500;
  color: #454545;
  white-space: nowrap;
}
.category-head::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: 34px 0 30px;
}
.about-image { width: 100%; }
.about-copy h1 { margin-bottom: 24px; }
.about-copy p { color: #555; font-size: 17px; margin: 0; }

.corporate-grid { grid-template-columns: 1fr; gap: 18px; }
.corporate-grid .gallery-card { aspect-ratio: 5.5 / 1; min-height: 116px; }

.site-footer {
  margin-top: 48px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: #858585;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 9px; }
.footer-links a, .site-footer a { text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { color: #333; }
.footer-contact { text-align: right; }

.gallery-loading, .gallery-error {
  padding: 24px 0;
  color: #8a8a8a;
  font-size: 14px;
}

@media (max-width: 1050px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header { min-height: 76px; }
  .site-nav { gap: 18px; }
  .site-nav a { padding: 26px 0 23px; font-size: 15px; }
  .page-intro { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 780px) {
  .site-shell { width: min(100% - 28px, var(--max)); }
  .site-header { min-height: 70px; position: relative; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    z-index: 20;
    top: 69px;
    left: -14px;
    right: -14px;
    background: rgba(255,255,255,.98);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 15px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 2px; }
  .site-nav a.active::after { left: 2px; right: auto; width: 36px; bottom: 5px; }
  .page-intro, .about-layout { grid-template-columns: 1fr; gap: 20px; }
  .page-intro { padding-top: 28px; }
  .intro-copy { max-width: 680px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .footer-inner { display: block; }
  .footer-contact { text-align: left; margin-top: 14px; }
  .about-image { max-height: 620px; object-fit: cover; }
}

@media (max-width: 480px) {
  .site-shell { width: calc(100% - 22px); }
  .brand { font-size: 22px; }
  .hero { padding-top: 12px; }
  .hero-frame { aspect-ratio: 4 / 3; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-card { aspect-ratio: 16 / 10; }
  .category { margin-bottom: 28px; }
  .category-head h2 { white-space: normal; }
  .corporate-grid .gallery-card { aspect-ratio: 3 / 1; }
}

/* Responsive portfolio lightbox */
body.lightbox-open { overflow: hidden; }
.ph-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
}
.ph-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
.ph-lightbox-stage {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  padding: 28px 76px 28px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-lightbox-figure {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}
.ph-lightbox-image-wrap {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 14px 48px rgba(0,0,0,.32);
}
.ph-lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: calc(100vw - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .01em;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.ph-lightbox-title {
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .88;
}
.ph-lightbox-title:not(:empty)::after {
  content: "·";
  margin-left: 10px;
  opacity: .55;
}
.ph-lightbox-count { opacity: .72; }
.ph-lightbox-close,
.ph-lightbox-prev,
.ph-lightbox-next {
  position: fixed;
  z-index: 5;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.ph-lightbox-close {
  top: 14px;
  right: 18px;
  width: 48px;
  height: 48px;
  font-size: 38px;
  font-weight: 200;
  line-height: 1;
  opacity: .78;
}
.ph-lightbox-prev,
.ph-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 88px;
  font-size: 38px;
  opacity: .62;
}
.ph-lightbox-prev { left: 8px; }
.ph-lightbox-next { right: 8px; }
.ph-lightbox-close:hover,
.ph-lightbox-prev:hover,
.ph-lightbox-next:hover { opacity: 1; }

@media (max-width: 700px) {
  .ph-lightbox-backdrop {
    background: rgba(0,0,0,.82);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .ph-lightbox-stage { padding: 56px 0 44px; }
  .ph-lightbox-image-wrap { padding: 0; }
  .ph-lightbox-caption {
    bottom: 12px;
    max-width: calc(100vw - 40px);
    font-size: 11px;
    gap: 8px;
  }
  .ph-lightbox-title:not(:empty)::after { margin-left: 8px; }
  .ph-lightbox-close {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,.22);
    font-size: 32px;
  }
  .ph-lightbox-prev,
  .ph-lightbox-next {
    width: 48px;
    height: 72px;
    font-size: 32px;
    background: rgba(0,0,0,.14);
  }
  .ph-lightbox-prev { left: 0; }
  .ph-lightbox-next { right: 0; }
}

/* Global footer contact visibility — applies to every page */
.site-footer .footer-contact {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  color: #555;
}

.site-footer .footer-contact a {
  color: #555;
  font-weight: 500;
  text-decoration: none;
}

.site-footer .footer-contact a:hover,
.site-footer .footer-contact a:focus-visible {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}
