:root {
  --charcoal: #0d1522;
  --charcoal-2: #131e30;
  --off-white: #e8f1fb;
  --steel-light: #8ba6c4;
  --steel: #6b89ab;
  --accent: #38bdf8;
  --accent-dark: #0ea5e9;
  --on-accent: #111111;
  --border: #22334d;
  --header-bg: rgba(13, 21, 34, 0.95);
  --hero-line: rgba(255, 255, 255, 0.032);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --hero-glow: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.13), transparent 45%);
  --contact-glow: radial-gradient(circle at 12% 88%, rgba(56, 189, 248, 0.09), transparent 45%);
  --hero-texture: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px), linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  --alt-texture: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px), linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  --alt-texture-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  --radius-card: 2px;
  --radius-ctl: 2px;
  /* logo wall — same family as the alt sections, one step lighter */
  --clients-bg: #1c2c46;
  /* dark-ink client logos need a pale tile to sit on; light mode doesn't */
  --logo-tile: #e1e9f2;
  --logo-tile-bdr: rgba(255, 255, 255, 0.14);
  --logo-tile-radius: 10px;
  --font-head: 'Oswald', sans-serif;
  --font-body: 'Oswald', sans-serif;
}

html[data-theme="light"] {
  --charcoal: #f2f6fb;
  --charcoal-2: #e6eef7;
  --off-white: #0d1522;
  --steel-light: #4a6484;
  --steel: #556b85;
  --accent: #0369a1;
  --accent-dark: #025784;
  --on-accent: #ffffff;
  --border: #cfdcea;
  --header-bg: rgba(242, 246, 251, 0.92);
  --hero-line: rgba(0, 0, 0, 0.038);
  --badge-bg: rgba(0, 0, 0, 0.045);
  --hero-glow: radial-gradient(circle at 80% 20%, rgba(3, 105, 161, 0.09), transparent 45%);
  --contact-glow: radial-gradient(circle at 12% 88%, rgba(3, 105, 161, 0.06), transparent 45%);
  --hero-texture: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px), linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  --alt-texture: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px), linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  --alt-texture-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  --radius-card: 2px;
  --radius-ctl: 2px;
  --clients-bg: #f1f6fb;
  --logo-tile: transparent;
  --logo-tile-bdr: transparent;
  --logo-tile-radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*, *::before, *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

html { scroll-behavior: smooth; }

/* stop anchor targets hiding behind the fixed header */
section[id] { scroll-margin-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--off-white);
  background: var(--charcoal);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; }

/* visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 20px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

p { color: var(--steel-light); }

a { color: var(--accent); text-decoration: none; }

.eyebrow {
  color: var(--accent);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header .container {
  max-width: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 54px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  color: var(--off-white);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--accent); }

.nav-cta { display: inline-block; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--off-white);
  font-size: 1.6rem;
  cursor: pointer;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--off-white);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-ctl);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
}
.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline {
  border-color: var(--steel);
  color: var(--off-white);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  padding: 180px 0 100px;
  background:
    var(--hero-glow),
    var(--hero-texture),
    var(--charcoal);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.hero-inner { max-width: 720px; }
.hero-sub {
  font-size: 1.1rem;
  margin: 20px 0 32px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.badge {
  display: inline-block;
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--off-white);
  letter-spacing: 0.02em;
}
.credential-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--steel-light);
  font-size: 0.78rem;
}

/* Clients */
.clients-section {
  position: relative;
  overflow: hidden;
  padding: 48px 0;
  background: var(--clients-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.clients-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--alt-texture);
  background-size: var(--alt-texture-size);
  pointer-events: none;
}
.clients-section .container { position: relative; z-index: 1; }
.clients-label {
  text-align: center;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 24px;
}
.clients-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.client-logo {
  height: 64px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--logo-tile);
  border: 1px solid var(--logo-tile-bdr);
  border-radius: var(--logo-tile-radius);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.client-logo img {
  max-width: 140px;
  max-height: 100%;
  object-fit: contain;
}

/* Sections */
.section { padding: 90px 0; }
.section-alt {
  position: relative;
  overflow: hidden;
  background: var(--charcoal-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--alt-texture);
  background-size: var(--alt-texture-size);
  pointer-events: none;
}
.section-alt .container { position: relative; z-index: 1; }

.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--contact-glow);
}

/* About */
.about-grid {
  max-width: 760px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}
.service-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.service-icon {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 20px;
}
.why-item {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}

/* Gallery */
.gallery-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}
.gallery-pages {
  flex: 1;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.gallery-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--charcoal-2);
  color: var(--off-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.gallery-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.gallery-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.gallery-arrow:disabled:hover {
  border-color: var(--border);
  color: var(--off-white);
}
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.gallery-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
}
.gallery-dots .dot.active {
  background: var(--accent);
}

