/* Stanley Don Epps — engineerStanleyepps.com MVP */
:root {
  --color-white: #ffffff;
  --color-royal: #0f2b6b;
  --color-royal-mid: #1a3f8f;
  --color-royal-soft: #e8eef8;
  --color-orange: #f26522;
  --color-orange-hover: #d95416;
  --color-text: #1a2744;
  --color-muted: #5c6b82;
  --color-border: #d8dee9;
  --shadow-sm: 0 4px 14px rgba(15, 43, 107, 0.08);
  --shadow-md: 0 12px 40px rgba(15, 43, 107, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --transition: 0.22s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-royal-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-orange);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(15, 43, 107, 0.1);
}

.header-inner {
  width: min(1200px, 94vw);
  margin-inline: auto;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
}

.header-inner .logo {
  justify-self: start;
}

.header-inner .nav-toggle {
  justify-self: end;
  grid-column: 3;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.logo:hover {
  color: inherit;
}

/* One slot: img + svg stacked; without this both were block-flow and SVG sat below the box */
.logo-mark {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 10px;
}

.logo-footer .logo-mark {
  width: 36px;
  height: 36px;
}

.logo-mark .site-logo-img,
.logo-mark .logo-mark-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.site-logo-img {
  z-index: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.logo-footer .site-logo-img {
  background: rgba(255, 255, 255, 0.95);
}

.site-logo-img[hidden] {
  display: none !important;
}

.logo-mark .logo-mark-svg {
  z-index: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-line1 {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-royal);
  letter-spacing: -0.02em;
}

.logo-line2 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-orange);
  letter-spacing: 0.02em;
}

.logo-footer .logo-line1 {
  color: var(--color-white);
}

.logo-footer .logo-line2 {
  color: rgba(255, 255, 255, 0.85);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-royal);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.site-nav {
  justify-self: center;
  grid-column: 2;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

.nav-list a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-royal);
  padding: 0.35rem 0;
}

.nav-list a:hover {
  color: var(--color-orange);
}

.nav-cta {
  background: var(--color-orange);
  color: var(--color-white) !important;
  padding: 0.45rem 1rem !important;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--color-orange-hover);
  color: var(--color-white) !important;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

/* Default: stacked fade slides (non–scroll-snap pages) */
.hero-slide {
  position: absolute;
  inset: 0;
  background-image: var(--slide-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.85s ease;
  overflow: hidden;
}

/* Welcome hero: horizontal scroll-snap “filmstrip” — full-bleed per viewport, native phone swipe */
.hero.hero--immersive .hero-slides.hero-media-scroller {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.hero.hero--immersive .hero-slides.hero-media-scroller::-webkit-scrollbar {
  display: none;
}

.hero.hero--immersive .hero-slides.hero-media-scroller .hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 100%;
  inset: auto;
  opacity: 1;
  z-index: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: none;
  background-image: none;
}

.hero-slide picture,
.hero-slide > img.hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: none;
  transition: none;
}

/* Immersive: cover every slide edge-to-edge; focal point tuned for tall phone screens */
.hero--immersive .hero-slide-img {
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
}

@media (max-width: 480px) {
  .hero--immersive .hero-slide-img {
    object-position: center 28%;
    /* Slight upscale so portrait phones never show letterboxing on wide shots */
    transform: scale(1.06);
    transform-origin: center center;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .hero--immersive .hero-slide-img {
    object-position: center 30%;
  }
}

@media (min-width: 769px) {
  .hero--immersive .hero-slide-img {
    object-position: center center;
    transform: none;
  }

  .hero--immersive .hero-slide.is-active .hero-slide-img {
    animation: heroKenBurns 12s ease-out forwards;
  }
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero:not(.hero--immersive) .hero-slide {
    transition: opacity 0.35s ease;
  }
  .hero-slide-img {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

.hero:not(.hero--immersive) .hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero.hero--immersive .hero-slide.is-active {
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    105deg,
    rgba(15, 43, 107, 0.92) 0%,
    rgba(15, 43, 107, 0.55) 45%,
    rgba(15, 43, 107, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-block: 4rem 5rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-orange);
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.hero .highlight {
  background: var(--color-orange);
  color: var(--color-white);
  padding: 0.08em 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 1.05rem;
  opacity: 0.95;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-orange-hover);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-royal);
  border: 2px solid var(--color-royal);
}

.btn-secondary:hover {
  background: var(--color-royal-soft);
  color: var(--color-royal);
}

.btn-inline {
  margin-top: 0.5rem;
  align-self: flex-start;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  inset-block: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(0.5rem, 3vw, 2rem);
}

.hero-arrow {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition), border-color var(--transition);
}

.hero-arrow:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.hero-dot.is-active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  transform: scale(1.15);
}

/* Sections */
.section {
  padding-block: clamp(3rem, 8vw, 5rem);
}

.alt-bg {
  background: var(--color-royal-soft);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--color-royal);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-orange);
}

.section-sub {
  margin: 0.75rem 0 0;
  color: var(--color-muted);
  font-size: 1rem;
}

/* Feature cards */
.card-grid.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 43, 107, 0.15);
}

