/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:  #111111;
  --white:  #ffffff;
  --gray:   #f2f2f0;
  --mid:    #888888;
  --border: #e0e0e0;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-h: 52px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  background: var(--white);
  z-index: 100;
}

.nav-home {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #666;
  justify-self: start;
  transition: color 0.2s;
}

.nav-home:hover { color: var(--black); }

.nav-center {
  display: flex; align-items: center; gap: 10px;
}

.nav-dot {
  color: #bbb;
  font-weight: 300;
  user-select: none;
  pointer-events: none;
}

.nav-right {
  display: flex; align-items: center; gap: 28px;
  justify-self: end;
}

.nav-center a,
.nav-right a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #666;
  transition: color 0.2s;
}

.nav-center a:hover,
.nav-right a:hover,
.nav-center a.current,
.nav-right a.current { color: var(--black); }

.nav-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer; color: var(--black);
  justify-self: end;
}

/* Mobile dropdown */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 99;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  padding: 14px 24px;
  font-size: 0.88rem;
  color: var(--black);
  border-bottom: 1px solid var(--border);
}

.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { background: var(--gray); }
.nav-mobile-menu .nav-dot { display: none; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding-top: var(--nav-h);
}

/* Background logo — absolutely centered, behind text */
.hero-logo-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(180px, min(60vh, 68vw), 680px);
  cursor: default;
  pointer-events: none;
  z-index: 1;
}

/* ── Fallback: plain <img> logo ── */
.hero-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ── SVG draw-on system ── */
.hero-logo-wrap svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

/* All paths start hidden; stroke drawn by JS */
.hero-logo-wrap svg path,
.hero-logo-wrap svg circle,
.hero-logo-wrap svg rect,
.hero-logo-wrap svg polygon,
.hero-logo-wrap svg polyline,
.hero-logo-wrap svg ellipse {
  fill-opacity: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* No idle animation — segments travel continuously via JS */

/* Text block — spans the full bottom of the hero */
.hero-content {
  position: absolute;
  bottom: 48px;
  left: 56px;
  right: 56px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;               /* identical spacing between every row */
}

/* Row holding tagline (left) and social links (right) on the same baseline */
.hero-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;        /* wraps social below tagline when space is tight */
  gap: 5px 24px;          /* row-gap matches the column gap above */
}

.hero-name {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--black);
  margin-bottom: 0;       /* flex gap on hero-content handles spacing */
}

.hero-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* Social links — inline with tagline on large screens, wraps below on small */
.hero-social {
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.social-link {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
}

.social-link:hover { color: var(--black); }

.social-sep {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

/* ── Clients ── */

.clients-rows {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px 52px;
}

/* Each slot — fixed height, auto width so logos breathe naturally */
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.client-logo:hover { opacity: 1; }

.client-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  display: block;
}

/* Row 1 — wide wordmarks: smaller height so they read at the same
   visual weight as the compact marks in row 2 */
.clients-row--wordmark .client-logo {
  height: 26px;
}
.clients-row--wordmark .client-logo img {
  max-width: 200px;
}

/* Row 2 — compact / square marks: taller height since square logos
   need more vertical room to carry visual weight */
.clients-row--compact .client-logo {
  height: 40px;
}
.clients-row--compact .client-logo img {
  max-width: 130px;
}

/* Placeholder — shown when img src is empty or fails to load */
.client-logo img:not([src]),
.client-logo img[src=""] {
  display: none;
}

.client-logo:has(img:not([src])),
.client-logo:has(img[src=""]) {
  width: 96px;
  height: 36px;
  background: var(--border);
  border-radius: 2px;
}

/* ── Button ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--black);
  border: 1px solid var(--black);
  font-size: 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

/* ── Stats bar ── */
.stats-bar {
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  padding: 28px 0;
  background: #fff;
}

.stats-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #111;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-top: 5px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: #e0e0e0;
  flex-shrink: 0;
}

/* ── Sections ── */
.section { padding: 80px 0; }
.section-alt { background: #f5f5f3; }

.section-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 36px;
}

/* ── Page Header ── */
.page-header {
  padding: calc(var(--nav-h) + 60px) 0 52px;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 0.92rem;
  color: var(--mid);
  max-width: 480px;
  line-height: 1.7;
}

