:root {
  color-scheme: light dark;
  --paper: #f5f3ed;
  --paper-rgb: 245, 243, 237;
  --paper-elevated: #fffef9;
  --ink: #233b33;
  --ink-muted: #59665b;
  --accent: #304d40;
  --accent-hover: #1f332a;
  --btn-bg: #304d40;
  --btn-text: #ffffff;
  --line: #d9d8cf;
  --card-bg: #e4e3db;
  --badge-bg: rgba(255, 254, 240, 0.92);
  --badge-color: #263a30;
  --footer-bg: #233b33;
  --footer-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121314;
    --paper-rgb: 18, 19, 20;
    --paper-elevated: #1a1c1e;
    --ink: #f2f4f3;
    --ink-muted: #9da3a8;
    --accent: #c9a466;
    --accent-hover: #deb97a;
    --btn-bg: #c9a466;
    --btn-text: #121314;
    --line: #2a2d30;
    --card-bg: #1c1e20;
    --badge-bg: rgba(22, 24, 26, 0.94);
    --badge-color: #f2f4f3;
    --footer-bg: #0c0d0e;
    --footer-text: #f2f4f3;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: inherit; text-underline-offset: 5px; }

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(var(--paper-rgb), 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.brand {
  order: 1;
  flex-shrink: 0;
}
header .brand img {
  display: block;
  width: 218px;
  height: auto;
  mix-blend-mode: multiply;
  transition: filter 0.25s ease;
}
@media (prefers-color-scheme: dark) {
  header .brand img {
    filter: invert(1) brightness(1.2) contrast(1.1);
    mix-blend-mode: normal;
  }
}

.header-actions {
  order: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.menu-toggle {
  display: none;
}

.main-nav {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
}
.nav-links a {
  text-decoration: none;
  padding: 6px 2px;
  transition: color 0.2s ease;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-muted);
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-links [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1.5px;
}
.nav-contact {
  display: none;
}

.header-call {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--btn-bg, var(--accent));
  color: var(--btn-text, #fff) !important;
  padding: 9px 18px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.header-call:hover { opacity: 0.92; }
.header-call:active { transform: scale(0.97); }

.skip { position: absolute; top: -100px; left: 15px; z-index: 100; padding: 10px; background: white; }
.skip:focus { top: 10px; }

/* Typography */
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; line-height: 1.1; letter-spacing: -0.03em; }
h1 { font-size: clamp(38px, 6vw, 78px); max-width: 900px; }
h2 { font-size: clamp(28px, 4vw, 48px); max-width: 750px; }
h3 { font-size: 21px; font-weight: 500; line-height: 1.4; }
.eyebrow { font-size: 11px; letter-spacing: 0.17em; font-weight: 700; text-transform: uppercase; }

/* Sections & Layout */
section { padding: 70px 6%; max-width: 1500px; margin: auto; }
section > p { max-width: 850px; }
section > img { max-height: 430px; width: 100%; object-fit: cover; margin: 12px 0 32px; border-radius: 2px; }

.hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: end;
  padding-bottom: 70px;
  background: #24342f;
  color: white;
  max-width: none;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  margin: 0;
  opacity: 0.6;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(19, 37, 27, 0.79), transparent);
}
.hero > div { position: relative; z-index: 1; }
.hero h1 { margin: 20px 0; color: #fff; }
.hero p { color: #f0f3ef; }

.button {
  display: inline-block;
  background: var(--btn-bg, var(--accent));
  color: var(--btn-text, #fff) !important;
  padding: 13px 26px;
  text-decoration: none;
  margin-top: 12px;
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
}
.button:hover { opacity: 0.92; }
.button:active { transform: scale(0.98); }

.intro { border-bottom: 1px solid var(--line); }
.links { display: flex; gap: 40px; margin-top: 30px; }
.grid, .services, .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }

/* Projects */
.project { text-decoration: none; }
.project:hover .project-caption h3 { color: var(--accent); }
.project-image { position: relative; overflow: hidden; background: var(--card-bg); border-radius: 4px; }
.project-image img { width: 100%; height: 360px; aspect-ratio: 1.5; object-fit: cover; display: block; }
.photo-count {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: var(--badge-bg);
  color: var(--badge-color);
  font-size: 11px;
  line-height: 1;
  padding: 9px 12px;
  border-radius: 3px;
  font-weight: 600;
}
.project-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  width: 34px;
  height: 34px;
  background: var(--badge-bg);
  color: var(--badge-color);
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-weight: bold;
}
.project-caption { padding: 16px 0 0; }
.project-caption h3 { font: 25px/1.2 Georgia, serif; margin: 4px 0 0; }
.project-caption p { margin: 0; color: var(--ink-muted); }

.services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.services article { border-top: 1px solid var(--line); padding: 14px 0; }

.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery img { height: 380px; }

/* Credentials Strip & 4-Step Process */
.credentials-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 6%;
  max-width: 1500px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper-elevated);
}
.credential-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.credential-item strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.credential-item span {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.process-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.process-step {
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 10px;
}
.process-step h3 {
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--ink);
}
.process-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* Home Testimonials Highlight */
.home-testimonials {
  border-bottom: 1px solid var(--line);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-header h2 {
  margin: 10px 0 0;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.testimonial-card {
  margin: 0;
  padding: 28px 30px;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}
.testimonial-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
}

/* Project Portfolio & Filters */
.portfolio-head { display: flex; align-items: end; gap: 80px; padding-top: 60px; padding-bottom: 45px; }
.portfolio-head h1 { font-size: clamp(40px, 5.8vw, 82px); margin: 20px 0 0; max-width: 900px; }
.portfolio-head > div { flex: 1.5; }
.portfolio-head > p { flex: 0.6; font-size: 15px; line-height: 1.8; max-width: 295px; margin-bottom: 8px; color: var(--ink-muted); }
.portfolio-body { padding-top: 0; padding-bottom: 95px; }

.scope-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.scope-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-elevated);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.scope-pill:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.scope-pill.is-active {
  background: var(--btn-bg, var(--accent));
  color: var(--btn-text, #fff);
  border-color: var(--btn-bg, var(--accent));
}

.gallery-tools { display: flex; gap: 25px; align-items: end; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin-bottom: 40px; }
.gallery-tools label { display: flex; flex-direction: column; gap: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; min-width: 155px; }
.gallery-tools .search-label { flex: 1; }
.gallery-tools input, .gallery-tools select {
  font: 15px Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  width: 100%;
  min-height: 44px;
}
.portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px 30px; }
.empty-state { padding: 60px 0; text-align: center; }
button { font: inherit; cursor: pointer; }
.empty-state button { padding: 12px 24px; background: var(--ink); color: var(--paper); border: 0; border-radius: 4px; }