.feature-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.feature-card-link:hover {
  color: inherit;
}

.feature-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.feature-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-card:hover .feature-card-image img {
  transform: scale(1.05);
}

.feature-card h3 {
  margin: 1.25rem 1.25rem 0.5rem;
  font-size: 1.2rem;
  color: var(--color-royal);
}

.feature-card-desc {
  margin: 0 1.25rem 1.25rem;
  flex-grow: 1;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.feature-card .btn-inline {
  margin: 0 1.25rem 1.5rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-media img {
  width: 100%;
  object-fit: cover;
  min-height: 420px;
}

.about-badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: var(--color-orange);
  color: var(--color-white);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.about-badge strong {
  display: block;
  font-size: 1rem;
}

.about-copy h2 {
  margin: 0.35rem 0 1rem;
  font-size: 2rem;
  color: var(--color-royal);
}

.about-copy .lead {
  font-size: 1.1rem;
  color: var(--color-text);
}

.text-highlight {
  background: var(--color-orange);
  color: var(--color-white);
  padding: 0.05em 0.35em;
  font-weight: 600;
}

.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.65rem;
  font-weight: 500;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--color-orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='white' d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Projects */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.project-card-reverse .project-card-image {
  order: 2;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.project-card-body {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card-body h3 {
  margin: 0 0 1rem;
  color: var(--color-royal);
  font-size: 1.35rem;
}

.project-card-body p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.98rem;
}

.project-card-body p:last-child {
  margin-bottom: 0;
}

/* Split */
.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.split-image {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
  min-height: 320px;
}

.split-copy p {
  color: var(--color-muted);
}

/* Consult */
.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.consult-card {
  background: var(--color-white);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.consult-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.consult-card h3 {
  margin: 0 0 0.65rem;
  color: var(--color-royal);
  font-size: 1.1rem;
}

.consult-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* Gallery */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.gallery-filter {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-royal);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.gallery-filter:hover,
.gallery-filter.is-active {
  border-color: var(--color-orange);
  color: var(--color-orange);
  background: rgba(242, 101, 34, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
  background: var(--color-royal-soft);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(transparent, rgba(15, 43, 107, 0.88));
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.gallery-item.hidden {
  display: none;
}

/* Testimonials */
.testimonials-sub {
  text-align: center;
  max-width: 520px;
  margin: 0.75rem auto 0;
  color: var(--color-muted);
}

.testimonials-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.testimonials-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  flex: 1;
  overflow: hidden;
}

.testimonial-card {
  background: var(--color-white);
  padding: 2.5rem 1.5rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.testimonial-card.is-active {
  border-color: var(--color-orange);
  box-shadow: var(--shadow-md);
}

.testimonial-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: -3.5rem auto 0.75rem;
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

.stars {
  color: #e6a800;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.testimonial-card p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--color-text);
  font-style: italic;
}

.testimonial-card cite {
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-muted);
  font-weight: 600;
}

.testimonial-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-royal);
  font-size: 1.35rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.testimonial-arrow:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* Contact */
.contact-strip {
  border-top: 1px solid var(--color-border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-grid h2 {
  margin: 0 0 0.75rem;
  color: var(--color-royal);
  font-size: 2rem;
}

.contact-lead {
  color: var(--color-muted);
  margin: 0 0 1.25rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.65rem;
}

.hours-card {
  background: var(--color-royal-soft);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.hours-card h3 {
  margin: 0 0 1rem;
  color: var(--color-royal);
}

.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.95rem;
}

.hours-list li:last-child {
  border-bottom: none;
}

.muted {
  color: var(--color-muted);
}

.small {
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #0a1f4d 0%, #0f2b6b 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: 3rem 0 2rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-orange);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-tagline {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
  max-width: 280px;
  line-height: 1.55;
}

.footer-heading {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-orange);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-links a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-orange);
}

.footer-contact p {
  margin: 0 0 0.5rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 43, 107, 0.85);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(920px, 95vw);
  max-height: 90vh;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--color-royal);
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--color-text);
  font-weight: 600;
}

/* Mobile nav — fix structure: toggle is before nav */
.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .card-grid.three {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-reverse {
    grid-template-columns: 1fr;
  }

  .project-card-reverse .project-card-image {
    order: 0;
  }

  .split-block {
    grid-template-columns: 1fr;
  }

  .consult-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .header-inner .logo {
    flex: 0 1 auto;
    min-width: 0;
    order: 1;
  }

  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    order: 2;
    margin-left: auto;
  }

  .site-nav {
    order: 10;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    flex: 0 0 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--color-white);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    z-index: 99;
    grid-column: unset;
    justify-self: unset;
  }

  .site-header.nav-open .site-nav {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-royal-soft);
  }

  .nav-cta {
    text-align: center;
    margin-top: 1rem;
  }

  .testimonials-track {
    display: flex;
    flex-direction: column;
  }

  .testimonial-card {
    display: none;
  }

  .testimonial-card.is-active {
    display: block;
  }

  .testimonial-avatar {
    margin-top: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .logo-line1 {
    font-size: 0.9rem;
  }

  .logo-line2 {
    font-size: 0.65rem;
  }
}
