/* CSS VARIABLES — mapped from client-config.colors */
:root {
  --primary-color:    #1a2b4c;
  --primary-dark:     #0f1a30;
  --accent-color:     #f2a900;
  --accent-dark:      #c98a00;
  --secondary-color:  #f5f5f5;
  --text-color:       #1a1a1a;
  --background-color: #faf7f1;
  --navy-wash:        rgba(26, 43, 76, 0.05);
  --navy-line:        rgba(26, 43, 76, 0.12);
  --teal-color:       #2f6f68;
  --teal-dark:        #234f4a;
  --teal-light:       #eaf5f3;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background: var(--background-color);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--primary-color);
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* SCROLL REVEAL — one fade-and-rise treatment per section as it enters view */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* HEADER */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--background-color);
  border-bottom: 3px solid var(--accent-color);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; flex-wrap: nowrap; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; min-width: 0; }
.logo-img { display: block; width: 56px; height: 56px; max-width: 150px; object-fit: contain; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--primary-color); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw;
}

.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.header-call {
  display: none;
  align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--primary-color); text-decoration: none; white-space: nowrap;
}
.header-call:hover { color: var(--accent-dark); }
.header-call-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-color);
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .header-call { display: inline-flex; }
  .logo-img { width: 72px; height: 72px; }
  .logo-text { font-size: 1.35rem; max-width: 32vw; }
}

/* HAMBURGER */
.hamburger-toggle {
  width: 32px; height: 24px; background: none; border: none;
  position: relative; cursor: pointer; z-index: 1001; flex-shrink: 0;
}
.hamburger-line {
  display: block; width: 100%; height: 3px;
  background: var(--primary-color); position: absolute; left: 0;
  border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-line:nth-child(3) { bottom: 0; }
.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

/* FULLSCREEN MENU */
.fullscreen-menu {
  position: fixed; inset: 0; z-index: 1001; background: var(--primary-color);
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  overflow-y: auto; padding: 4.5rem 1.5rem 2.5rem;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
@supports (height: 100dvh) {
  .fullscreen-menu { height: 100dvh; }
}
.fullscreen-menu.is-open { opacity: 1; visibility: visible; }
.menu-close {
  position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem;
  background: none; border: none; color: var(--background-color); cursor: pointer; line-height: 1;
}
/* Menu logo: was rendering small/unclear against the dark navy panel.
   Bumped size, added a light padded plate behind it (like a card) so any
   logo — light, dark, or transparent-background — stays visible instead
   of blending into --primary-color. */
.menu-logo {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--background-color);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-logo img { display: block; width: 170px; height: 170px; max-width: 68vw; object-fit: contain; }
.menu-top-level { list-style: none; text-align: center; width: 100%; max-width: 380px; margin: 0 auto; }
.menu-item { margin: 0.75rem 0; }
.menu-item-toggle, .menu-item-link {
  display: block; width: 100%; text-align: center; color: var(--background-color);
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; padding: 0.75rem 1rem;
  background: none; border: none; cursor: pointer; text-decoration: none; min-height: 44px;
}
.menu-item-toggle:hover, .menu-item-link:hover { color: var(--accent-color); }
.menu-sub-panel { list-style: none; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.menu-sub-panel.is-open { max-height: 500px; }
.menu-sub-panel a {
  display: block; text-align: center; color: rgba(255,255,255,0.85); padding: 0.5rem 1rem;
  text-decoration: none; min-height: 44px; font-size: 1.1rem; font-family: var(--font-body);
}
.menu-sub-panel a:hover { color: var(--accent-color); }
body.menu-open { overflow: hidden; }

/* HERO — split layout: copy on the left, photo bleeding to the edge on the right */
.hero {
  padding: 7.5rem 0 0;
  background: var(--background-color);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}
.hero-inner {
  padding: 2.5rem 1.5rem 3.5rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  max-width: 640px;
  animation: hero-rise 0.7s ease-out both;
}
.hero-eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--accent-dark);
}
.hero h1 { font-size: 2.5rem; line-height: 1.12; letter-spacing: -0.01em; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-color); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.25rem; }
.hero-note {
  font-size: 0.9rem; color: var(--primary-color); opacity: 0.75;
  padding-top: 0.5rem; border-top: 1px solid var(--navy-line); max-width: 46ch;
}
.hero-media {
  position: relative;
  min-height: 260px;
  background-size: cover; background-position: center;
  clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 94%);
  animation: hero-zoom 20s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,43,76,0.15), rgba(15,26,48,0.55));
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    padding-top: 7rem;
  }
  .hero-inner {
    padding: 5rem 3rem 5rem 4rem;
    justify-content: center;
    max-width: none;
  }
  .hero h1 { font-size: 3.25rem; }
  .hero-media { min-height: 100%; clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%); }
}

/* BUTTONS */
.btn {
  display: inline-block; padding: 0.85rem 2rem; font-size: 1rem; font-weight: 700;
  font-family: var(--font-display);
  border: 2px solid transparent; border-radius: 4px; cursor: pointer; text-decoration: none; text-align: center;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent-color); color: var(--primary-color); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: var(--background-color); }
.btn-primary { background: var(--primary-color); color: var(--background-color); }

/* SECTION HEADINGS */
.section-heading { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading h2 { font-size: 2rem; margin-bottom: 0.6rem; }
.section-heading p { color: var(--text-color); opacity: 0.85; }

/* SERVICES */
.services { padding: 5rem 1.5rem; }
.services-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.75rem; max-width: 1080px; margin: 0 auto;
}
.service-card {
  position: relative;
  flex: 1 1 260px; max-width: 320px;
  aspect-ratio: 3 / 4;
  background: var(--primary-color);
  border: none; border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0; width: 100%;
  -webkit-appearance: none; appearance: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover, .service-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(26,43,76,0.28);
}
.service-card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.service-card:hover .service-card-img, .service-card:focus-visible .service-card-img { transform: scale(1.07); }