.project-head { padding-top: 45px; padding-bottom: 40px; }
.back-link { text-decoration: none; font-size: 13px; display: inline-block; margin-bottom: 30px; color: var(--ink-muted); }
.project-head h1 { margin: 15px 0 16px; font-size: clamp(38px, 6vw, 80px); }
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.project-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
.project-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.project-summary p { margin: 0; max-width: 780px; color: var(--ink-muted); }
.project-summary > span { font-size: 12px; white-space: nowrap; color: var(--ink-muted); }
.project-photos { padding-top: 0; }
.gallery-instruction { font-size: 12px; color: var(--ink-muted); margin: 0 0 20px; }

.gallery { display: block; columns: 2; column-gap: 22px; }
.gallery-photo { display: block; position: relative; margin-bottom: 22px; break-inside: avoid; overflow: hidden; background: var(--card-bg); border-radius: 4px; }
.gallery-photo img { width: 100%; height: auto; display: block; }
.gallery-photo > span {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  font-size: 12px;
}
.gallery-photo > span b { font-size: 18px; font-weight: 400; }

/* Previous / Next Project Pagination */
.project-pagination {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}
.pagination-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.pagination-card:hover {
  border-color: var(--accent);
}
.pagination-card.next {
  text-align: right;
  align-items: flex-end;
}
.pagination-dir {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.pagination-card strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.pagination-meta {
  font-size: 12px;
  color: var(--ink-muted);
}
.pagination-all {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-muted);
  white-space: nowrap;
}
.pagination-all:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* Lightbox Modal */
.gallery-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 22px 35px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: #121314;
  color: #f2f4f3;
  overflow: hidden;
  grid-template-rows: auto minmax(0,1fr) auto auto;
  gap: 14px;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(12, 13, 14, 0.96); }
