/* ==========================================================================
   COMPONENTS.CSS — Reusable Components for Awning Brokers
   Buttons, Cards, Forms, Nav, Footer, Gallery, Lightbox, Animations
   Mobile-first responsive design. Breakpoints: 640px, 768px, 1024px, 1280px.
   ========================================================================== */


/* ==========================================================================
   1. ANIMATIONS & SCROLL EFFECTS
   ========================================================================== */

/*
 * Fade Up Animation — SAFE PATTERN:
 * Elements are visible by default. JS adds .js-ready to <html>, which
 * activates the hidden state. This ensures content never gets stuck at
 * opacity:0 if JavaScript fails to load.
 */
.fade-up {
  /* Visible by default — safe fallback if JS fails */
}

html.js-ready .fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

html.js-ready .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for hero elements */
html.js-ready .fade-up-delay-1 { transition-delay: 0.1s; }
html.js-ready .fade-up-delay-2 { transition-delay: 0.2s; }
html.js-ready .fade-up-delay-3 { transition-delay: 0.3s; }
html.js-ready .fade-up-delay-4 { transition-delay: 0.4s; }
html.js-ready .fade-up-delay-5 { transition-delay: 0.5s; }

/* Fade In */
.fade-in {
  /* Visible by default */
}

html.js-ready .fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

html.js-ready .fade-in.visible {
  opacity: 1;
}

/* Scale In */
.scale-in {
  /* Visible by default */
}

html.js-ready .scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

html.js-ready .scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.js-ready .fade-up,
  html.js-ready .fade-in,
  html.js-ready .scale-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Body scroll lock (for mobile nav & lightbox) */
body.no-scroll {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}


/* ==========================================================================
   2. STICKY HEADER / NAV
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  transition: box-shadow 0.2s ease;
}

.site-header.header-scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo svg {
  height: 32px;
  width: auto;
}

/* Desktop Navigation */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) 0;
  position: relative;
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--stripe-blue);
  transition: width 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--stripe-blue);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

/* Nav Actions (phone + CTA) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--navy);
  transition: color 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.nav-phone:hover {
  color: var(--stripe-blue);
}

.nav-phone svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Mobile Nav Controls */
.nav-mobile-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-phone-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--navy);
  transition: color 0.2s ease;
}

.nav-phone-mobile:hover {
  color: var(--stripe-blue);
}

.nav-phone-mobile svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Hamburger Button */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.nav-hamburger:hover {
  color: var(--stripe-blue);
}

.nav-hamburger svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* Mobile Nav Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(14, 39, 71, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Nav Panel — slides from right */
.nav-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background-color: var(--white);
  z-index: 1002;
  padding: var(--space-8) var(--space-6);
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.nav-mobile.is-open {
  right: 0;
}

.nav-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  padding: 0;
  margin-bottom: var(--space-8);
  min-height: 44px;
}

.nav-close svg {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav-mobile-links a {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--navy);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--light-gray);
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-mobile-links a:hover,
.nav-mobile-links a[aria-current="page"] {
  color: var(--stripe-blue);
}

.nav-mobile-cta {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Nav Breakpoints */
@media (min-width: 640px) {
  .header-inner {
    padding: var(--space-4) var(--space-12);
  }
}

/* Tablet Nav — show full nav links, phone icon only, hide CTA */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    gap: var(--space-4);
  }

  .nav-mobile-controls {
    display: none;
  }

  .nav-links {
    gap: var(--space-2);
  }

  /* Hide CTA button at tablet to save horizontal space */
  .nav-actions .btn-primary {
    display: none;
  }

  /* Phone as icon-only at tablet */
  .nav-phone {
    font-size: 0;
    gap: 0;
    width: 44px;
    justify-content: center;
  }
}

/* Desktop Nav — full layout with CTA and phone number */
@media (min-width: 1024px) {
  .nav-desktop {
    gap: var(--space-8);
  }

  .nav-links {
    gap: var(--space-6);
  }

  /* Restore CTA button */
  .nav-actions .btn-primary {
    display: inline-flex;
  }

  /* Restore phone number text */
  .nav-phone {
    font-size: var(--text-sm);
    gap: var(--space-2);
    width: auto;
  }

  .header-inner {
    padding: var(--space-4) var(--space-16);
  }
}