/* ── Project Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card { cursor: pointer; }

.card-img-wrap {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--gray);
  border-radius: 5px;
}

.card-img-wrap img,
.card-img-wrap video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img,
.card:hover .card-img-wrap video { transform: scale(1.04); }

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card-overlay { opacity: 1; }



.play-icon {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; padding-left: 2px;
}

.card-info { padding: 10px 0 0; }
.card-info h3 { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.card-info p { font-size: 0.76rem; color: var(--mid); }
.card-work { margin-bottom: 2px; }

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: center;
}

.about-text p {
  font-size: 0.98rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-tools {
  font-size: 0.88rem !important;
  color: #666 !important;
  margin-bottom: 10px !important;
}

.about-tools-label {
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 8px;
}

.about-availability {
  font-size: 0.88rem !important;
  font-weight: 600;
  color: #111 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 8px !important;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.service-item h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.service-item p {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.6;
  margin: 0;
}

.about-photo { aspect-ratio: 4/5; overflow: hidden; background: var(--border); border-radius: 3px; }

/* ── Contact ── */
.contact-wrap { max-width: 620px; }

.contact-wrap .section-title { margin-bottom: 16px; }

.contact-sub {
  color: var(--mid);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 32px;
  margin-top: -16px;
}

.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font);
  font-size: 0.86rem;
  color: var(--black);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--black); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #bbb; }

.form-success { display: none; color: #2a7a2a; font-size: 0.86rem; }

/* ── Map ── */
.more-installs-note {
  font-size: 0.85rem;
  color: var(--mid);
  letter-spacing: 0.01em;
}
.more-installs-note a {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.15s;
}
.more-installs-note a:hover { opacity: 0.5; }

.map-section { padding-bottom: 0; }

.map-wrap {
  width: 100%;
  height: 620px;
}

/* Pin drop marker — teardrop pointing down */
.map-marker {
  width: 11px;
  height: 11px;
  background: var(--black);
  border: 1px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.28);
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}

/* Centre dot — gives it a proper pin-head look */
.map-marker::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.map-marker:hover { transform: rotate(-45deg) scale(1.5); }

/* Popup — dark tag to match the pin.
   #install-map prefix raises specificity above Mapbox's own stylesheet. */
#install-map .mapboxgl-popup-content {
  padding: 4px 8px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  background: #111111;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.map-popup-label {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
}

#install-map .mapboxgl-popup-close-button { display: none; }
#install-map .mapboxgl-popup-tip { display: none; }

/* Map section header — title + toggle on the same row */
.map-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}
.map-section-header .section-title { margin-bottom: 0; }

.map-toggle-btn {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--mid);
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.map-toggle-btn:hover { border-color: var(--black); color: var(--black); }
.map-toggle-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* ── Showreel ── */
.showreel-section { padding: 0 0 80px; }

.showreel-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gray);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drop-in replacement — swap the placeholder div for an iframe when ready */
.showreel-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.showreel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.showreel-play {
  width: 60px;
  height: 60px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--mid);
  padding-left: 3px;
}

.showreel-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── Testimonial ── */
.testimonial-section { padding: 72px 0; }

.testimonials-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.testimonial-divider-v {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin: 40px 0;
}

.testimonial {
  text-align: center;
}

.testimonial-quote {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: -0.01em;
  color: var(--black);
  font-style: italic;
  margin-bottom: 24px;
}

.testimonial-attr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

.testimonial-logo {
  height: 18px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.testimonial-logo--sm { height: 13px; }
.testimonial-logo--mobile { display: none; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }

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

.footer span { font-size: 0.76rem; color: var(--mid); }

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social a {
  font-size: 0.76rem;
  color: var(--mid);
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--black); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}

.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal-panel {
  background: var(--white);
  max-width: 960px; width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  transform: translateY(20px);
  transition: transform 0.25s;
}

.modal-backdrop.open .modal-panel { transform: translateY(0); }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: 1px solid var(--border);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; cursor: pointer; color: var(--mid);
  transition: color 0.2s, border-color 0.2s;
}

.modal-close:hover { color: var(--black); border-color: var(--black); }

.modal-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-right: 48px;
}

.modal-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 7px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.modal-meta {
  font-size: 0.78rem;
  color: var(--mid);
  margin-bottom: 10px;
}

/* Tags — no boxes, inline dots */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.modal-tag {
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mid);
}

.modal-tag + .modal-tag::before {
  content: '·';
  margin: 0 8px;
  color: #ccc;
}

.modal-video-embed {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 28px;
  overflow: hidden;
}
.modal-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.modal-watch-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.modal-watch-link:hover { opacity: 0.4; }
.modal-watch-link + .modal-watch-link { margin-left: 24px; }