.lightbox-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lightbox-top p { margin: 0 0 7px; color: #9da3a8; }
.lightbox-top h2 { font-size: 24px; letter-spacing: 0; margin: 0; color: #f2f4f3; }
.lightbox-top-actions { display: flex; align-items: center; gap: 10px; }
.lightbox-counter-pill {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f2f4f3;
  white-space: nowrap;
}
.lightbox button {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: white;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.lightbox .lightbox-zoom {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, 0.15); outline: none; }
.lightbox-stage { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; gap: 18px; min-height: 0; align-items: center; }
.lightbox-frame { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; touch-action: pan-y pinch-zoom; overflow: hidden; }
.lightbox-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; cursor: zoom-in; transition: transform 0.22s ease; }
.lightbox-frame.is-zoomed { overflow: auto; cursor: zoom-out; }
.lightbox-frame.is-zoomed .lightbox-image { transform: scale(1.65); cursor: zoom-out; }
.lightbox-frame.loading:after { content: 'Loading photograph…'; position: absolute; bottom: 12px; padding: 6px 14px; background: rgba(18, 19, 20, 0.92); color: #fff; font-size: 12px; border-radius: 4px; }
.lightbox-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 0 66px; }
.lightbox-hint-desktop { color: #9da3a8; font-size: 12px; }
.lightbox-hint-mobile { display: none; color: #9da3a8; font-size: 11px; }
.lightbox-original { color: white; text-decoration: none; }
.lightbox-thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 8px 3px; max-width: 100%; scrollbar-width: thin; position: relative; overscroll-behavior: contain; }
.lightbox-thumbs button { flex: 0 0 74px; width: 74px; height: 52px; padding: 0; border: 2px solid transparent; opacity: 0.55; }
.lightbox-thumbs button[aria-current] { opacity: 1; border-color: #c9a466; }
.lightbox-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Testimonials & Footer */
blockquote { margin: 32px 0; padding: 25px 0 30px; border-bottom: 1px solid var(--line); max-width: 900px; }
cite { font-size: 14px; font-style: normal; font-weight: bold; color: var(--accent); }
footer {
  padding: 65px 6%;
  background: var(--footer-bg);
  color: var(--footer-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: max(65px, env(safe-area-inset-bottom));
}
footer h2 { font-size: 42px; margin: 16px 0 22px; color: #fff; }
footer .button { background: #e3e8d8; color: #233b33 !important; }
footer a { color: #fff; }
footer small { color: rgba(255,255,255,0.7); }

/* Breadcrumbs & Search Details */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; padding: 20px 6% 0; max-width: 1500px; margin: auto; width: 100%; color: var(--ink-muted); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }
.search-context { border-top: 1px solid var(--line); }
.search-context > p { color: var(--ink-muted); }
.search-context details { border-bottom: 1px solid var(--line); max-width: 950px; padding: 18px 0; }
.search-context summary { cursor: pointer; font-size: 17px; padding-right: 15px; line-height: 1.5; font-weight: 500; }
.search-context details p { font-size: 15px; color: var(--ink-muted); max-width: 800px; margin: 14px 0 4px; }

/* Contact Form & Mobile-friendly Inputs */
.contact { min-height: 60vh; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 50px; align-items: start; }
.contact-details h1 { font-size: clamp(38px, 5vw, 65px); margin-top: 18px; }
.contact-details > p { max-width: 420px; color: var(--ink-muted); }
.contact-note { font-size: 12px; color: var(--ink-muted); margin-top: 26px; }

.custom-inquiry {
  background: var(--paper-elevated);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.custom-inquiry h2 { font-size: 34px; margin: 14px 0; }
.inquiry-intro { font-size: 14px; color: var(--ink-muted); margin-bottom: 26px; }
.inquiry-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.inquiry-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; min-width: 0; }
.inquiry-field label { font-size: 13px; font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-muted); font-size: 11px; }

/* Mobile Touch Zoom Protection: font-size MUST be at least 16px to prevent iOS auto-zoom */
.inquiry-field input,
.inquiry-field select,
.inquiry-field textarea {
  width: 100%;
  font-size: 16px !important;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 13px 14px;
  border-radius: 4px;
  min-height: 48px;
  transition: border-color 0.2s, background 0.2s;
}
.inquiry-field textarea { resize: vertical; min-height: 140px; }
.inquiry-field input::placeholder, .inquiry-field textarea::placeholder { color: var(--ink-muted); opacity: 0.85; }
.inquiry-field input:focus, .inquiry-field select:focus, .inquiry-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: var(--paper-elevated);
}
.inquiry-help { font-size: 12px; line-height: 1.6; color: var(--ink-muted); margin: 0 0 18px; }
.inquiry-submit {
  border: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 4px;
  background: var(--btn-bg, var(--accent));
  color: var(--btn-text, #fff);
  transition: opacity 0.2s, transform 0.1s;
}
.inquiry-submit:hover { opacity: 0.92; }
.inquiry-submit:active { transform: scale(0.99); }
.custom-inquiry .form-fallback { border-top: 1px solid var(--line); margin: 22px 0 0; padding: 16px 0 0; font-size: 12px; color: var(--ink-muted); }

/* Confirmation Screen */
.inquiry-success { padding: 10px 0; }
.inquiry-success h2 { font-size: 34px; margin: 14px 0; }
.inquiry-success h2:focus { outline: none; }
.inquiry-success-text { font-size: 15px; line-height: 1.7; color: var(--ink-muted); margin-bottom: 26px; }
.inquiry-success-call { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin: 24px 0; }
.inquiry-success-call p { margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.inquiry-reset { background: none; border: 0; padding: 0; font-size: 13px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.inquiry-reset:hover { opacity: 0.8; }
.inquiry-hidden-frame { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }

/* Focus Accessibility */
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Responsive & Mobile Optimizations */
@media (min-width: 1450px) {
  .project-image img { height: 410px; }
}

@media (max-width: 1050px) {
  .portfolio-head { gap: 30px; }
  .project-image img { height: 280px; }
  .gallery-tools { gap: 18px; }
  .gallery-tools label { min-width: 140px; }
}

@media (max-width: 850px) {
  header {
    padding: 13px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  header .brand {
    order: 1;
    margin: 0;
  }
  header .brand img {
    width: clamp(140px, 38vw, 175px);
    height: auto;
  }
  .header-actions {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .header-call {
    padding: 8px 13px;
    font-size: 12px;
  }
  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
  }
  .menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  @media (prefers-color-scheme: dark) {
    .menu-toggle:hover {
      background: rgba(255, 255, 255, 0.08);
    }
  }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }

  /* Compact overlay dropdown that floats ON TOP without pushing content down */
  .main-nav {
    order: 3;
    margin-left: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    display: none;
    background: rgba(var(--paper-rgb), 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
    padding: 10px 5% 18px;
    margin: 0;
    z-index: 1000;
  }
  @media (prefers-color-scheme: dark) {
    .main-nav {
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    }
  }
  .main-nav.is-open {
    display: block;
    animation: navDropdown 0.2s ease-out;
  }
  @keyframes navDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .nav-links a {
    font-size: 15px;
    color: var(--ink);
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s, padding-left 0.2s;
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
  .nav-links a:hover {
    color: var(--accent);
    padding-left: 4px;
  }
  .nav-links a[aria-current="page"] {
    color: var(--accent);
    font-weight: 600;
  }
  .nav-links a[aria-current="page"]:after {
    content: '●';
    font-size: 8px;
    color: var(--accent);
  }

  .nav-contact {
    display: none;
  }

  section { padding: 45px 5%; }
  .credentials-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 24px 5%; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .testimonial-grid { grid-template-columns: 1fr; gap: 18px; }
  .portfolio-head { display: block; padding-top: 35px; padding-bottom: 25px; }
  .portfolio-head > p { margin-top: 18px; max-width: 420px; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 35px; }
  .project-image img { height: auto; aspect-ratio: 1.4; }
  .gallery { columns: 1; }
  .project-pagination { grid-template-columns: 1fr; gap: 12px; }
  .pagination-card.next { text-align: left; align-items: flex-start; }
  .pagination-all { justify-self: start; }
  .grid, .services { grid-template-columns: 1fr; }
  .hero { min-height: 520px; }
  .hero h1 { font-size: clamp(34px, 8vw, 48px); }
  .links { flex-direction: column; gap: 14px; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .custom-inquiry { padding: 25px 20px; }
  .inquiry-row { grid-template-columns: 1fr; gap: 0; }
  footer { flex-direction: column; align-items: start; gap: 36px; padding: 45px 5% max(45px, env(safe-area-inset-bottom)); }
  footer h2 { font-size: 34px; }
}

@media (max-width: 550px) {
  .hero { min-height: 480px; }
  .credentials-bar { grid-template-columns: 1fr; gap: 16px; }
  .process-grid { grid-template-columns: 1fr; }
  .gallery-tools { flex-wrap: wrap; gap: 14px; }
  .gallery-tools .search-label { flex: 1 1 100%; }
  .gallery-tools label { flex: 1; min-width: 0; }
  .lightbox { padding: 14px 10px; gap: 8px; height: 100dvh; }
  .lightbox-top h2 { font-size: 18px; }
  .lightbox-top-actions { gap: 6px; }
  .lightbox-counter-pill { font-size: 11px; padding: 6px 10px; }
  .lightbox .lightbox-zoom { display: none; }
  .lightbox-stage { grid-template-columns: 1fr; position: relative; gap: 0; }
  .lightbox-prev, .lightbox-next { position: absolute; z-index: 2; bottom: 10px; background: rgba(18, 19, 20, 0.85) !important; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-bottom { padding: 0 4px; }
  .lightbox-hint-desktop { display: none; }
  .lightbox-hint-mobile { display: inline; }
  .lightbox-thumbs button { flex-basis: 60px; width: 60px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