.gallery-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.gallery-photo:hover img {
  transform: scale(1.06);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1000;
}
.lightbox[hidden] { display: none; }
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(244, 244, 242, 0.75);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0;
  pointer-events: none;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(35, 35, 35, 0.85);
  color: #f4f4f2;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(35, 35, 35, 0.8);
  color: #f4f4f2;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.lightbox-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-nav-prev { left: 16px; }
.lightbox-nav-next { right: 16px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-detail { margin-top: 20px; color: var(--off-white); }
.contact-detail a { font-weight: 600; }
.contact-note { font-size: 0.85rem; margin-top: 6px; color: var(--steel); }

.quote-form {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quote-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--off-white);
  font-weight: 500;
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
  padding: 12px;
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-note {
  font-size: 0.8rem;
  color: var(--steel);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--steel);
}
.footer-logo {
  height: 22px;
  width: auto;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ============================= RESPONSIVE =============================
   Breakpoints: 1024 large tablet · 820 tablet · 680 phone · 420 small phone
   ===================================================================== */

/* --- Large tablet / small laptop --- */
@media (max-width: 1024px) {
  .main-nav { gap: 22px; }
  .main-nav a { font-size: 0.9rem; }
  .clients-grid { gap: 14px; }
  .hero { padding: 160px 0 80px; }
}

/* --- Tablet --- */
@media (max-width: 820px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .gallery-page { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  section[id] { scroll-margin-top: 76px; }
  /* nav gets tight before the phone breakpoint — hide the CTA, keep the links */
  .nav-cta { display: none; }
  .clients-grid { gap: 12px; }
  .client-logo { height: 56px; padding: 8px 13px; }
  .client-logo img { max-width: 118px; }
}

/* --- Phone --- */
@media (max-width: 680px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;          /* sits flush under the header at any header height */
    left: 0;
    right: 0;
    background: var(--charcoal-2);
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
    gap: 0;
    z-index: 99;
  }
  .main-nav.open a {
    padding: 14px 0;                       /* 44px+ touch targets */
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open a:last-child { border-bottom: none; }

  .header-inner { height: 64px; }
  section[id] { scroll-margin-top: 72px; }
  .logo-img { height: 38px; }
  .theme-toggle { width: 44px; height: 44px; }

  .hero { padding: 116px 0 56px; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }

  .btn { padding: 14px 20px; font-size: 0.85rem; }

  .clients-section { padding: 36px 0; }
  .clients-grid { gap: 10px; }
  .client-logo { height: 48px; padding: 7px 11px; }
  .client-logo img { max-width: 100px; }

  .gallery-carousel { gap: 8px; }
  .gallery-arrow { width: 44px; height: 44px; font-size: 1.3rem; }
  .gallery-dots { margin-top: 20px; }
  .gallery-dots .dot { width: 10px; height: 10px; }

  .lightbox { padding: 0; }
  .lightbox-close { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox-nav-prev { left: 6px; }
  .lightbox-nav-next { right: 6px; }
  .lightbox-counter { bottom: 12px; font-size: 0.8rem; }

  .quote-form { padding: 20px; }
  /* 16px minimum stops iOS zooming the page when a field is focused */
  .quote-form input,
  .quote-form select,
  .quote-form textarea { font-size: 16px; }

  .footer-inner { flex-wrap: wrap; text-align: center; justify-content: center; }
  .why-item { padding-left: 16px; }
}

/* --- Small phone --- */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .services-grid, .why-grid { gap: 16px; }
  .badge-row, .credential-badges { gap: 8px; }
  .badge { font-size: 0.72rem; padding: 6px 12px; }
  h1 { font-size: 1.65rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .gallery-page { gap: 12px; }
  .service-card { padding: 22px; }
  .clients-grid { gap: 8px; }
}

/* --- Touch devices: no sticky hover state after a tap --- */
@media (hover: none) {
  .gallery-photo:hover img { transform: none; }
  .gallery-arrow:hover { border-color: var(--border); color: var(--off-white); }
}

/* --- Respect a reduced-motion preference --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print --- */
@media print {
  .site-header, .gallery-arrow, .gallery-dots, .theme-toggle,
  .nav-toggle, .lightbox, .skip-link, .quote-form { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding: 18px 0; break-inside: avoid; }
  .gallery-page { display: grid !important; grid-template-columns: repeat(3, 1fr); }
  .gallery-track { transform: none !important; display: block; }
  a { color: #000; text-decoration: underline; }
}
