/* =========================================
   TONY'S PLUMBING PHOTO GALLERY
   ========================================= */

:root {
  --blue: #1268a8;
  --blue-dark: #084d80;
  --blue-light: #eaf5fc;
  --navy: #102d43;
  --text: #263746;
  --muted: #6c7b87;
  --white: #ffffff;
  --border: #dfe7ec;
  --background: #f5f8fa;
  --shadow: 0 12px 35px rgba(16, 45, 67, .12);
  --radius: 14px;
}


/* =========================================
   RESET
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);

  position: sticky;
  top: 0;

  z-index: 50;
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;

  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;
}


/* =========================================
   BRAND
   ========================================= */

.brand {
  display: flex;
  align-items: center;

  gap: 13px;
}

.brand img {
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.brand-text strong {
  color: var(--navy);

  font-size: 18px;
}

.brand-text small {
  color: var(--muted);

  font-size: 12px;
}


/* =========================================
   PHONE
   ========================================= */

.phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;

  color: var(--blue);

  font-size: 20px;
  font-weight: 800;
}

.phone span {
  color: var(--muted);

  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}


/* =========================================
   HERO
   ========================================= */

.hero {
  background:
    linear-gradient(
      120deg,
      rgba(5, 55, 91, .97),
      rgba(18, 104, 168, .91)
    );

  color: white;
}

.hero-inner {
  width: min(1180px, calc(100% - 40px));

  margin: auto;

  padding: 82px 0 90px;
}

.eyebrow {
  margin: 0 0 10px;

  color: var(--blue);

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9dd8ff;
}

.hero h1 {
  max-width: 800px;

  margin: 0 0 18px;

  font-size: clamp(42px, 6vw, 72px);

  line-height: 1.02;

  letter-spacing: -2px;
}

.hero-text {
  max-width: 690px;

  margin: 0;

  color: rgba(255,255,255,.86);

  font-size: 19px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;

  gap: 13px;

  margin-top: 30px;
}


/* =========================================
   BUTTONS
   ========================================= */

.btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 0 22px;

  border-radius: 8px;

  font-size: 14px;
  font-weight: 800;

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #f6a623;

  color: #162d3d;

  box-shadow:
    0 7px 20px rgba(0,0,0,.15);
}

.btn-primary:hover {
  background: #ffb43c;
}

.btn-outline {
  border: 1px solid rgba(255,255,255,.55);

  color: white;
}

.btn-outline:hover {
  background: rgba(255,255,255,.1);
}


/* =========================================
   GALLERY SECTION
   ========================================= */

.gallery-section {
  width: min(1180px, calc(100% - 40px));

  margin: auto;

  padding: 75px 0 85px;
}

.section-heading {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;

  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;

  color: var(--navy);

  font-size: clamp(30px, 4vw, 44px);

  letter-spacing: -1px;
}

.gallery-note {
  max-width: 300px;

  margin: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.6;
}


/* =========================================
   FILTERS
   ========================================= */

.filters {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;

  margin-bottom: 30px;
}

.filter {
  border: 1px solid var(--border);

  background: white;

  padding: 10px 17px;

  border-radius: 30px;

  color: var(--text);

  cursor: pointer;

  font: inherit;

  font-size: 13px;
  font-weight: 700;

  transition:
    background .2s,
    color .2s,
    border-color .2s;
}

.filter:hover {
  border-color: var(--blue);

  color: var(--blue);
}

.filter.active {
  background: var(--blue);

  border-color: var(--blue);

  color: white;
}


/* =========================================
   GALLERY GRID
   ========================================= */

.gallery {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.gallery-card {
  min-width: 0;

  overflow: hidden;

  background: white;

  border: 1px solid var(--border);

  border-radius: var(--radius);

  box-shadow:
    0 4px 18px rgba(16,45,67,.05);

  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow);
}

.gallery-card.hidden {
  display: none;
}


/* =========================================
   PHOTO BUTTON
   ========================================= */

.photo-button {
  display: block;

  width: 100%;

  padding: 0;

  border: 0;

  background: #dfe7ec;

  cursor: pointer;

  position: relative;

  overflow: hidden;
}

.photo-button img {
  display: block;

  width: 100%;
  height: 260px;

  object-fit: cover;

  transition:
    transform .45s ease;
}

.gallery-card:hover .photo-button img {
  transform: scale(1.04);
}


/* =========================================
   CARD OVERLAY
   ========================================= */

.photo-overlay {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  background: rgba(7,45,73,.65);

  opacity: 0;

  transition:
    opacity .25s ease;
}

.photo-overlay span {
  padding: 11px 17px;

  border: 1px solid rgba(255,255,255,.7);

  border-radius: 30px;

  color: white;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 1px;

  text-transform: uppercase;
}