.modal-description {
  font-size: 0.85rem;
  line-height: 1.85;
  color: #555;
  margin-bottom: 28px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Graphic design galleries — natural aspect ratio, no crop */
.modal-gallery[data-category="graphic"] .modal-thumb {
  aspect-ratio: unset;
  height: auto;
  overflow: visible;
}

.modal-gallery[data-category="graphic"] .modal-thumb img {
  position: static !important;
  height: auto !important;
  width: 100%;
  object-fit: initial !important;
}

/* Sectioned modal layout */
.modal-section-grid,
.modal-section-divider,
.modal-section-description {
  grid-column: 1 / -1;
}
.modal-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
}
.modal-section-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}
.modal-section-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 32px 0;
}
.modal-section-description {
  font-size: 0.85rem;
  line-height: 1.85;
  color: #555;
  margin-bottom: 18px;
}

.modal-thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--gray);
  border-radius: 3px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  position: relative;
}

.modal-thumb:hover { border-color: var(--black); }
.modal-thumb img { transition: transform 0.3s; }
.modal-thumb:hover img { transform: scale(1.04); }
.modal-thumb video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.3s;
}
.modal-thumb:hover video { transform: scale(1.04); }

.modal-gallery[data-category="video"] {
  grid-template-columns: repeat(2, 1fr);
}
.modal-gallery[data-category="video"] .modal-thumb {
  aspect-ratio: 16 / 9;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-img-wrap {
  display: flex; align-items: center; justify-content: center;
  max-width: 90vw; max-height: 90vh;
}

.lightbox-img-wrap img,
#lightbox-video {
  max-width: 90vw; max-height: 90vh;
  width: auto; height: auto; object-fit: contain;
}

#lightbox-video { display: none; background: #000; }

.modal-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.modal-thumb-play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 13px;
  border-color: transparent transparent transparent white;
  margin-left: 3px;
}

.modal-thumb:hover .modal-thumb-play { background: rgba(0,0,0,0.45); }

.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none;
  color: white; font-size: 1.5rem; cursor: pointer;
  opacity: 0.5; transition: opacity 0.2s; line-height: 1;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: white; font-size: 2.6rem; cursor: pointer;
  opacity: 0.35; transition: opacity 0.2s;
  padding: 0 28px; line-height: 1; user-select: none;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox.single .lightbox-prev,
.lightbox.single .lightbox-next { display: none; }