/* ==========================================================================
   3. BUTTONS
   ========================================================================== */

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
  min-height: 44px;
}

.btn:focus-visible {
  outline: 2px solid var(--stripe-blue);
  outline-offset: 2px;
}

/* Primary CTA — Gold pill button */
.btn-primary {
  background-color: var(--gold);
  color: var(--navy);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--gold-hover);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-primary:hover svg {
  transform: translateX(2px);
}

/* Secondary CTA — Outlined, for use on dark backgrounds */
.btn-secondary {
  background-color: transparent;
  color: var(--white);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Secondary button dark variant — for CTA banner on dark backgrounds */
.btn-secondary-dark {
  background-color: transparent;
  color: var(--white);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 255, 255, 0.4);
  min-height: 44px;
}

.btn-secondary-dark:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary-dark svg {
  width: 18px;
  height: 18px;
}

/* Secondary button light variant — for use on light backgrounds */
.btn-secondary-light {
  background-color: transparent;
  color: var(--navy);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  border: 2px solid var(--navy);
  min-height: 44px;
}

.btn-secondary-light:hover {
  background-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary-light:active {
  transform: translateY(0);
}

/* Phone Button */
.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--navy);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  transition: var(--transition-base);
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-phone:hover {
  color: var(--stripe-blue);
  background-color: var(--sky-light);
}

.btn-phone svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Phone button light variant — for dark backgrounds */
.btn-phone-light {
  color: var(--white);
}

.btn-phone-light:hover {
  color: var(--gold);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Link-style Button (arrow link) */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  color: var(--navy);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-weight: 600;
  font-size: var(--text-base);
  padding: var(--space-2) 0;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-base);
  min-height: 44px;
}

.btn-link:hover {
  color: var(--stripe-blue);
}

.btn-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-link:hover svg {
  transform: translateX(4px);
}

/* Full width button */
.btn-full {
  width: 100%;
}

/* Small button */
.btn-sm {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-6);
  min-height: 36px;
}

/* Disabled state */
.btn[disabled],
.btn.submitting {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}


/* ==========================================================================
   4. TRUST BAR
   ========================================================================== */

.trust-bar {
  background-color: var(--off-white);
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  padding: var(--space-6) 0;
}

.trust-bar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  min-width: 0;
}

.trust-item-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: var(--stripe-blue);
  overflow: hidden;
}

.trust-item-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trust-item-text {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.4;
}

@media (min-width: 640px) {
  .trust-bar-inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .trust-bar-inner {
    display: flex;
    justify-content: space-between;
    gap: var(--space-8);
  }

  .trust-item {
    flex-direction: row;
  }
}


/* ==========================================================================
   5. SERVICE LIFECYCLE ICONS
   ========================================================================== */

.service-lifecycle {
  text-align: center;
}

.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.lifecycle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  min-width: 0;
}

.lifecycle-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: var(--stripe-blue);
  transition: var(--transition-base);
  overflow: hidden;
}

.lifecycle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lifecycle-item:hover .lifecycle-icon {
  transform: scale(1.1);
  color: var(--navy);
}

.lifecycle-label {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lifecycle-summary {
  margin-top: var(--space-8);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--medium-gray);
  letter-spacing: 0.02em;
}

@media (min-width: 640px) {
  .lifecycle-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .lifecycle-grid {
    grid-template-columns: repeat(9, 1fr);
    gap: var(--space-4);
  }

  .lifecycle-icon {
    width: 56px;
    height: 56px;
  }
}


/* ==========================================================================
   6. TESTIMONIAL CARDS
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.testimonial-card {
  position: relative;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8) var(--space-6);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--stripe-blue);
}

.testimonial-quote-mark {
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--sky-light);
  user-select: none;
  pointer-events: none;
}

.testimonial-text {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--dark-gray);
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}

.testimonial-attribution {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--medium-gray);
}

.testimonial-attribution strong {
  color: var(--navy);
  font-weight: 700;
}

@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   7. GALLERY GRID
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--stripe-blue);
  outline-offset: 2px;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-image img {
  transform: scale(1.05);
}

/* Caption overlay on hover */
.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8) var(--space-4) var(--space-4);
  background: linear-gradient(to top, rgba(14, 39, 71, 0.8) 0%, transparent 100%);
  color: var(--white);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-item-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery Placeholder (for MVP without photos) */
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  background-color: var(--light-gray);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--medium-gray);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
}