/* Overlay: was a solid navy band covering ~half the card, hiding most of
   the photo behind the text at rest. Now resting state is a short, tight
   scrim hugging just the text baseline so the photo reads clearly above
   it, and on hover/focus the scrim recedes further (fades toward
   transparent) while the text gets a stronger individual text-shadow so
   it stays legible even with less backing behind it. */
.service-card-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem 1.25rem 1.4rem; text-align: left;
  background: linear-gradient(180deg, rgba(15,26,48,0) 55%, rgba(15,26,48,0.88) 78%, rgba(15,26,48,0.92) 100%);
  transition: background 0.3s ease;
}
.service-card:hover .service-card-overlay,
.service-card:focus-visible .service-card-overlay {
  background: linear-gradient(180deg, rgba(15,26,48,0) 68%, rgba(15,26,48,0.55) 85%, rgba(15,26,48,0.62) 100%);
}
.service-card-overlay h3 {
  color: #fff; font-size: 1.15rem; margin-bottom: 0.45rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 1px 12px rgba(0,0,0,0.5);
}
.service-card-overlay p {
  color: rgba(255,255,255,0.95); font-size: 0.92rem; line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 1px 12px rgba(0,0,0,0.5);
}
.service-card-cta {
  display: inline-block; margin-top: 0.85rem; font-family: var(--font-display);
  font-weight: 700; font-size: 0.9rem; color: var(--accent-color);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 1px 12px rgba(0,0,0,0.5);
}

/* SERVICE AREA — local photo + pills alongside the map */
.service-area { padding: 5rem 1.5rem; background: var(--teal-light); }
.service-area-layout {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
.service-area-copy p:not(.service-area-photo-caption) { color: var(--text-color); opacity: 0.9; margin-bottom: 1.5rem; max-width: 52ch; }
.service-area-photo {
  position: relative; border-radius: 8px; overflow: hidden;
  min-height: 220px; max-height: 340px;
  background-size: cover; background-position: center;
}
@media (max-width: 899px) {
  .service-area-photo { aspect-ratio: 4 / 3; max-height: 320px; }
}
.service-area-photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 1.25rem;
  background: var(--primary-dark);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.service-area-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0; margin: 1.5rem 0; }
.service-area-list li {
  background: var(--background-color); border: 2px solid #d5d9e0; padding: 0.5rem 1.25rem;
  border-radius: 24px; font-weight: 600; color: var(--primary-color); cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.service-area-list li:hover { border-color: var(--teal-color); transform: translateY(-2px); }
.service-area-list li.active { background: var(--accent-color); border-color: var(--accent-color); color: var(--primary-color); }

.service-map {
  border: 3px solid var(--teal-color); border-radius: 10px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.service-map-frame { display: block; width: 100%; height: 340px; border: 0; }

@media (min-width: 900px) {
  .service-area-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .service-area-photo { min-height: 100%; max-height: none; }
}

/* EMERGENCY */
.emergency { padding: 4rem 1.5rem; text-align: center; background: var(--accent-color); color: var(--primary-color); }
.emergency h2 { color: var(--primary-color); font-size: 2rem; margin-bottom: 0.75rem; }
.emergency p { margin-bottom: 1.75rem; opacity: 0.9; }
.emergency-phone {
  background: var(--primary-color); color: var(--background-color); font-size: 1.5rem;
  display: inline-flex; align-items: center; gap: 0.65rem;
}
.emergency-phone:hover { background: var(--primary-dark); }
.emergency-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #ff5a4e;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* CONTACT — now just a short CTA; the form itself lives in the popup modal */
.contact {
  padding: 3.5rem 2rem; max-width: 640px; margin: 3rem auto; text-align: center;
  background: var(--teal-light); border-radius: 16px;
  box-shadow: 0 20px 45px rgba(26, 43, 76, 0.08);
}
.contact-cta { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem;
  list-style: none; padding-bottom: 1.75rem; margin: 0;
  border-bottom: 1px solid rgba(47, 111, 104, 0.25);
  font-size: 0.9rem; color: var(--primary-color); font-weight: 600; text-align: center;
  width: 100%;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--primary-color); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem; border: 2px solid #ddd; border-radius: 6px;
  font-size: 1rem; font-family: inherit; transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(242,169,0,0.25);
}

/* REQUEST SERVICE POPUP */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(15, 26, 48, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-dialog {
  background: var(--background-color); border-radius: 10px;
  max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 2.25rem 1.75rem 1.75rem; position: relative; text-align: left;
  box-shadow: 0 25px 60px rgba(15, 26, 48, 0.35);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.3s ease;
}
.modal-overlay.is-open .modal-dialog { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 0.6rem; right: 0.85rem; font-size: 1.85rem; line-height: 1;
  background: none; border: none; color: var(--primary-color); cursor: pointer; padding: 0.5rem;
}
.modal-subtitle { color: var(--text-color); opacity: 0.85; margin: 0.35rem 0 1.5rem; }
body.modal-open { overflow: hidden; }

/* FOOTER */
.site-footer { padding: 2rem 1.5rem; background: var(--primary-color); color: var(--background-color); text-align: center; border-top: 4px solid var(--accent-color); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 2rem; font-size: 0.9rem; opacity: 0.9; }

@media (max-width: 520px) {
  .service-map-frame { height: 300px; }
}