/* Lightbox caption — sits below the image, never overlaps */
.lightbox-caption {
  max-width: 90vw;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.lightbox-caption.visible { opacity: 1; }
.lightbox-caption-title {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
}
.lightbox-caption-sub {
  margin: 0;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lbcap-meta {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Page transitions — white veil above content, below fixed nav ──
   Nav z-index: 100 stays above veil z-index: 50 so it never flickers. */
.page-veil {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 50;
  pointer-events: none;
  animation: veil-out 0.28s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes veil-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Resume link ── */
.resume-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.resume-link:hover { opacity: 0.4; }

/* ── 404 ── */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.error-page canvas { display: block; }

.error-code {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--mid);
  text-transform: uppercase;
  margin: 0;
}

.error-home {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.error-home:hover { color: var(--black); border-color: var(--black); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: 1fr 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-left { position: static; } /* unstick on narrow modals */
}

@media (max-width: 760px) {
  /* About: collapse to single column */
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; aspect-ratio: 1/1; }
  /* Hero: tighten inset */
  .hero-content { left: 24px; right: 24px; bottom: 36px; }
  /* Stack tagline and social vertically — eliminates the jarring mid-resize wrap jump */
  .hero-bottom-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  #nav { padding: 0 20px; }
  /* Hide About / Contact — keep Home + discipline links */
  .nav-right { display: none; }
  /* Slightly tighter text so links fit narrow screens */
  .nav-home,
  .nav-center a { font-size: 0.72rem; letter-spacing: 0.01em; }
  .section { padding: 56px 0; }
  .container { padding: 0 20px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .modal-panel { padding: 24px 18px; }
  .modal-section-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-section-grid[data-columns="4"] { grid-template-columns: repeat(2, 1fr); }
  .page-header { padding: calc(var(--nav-h) + 40px) 0 36px; }
  /* Tighten hero inset further */
  .hero-content { left: 16px; right: 16px; bottom: 28px; }
  /* Reduce letter-spacing so tagline and social fit on narrow phones */
  .hero-tagline { letter-spacing: 0.04em; }
  .social-link,
  .social-sep  { letter-spacing: 0.04em; }
  /* Allow social links to wrap within themselves on very small screens */
  .hero-social { white-space: normal; }
  /* Map: reduce height on mobile */
  .map-wrap { height: 340px; }
}

/* ── Phone (≤ 480px) — all phone-specific fixes ── */
@media (max-width: 480px) {

  /* Hero — equal gap between name / tagline / social, matching left + bottom inset */
  .hero-content { left: 20px; bottom: 48px; right: 20px; gap: 6px; }
  .hero-bottom-row { gap: 6px; }
  .hero-tagline,
  .social-link,
  .social-sep { font-size: 0.52rem; letter-spacing: 0.05em; }

  /* Cards — min-width:0 prevents long titles from unbalancing the grid columns.
     Text clamp keeps title + date each on one line across all pages. */
  .card { min-width: 0; }
  .card-info { min-width: 0; overflow: hidden; }
  .card-info h3 {
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card-info p {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Stats bar — reduce number size so the three stats breathe */
  .stat-number { font-size: 1.4rem; }
  .stat-label { font-size: 0.6rem; letter-spacing: 0.06em; }
  .stat-divider { height: 24px; }

  /* Testimonials — smaller quote; attribution wraps naturally */
  .testimonial-quote { font-size: 0.85rem; line-height: 1.7; }
  .testimonial-attr {
    font-size: 0.65rem;
    gap: 5px 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  /* Square logos (Restaurant Associates) stay at normal height */
  .testimonial-logo { height: 16px; }
  /* Swap Schulman Lobel logos — hide desktop version, show mobile version */
  .testimonial-logo--desktop { display: none; }
  .testimonial-logo--mobile { display: block; height: 13px; width: auto; }

  /* Clients — tighten row gap so the two groups don't feel disconnected;
     logos stay small enough for 2–3 per row */
  .clients-rows { gap: 20px; }
  .clients-row { gap: 14px 20px; }
  .clients-row--wordmark .client-logo { height: 17px; }
  .clients-row--compact .client-logo { height: 24px; }

  /* About — tighter body text */
  .about-text p { font-size: 0.85rem; line-height: 1.75; }

  /* Page headers on Install / Design / Video */
  .page-header h1 { font-size: 1.75rem; }
  .page-header p { font-size: 0.82rem; }
  .resume-link { font-size: 0.7rem; }

  /* Modal — compact header so images start higher; 2-col gallery */
  .modal-panel { padding: 20px 16px; }
  .modal-title { font-size: 1rem; }
  .modal-header { padding-bottom: 11px; margin-bottom: 14px; }
  .modal-label { font-size: 0.49rem; }
  .modal-meta { font-size: 0.58rem; margin-bottom: 6px; }
  .modal-tag { font-size: 0.47rem; }
  .modal-description { font-size: 0.78rem; line-height: 1.75; margin-bottom: 16px; }
  .modal-gallery { grid-template-columns: repeat(2, 1fr); gap: 5px; }
}

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {

  :root {
    --black:  #e8e8e6;
    --white:  #111111;
    --gray:   #1c1c1c;
    --border: #2a2a2a;
  }

  /* Nav */
  .nav-home,
  .nav-center a,
  .nav-right a { color: #777; }

  .nav-home:hover,
  .nav-center a:hover,
  .nav-right a:hover,
  .nav-center a.current,
  .nav-right a.current { color: var(--black); }

  .nav-dot { color: #333; }

  /* Stats bar */
  .stats-bar {
    border-top-color: var(--border);
    border-bottom-color: var(--border);
    background: var(--white);
  }
  .stat-number { color: var(--black); }
  .stat-label  { color: #666; }

  /* Sections */
  .section-alt { background: #191919; }

  /* About */
  .about-text p       { color: #999; }
  .about-tools        { color: #777 !important; }
  .about-tools-label  { color: var(--black); }
  .about-availability { color: var(--black) !important; }

  /* Contact */
  .contact-form input::placeholder,
  .contact-form textarea::placeholder { color: #3a3a3a; }
  .form-success { color: #5cb85c; }

  /* Modal */
  .modal-tag + .modal-tag::before { color: #333; }
  .modal-description              { color: #999; }
  .modal-section-divider          { border-top-color: var(--border); }
  .modal-watch-link               { color: var(--black); border-bottom-color: var(--black); }

  /* Hero logo — invert the dark monogram so it reads against the dark bg */
  .hero-logo-wrap { filter: invert(1); }

  /* Client logos — already grayscale; invert so they appear light on dark bg */
  .client-logo img { filter: grayscale(100%) invert(1); }

  /* Map — lighten and fully desaturate the dark-v11 tiles via canvas filter.
     Targeting the canvas leaves pin markers (separate DOM elements) untouched. */
  #install-map canvas { filter: grayscale(1) brightness(1.6); }

  /* Map pins — inverted: white body, black outline, black dot */
  .map-marker { background: #ffffff; border-color: #111111; }
  .map-marker::after { background: rgba(0,0,0,0.8); }
}