.gallery-placeholder-icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   8. CTA BANNER SECTION
   ========================================================================== */

.cta-banner {
  background-color: var(--dark-navy);
  padding: var(--space-16) 0;
}

.cta-banner .container {
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .cta-banner {
    padding: var(--space-20) 0;
  }

  .cta-banner-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
  }
}


/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--dark-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-16) 0 var(--space-8);
  overflow-wrap: break-word;
  word-break: break-word;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-grid > * {
  min-width: 0;
}

/* Footer Logo / Brand Column */
.footer-brand .site-logo-footer {
  margin-bottom: var(--space-4);
}

.footer-brand .site-logo-footer svg {
  height: 28px;
  width: auto;
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

/* Footer Column Headings */
.footer-heading {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: var(--space-4);
}

/* Footer Navigation Links */
.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav-links a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-nav-links a:hover {
  color: var(--white);
}

/* Footer Contact Info */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item:last-child {
  margin-bottom: 0;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-contact-item a:hover {
  color: var(--white);
}

.footer-contact-item svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  color: var(--stripe-blue);
}

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
}

.footer-copyright {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}

.footer-legal-links a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-legal-links a:hover {
  color: var(--white);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .site-footer {
    padding-top: var(--space-20);
  }
}


/* ==========================================================================
   10. FORM STYLES
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.form-label .optional {
  font-weight: 400;
  color: var(--medium-gray);
  font-size: var(--text-xs);
  margin-left: var(--space-1);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-base);
  color: var(--dark-gray);
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
  min-height: 44px;
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
  color: var(--medium-gray);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--stripe-blue);
  box-shadow: 0 0 0 3px rgba(130, 183, 225, 0.2);
}

/* Custom select dropdown arrow */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Error state */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-error {
  display: none;
  font-size: var(--text-sm);
  color: var(--error);
  margin-top: var(--space-2);
}

.form-group.has-error .form-error {
  display: block;
}

/* Honeypot field (hidden from users) */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Form submit area */
.form-submit {
  margin-top: var(--space-8);
}

.form-submit .btn {
  width: 100%;
}

/* Privacy note below submit */
.form-privacy {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--medium-gray);
}

/* Form success state — replaces the form */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.form-success.active {
  display: block;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  color: var(--success);
  margin: 0 auto var(--space-6);
}

.form-success h3 {
  color: var(--navy);
  margin-bottom: var(--space-4);
}

.form-success p {
  color: var(--dark-gray);
  font-size: var(--text-lg);
}

/* Form error banner */
.form-error-banner {
  display: none;
  padding: var(--space-4) var(--space-6);
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.form-error-banner.active {
  display: block;
}


/* ==========================================================================
   11. LIGHTBOX
   ========================================================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background-color: rgba(14, 39, 71, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active,
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  max-height: 85svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active .lightbox-image,
.lightbox.is-open .lightbox-image {
  opacity: 1;
  transform: scale(1);
}

.lightbox-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  padding-top: var(--space-4);
}

/* Lightbox Close Button */
.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 2001;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* Lightbox Prev/Next Arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 2001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lightbox-prev {
  left: var(--space-4);
}

.lightbox-next {
  right: var(--space-4);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 1024px) {
  .lightbox-prev {
    left: var(--space-8);
  }

  .lightbox-next {
    right: var(--space-8);
  }

  .lightbox-close {
    top: var(--space-8);
    right: var(--space-8);
  }
}


/* ==========================================================================
   12. SERVICE DETAIL CARDS (Services Page)
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  min-width: 0;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  color: var(--stripe-blue);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.service-card p {
  font-size: var(--text-base);
  color: var(--dark-gray);
  line-height: 1.7;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ==========================================================================
   13. STORM / HURRICANE SECTION
   ========================================================================== */

.storm-section {
  background-color: var(--sky-mid);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6);
  position: relative;
  overflow: hidden;
}

.storm-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: var(--radius-full);
  transform: translate(50%, -50%);
  pointer-events: none;
}