.photo-button:hover .photo-overlay,
.photo-button:focus-visible .photo-overlay {
  opacity: 1;
}


/* =========================================
   CAPTION
   ========================================= */

.photo-caption {
  padding: 17px 18px 19px;
}

.photo-caption span {
  color: var(--blue);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.2px;

  text-transform: uppercase;
}

.photo-caption h3 {
  margin: 7px 0 0;

  color: var(--navy);

  font-size: 17px;

  line-height: 1.3;
}


/* =========================================
   DISCLAIMER
   ========================================= */

.gallery-disclaimer {
  margin-top: 35px;

  padding: 20px 23px;

  background: var(--blue-light);

  border-left: 4px solid var(--blue);

  border-radius: 5px;
}

.gallery-disclaimer strong {
  color: var(--navy);
}

.gallery-disclaimer p {
  margin: 7px 0 0;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.6;
}


/* =========================================
   CTA
   ========================================= */

.cta {
  width: min(1180px, calc(100% - 40px));

  margin: 0 auto 70px;

  padding: 42px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 30px;

  background: var(--navy);

  color: white;

  border-radius: var(--radius);
}

.cta .eyebrow {
  color: #78c7f4;
}

.cta h2 {
  margin: 0 0 8px;

  font-size: clamp(27px, 4vw, 38px);
}

.cta p:not(.eyebrow) {
  margin: 0;

  color: rgba(255,255,255,.72);

  line-height: 1.6;
}


/* =========================================
   LIGHTBOX
   ========================================= */

.lightbox {
  position: fixed;

  inset: 0;

  z-index: 1000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 65px 80px 50px;

  background: rgba(3,18,29,.96);
}

.lightbox[hidden] {
  display: none;
}


/* =========================================
   LIGHTBOX FIGURE
   ========================================= */

.lightbox figure {
  width: min(1200px, 90vw);

  height: calc(100vh - 115px);

  margin: 0;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;
}

.lightbox img {
  display: block;

  max-width: 100%;

  max-height: calc(100vh - 180px);

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 5px;

  box-shadow:
    0 20px 60px rgba(0,0,0,.4);
}

.lightbox figcaption {
  margin-top: 14px;

  color: white;

  font-size: 15px;
  font-weight: 700;

  text-align: center;
}

.photo-counter {
  margin-top: 7px;

  color: rgba(255,255,255,.65);

  font-size: 12px;
}


/* =========================================
   LIGHTBOX CLOSE
   ========================================= */

.lightbox-close,
.lightbox-arrow {
  position: fixed;

  display: grid;

  place-items: center;

  border: 0;

  color: white;

  background: rgba(255,255,255,.12);

  cursor: pointer;

  transition:
    background .2s ease,
    transform .2s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255,255,255,.24);
}

.lightbox-close {
  top: 20px;
  right: 25px;

  width: 48px;
  height: 48px;

  border-radius: 50%;

  font-size: 30px;
}


/* =========================================
   LIGHTBOX ARROWS
   ========================================= */

.lightbox-arrow {
  top: 50%;

  width: 52px;
  height: 70px;

  border-radius: 8px;

  font-size: 28px;
}

.lightbox-arrow.previous {
  left: 18px;

  transform: translateY(-50%);
}

.lightbox-arrow.next {
  right: 18px;

  transform: translateY(-50%);
}

.lightbox-arrow[hidden] {
  display: none;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 800px) {

  .header-inner {
    min-height: 72px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .phone {
    font-size: 16px;
  }

  .hero-inner {
    padding: 60px 0 65px;
  }

  .hero-text {
    font-size: 16px;
  }

  .section-heading {
    display: block;
  }

  .gallery-note {
    margin-top: 12px;
  }

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

  .cta {
    align-items: flex-start;

    flex-direction: column;
  }

  .lightbox {
    padding: 60px 15px 35px;
  }

  .lightbox figure {
    width: 100%;
  }

  .lightbox-arrow {
    width: 42px;
    height: 52px;
  }

  .lightbox-arrow.previous {
    left: 8px;
  }

  .lightbox-arrow.next {
    right: 8px;
  }

}


@media (max-width: 540px) {

  .header-inner,
  .gallery-section,
  .cta,
  .hero-inner {
    width: min(100% - 28px, 1180px);
  }

  .phone span {
    display: none;
  }

  .phone {
    font-size: 14px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .photo-button img {
    height: 240px;
  }

  .cta {
    padding: 30px 25px;
  }

  .cta .btn {
    width: 100%;
  }

  .lightbox {
    padding-left: 8px;
    padding-right: 8px;
  }

  .lightbox img {
    max-width: 88vw;
    max-height: calc(100vh - 190px);
  }

}


/* =========================================
   ACCESSIBILITY
   ========================================= */

:focus-visible {
  outline: 3px solid #f6a623;

  outline-offset: 3px;
}