.storm-section h2 {
  color: var(--navy);
}

.storm-section p {
  color: var(--dark-gray);
  font-size: var(--text-lg);
  max-width: 720px;
}

.storm-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.storm-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.storm-step-label {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-width: 120px;
}

.storm-step-text {
  font-size: var(--text-base);
  color: var(--dark-gray);
}

@media (min-width: 640px) {
  .storm-section {
    padding: var(--space-12) var(--space-10);
  }

  .storm-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .storm-section {
    padding: var(--space-16) var(--space-12);
  }
}


/* ==========================================================================
   14. CREDENTIAL / TRUST CARDS
   ========================================================================== */

.credential-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.credential-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  min-width: 0;
}

.credential-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.credential-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background-color: var(--sky-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.credential-card-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--stripe-blue);
}

.credential-card h3 {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .credential-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .credential-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ==========================================================================
   15. PULL QUOTE
   ========================================================================== */

.pull-quote-section {
  background-color: var(--sky-light);
}

.pull-quote {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.pull-quote-mark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--stripe-blue);
  opacity: 0.3;
  display: block;
  margin-bottom: calc(-1 * var(--space-6));
  user-select: none;
}

.pull-quote blockquote {
  font-family: "Playfair Display", Georgia, serif;
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: var(--space-6);
}

.pull-quote cite {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-base);
  font-style: normal;
  font-weight: 500;
  color: var(--dark-gray);
  display: block;
}

@media (min-width: 1024px) {
  .pull-quote blockquote {
    font-size: var(--text-3xl);
  }

  .pull-quote-mark {
    font-size: 8rem;
  }
}


/* ==========================================================================
   16. PAGE HERO (Interior Pages)
   ========================================================================== */

.page-hero {
  background-color: var(--sky-light);
  text-align: center;
  padding: var(--space-16) 0;
}

.page-hero h1 {
  margin-bottom: var(--space-4);
}

.page-hero .lead {
  margin-top: var(--space-4);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .page-hero {
    padding: var(--space-20) 0;
  }
}


/* ==========================================================================
   17. WHAT HAPPENS NEXT — Contact Page Timeline
   ========================================================================== */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Connecting line between timeline dots */
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  width: 2px;
  height: calc(100% - 40px);
  background-color: var(--sky-light);
}

.timeline-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--stripe-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
}

.timeline-text {
  font-size: var(--text-base);
  color: var(--dark-gray);
  line-height: 1.6;
  padding-top: var(--space-2);
}


/* ==========================================================================
   18. MOBILE-SPECIFIC FIXES
   Addresses: sticky hover states, overscroll behavior, safe area insets,
   gallery caption visibility on touch, and iOS auto-zoom prevention.
   Reference: mobile-web-gotchas.md
   ========================================================================== */

/* ---- Safe Area Insets (notch / Dynamic Island) ---- */
@supports (padding: env(safe-area-inset-top)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .nav-mobile {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .lightbox {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}

/* ---- Overscroll Behavior (prevent page scroll behind modals) ---- */
.nav-mobile {
  overscroll-behavior: contain;
}

.lightbox {
  overscroll-behavior: contain;
}

/* ---- iOS Auto-Zoom Prevention ---- */
/* Ensure all form inputs are at least 16px to prevent Safari zoom on focus */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
select,
textarea {
  font-size: max(16px, 1rem);
}

/* ---- Sticky Hover State Prevention ---- */
/* On touch-only devices, remove transform/shadow hover effects that get "stuck" */
@media (hover: none) {
  .btn-primary:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }

  .btn-primary:hover svg {
    transform: none;
  }

  .btn-secondary:hover,
  .btn-secondary-dark:hover,
  .btn-secondary-light:hover {
    transform: none;
  }

  .btn-link:hover svg {
    transform: none;
  }

  .gallery-item:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .gallery-item:hover .gallery-item-image img {
    transform: none;
  }

  .service-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .credential-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }

  .lifecycle-item:hover .lifecycle-icon {
    transform: none;
  }

  /* Gallery captions: always visible on touch since there is no hover to reveal them */
  .gallery-item-caption {
    opacity: 1;
    transform: translateY(0);
  }
}
