/* ==========================================================================
   Eagle Eye — Header / Navigation / Hero
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Utility bar
   -------------------------------------------------------------------------- */
.utility-bar {
  background: var(--color-deep);
  color: rgb(238 246 250 / 0.82);
  font-size: var(--text-xs);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 2.5rem;
}
.utility-bar__list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.utility-bar__list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.utility-bar a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.utility-bar a:hover {
  color: var(--color-accent);
}
.utility-bar__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  flex: none;
}
@media (max-width: 44rem) {
  .utility-bar__list--secondary {
    display: none;
  }
  .utility-bar__inner {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   2. Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--color-divider);
  transition:
    box-shadow 0.3s var(--ease-out),
    background-color 0.3s var(--ease-out);
}
.site-header[data-scrolled='true'] {
  box-shadow: var(--shadow-md);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 2vw, var(--space-6));
  min-height: 4.75rem;
}

/* Brand ------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  padding-right: var(--space-4);
  text-decoration: none;
  color: var(--color-text);
  margin-right: auto;
}
.brand__mark {
  height: 2.9rem;
  width: auto;
  flex: none;
}
/* Keep the navy logo legible on dark surfaces */
[data-theme='dark'] .brand__mark {
  background: #fff;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-md);
  height: 3.1rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand__mark {
    background: #fff;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-md);
    height: 3.1rem;
  }
}
.brand__name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-primary);
}
[data-theme='dark'] .brand__name {
  color: var(--color-text);
}
.brand__name span {
  display: block;
}
.brand__tag {
  /* decorative only — the utility bar already states the service area */
  display: none;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-accent);
}

/* Primary nav ------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.16s var(--ease-out),
    background-color 0.16s var(--ease-out);
}
.nav__link:hover {
  color: var(--color-primary);
  background: var(--color-surface-2);
}
.nav__link[aria-current='page'] {
  color: var(--color-primary);
}
.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  inset-inline: var(--space-3);
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}
.nav__item {
  position: relative;
}

/* Dropdown --------------------------------------------------------------- */
.nav__chevron {
  transition: transform 0.2s var(--ease-out);
}
.nav__item--has-menu > .nav__link[aria-expanded='true'] .nav__chevron {
  transform: rotate(180deg);
}
.nav__menu {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  translate: -50% 0;
  min-width: 22rem;
  margin: 0;
  padding: var(--space-3);
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition:
    opacity 0.18s var(--ease-out),
    transform 0.18s var(--ease-out),
    visibility 0.18s;
}
.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu,
.nav__link[aria-expanded='true'] + .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__menu a {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
}
.nav__menu a:hover {
  background: var(--color-surface-2);
}
.nav__menu strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
}
.nav__menu small {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Header actions --------------------------------------------------------- */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover {
  color: var(--color-primary);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    background-color 0.16s var(--ease-out),
    color 0.16s var(--ease-out);
}
.icon-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-primary);
}
.theme-toggle .icon-moon {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}
[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-moon {
    display: block;
  }
  :root:not([data-theme='light']) .theme-toggle .icon-sun {
    display: none;
  }
}
.nav-toggle {
  display: none;
}

/* Reclaim space on mid-size desktops — phone stays in the utility bar */
@media (max-width: 100rem) {
  .header__phone {
    display: none;
  }
}
@media (max-width: 82rem) {
  .nav__link {
    padding-inline: var(--space-2);
    font-size: 0.875rem;
  }
  .brand__mark {
    height: 2.4rem;
  }
  .brand__name {
    font-size: 0.8125rem;
  }
}

/* Mobile nav ------------------------------------------------------------- */
@media (max-width: 64rem) {
  /* backdrop-filter creates a containing block, which would trap the fixed drawer */
  .site-header {
    backdrop-filter: none;
    background: var(--color-surface);
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header__cta {
    display: none;
  }
  /* phone returns as an icon-only tap target on small screens */
  .header__phone {
    display: inline-flex;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-accent);
  }
  .header__phone span {
    display: none;
  }
  .header__actions {
    gap: var(--space-2);
  }
  .brand__mark {
    height: 2.6rem;
  }
  .brand__name {
    font-size: 0.875rem;
  }
  .brand__tag {
    display: none;
  }
  .nav {
    position: fixed;
    z-index: 70;
    inset: 0 0 0 auto;
    width: min(22rem, 88vw);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-20) var(--space-6) var(--space-8);
    background: var(--color-surface);
    border-left: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.32s var(--ease-out),
      visibility 0.32s;
  }
  .nav[data-open='true'] {
    transform: translateX(0);
    visibility: visible;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }
  .nav__link {
    justify-content: space-between;
    padding: var(--space-4) var(--space-3);
    font-size: var(--text-base);
    border-bottom: 1px solid var(--color-divider);
    border-radius: 0;
  }
  .nav__menu {
    position: static;
    translate: none;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: var(--space-2) 0 var(--space-4) var(--space-3);
    background: transparent;
    display: none;
  }
  .nav__link[aria-expanded='true'] + .nav__menu {
    display: block;
  }
  .nav__cta-mobile {
    margin-top: var(--space-6);
    display: grid;
    gap: var(--space-3);
  }
  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgb(var(--scrim) / 0.55);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s var(--ease-out),
      visibility 0.3s;
  }
  .nav-scrim[data-open='true'] {
    opacity: 1;
    visibility: visible;
  }
}
@media (min-width: 64.0625rem) {
  .nav__cta-mobile {
    display: none;
  }
  .nav-scrim {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   3. Hero
   -------------------------------------------------------------------------- */
.hero {
  /* brighter red so brand accents clear AA against the navy scrim */
  --color-accent: #ff5b5b;
  --color-accent-hover: #ff7b7d;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(38rem, 82vh, 48rem);
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
  color: #f7fbfd;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgb(14 15 52 / 0.92) 0%,
      rgb(14 15 52 / 0.74) 36%,
      rgb(14 15 52 / 0.3) 66%,
      rgb(14 15 52 / 0.45) 100%
    ),
    linear-gradient(to top, rgb(14 15 52 / 0.65), transparent 48%);
}
/* Fine water-mist texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.16) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 78% 40%, #000, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
  width: 100%;
}
@media (max-width: 68rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero__eyebrow {
  color: var(--color-accent);
}
.hero__title {
  margin-top: var(--space-5);
  font-size: var(--text-2xl);
  max-width: 22ch;
  text-shadow: 0 2px 18px rgb(5 12 20 / 0.45);
}
.hero__title em {
  font-style: normal;
  color: var(--color-accent);
}
.hero__lede {
  margin-top: var(--space-5);
  max-width: 54ch;
  font-size: var(--text-base);
  color: rgb(247 251 253 / 0.86);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-10) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(247 251 253 / 0.78);
}
.hero__proof li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero__proof svg {
  color: var(--color-accent);
  flex: none;
}

/* Quote card ------------------------------------------------------------- */
.quote-card {
  /* restore the deeper brand red inside the light card */
  --color-accent: #ef0606;
  --color-accent-hover: #c40505;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
}
.quote-card__title {
  font-size: var(--text-lg);
  font-family: var(--font-display);
}
.quote-card__note {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.quote-form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.field {
  display: grid;
  gap: var(--space-2);
}
.field label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.field input,
.field select {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition:
    border-color 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 30rem) {
  .field--row {
    grid-template-columns: 1fr;
  }
}
.quote-form__fine {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: balance;
}
.quote-form__fine a {
  white-space: nowrap;
  font-weight: 700;
}

/* Phone and menu take priority over the theme switch on small screens */
@media (max-width: 30rem) {
  .theme-toggle {
    display: none;
  }
}

/* Mobile hero refinements ------------------------------------------------- */
@media (max-width: 40rem) {
  .hero {
    min-height: 0;
    padding-block: var(--space-12) var(--space-16);
  }
  .hero__title {
    max-width: 18ch;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  .hero__proof {
    margin-top: var(--space-8);
    gap: var(--space-3) var(--space-5);
  }
}

/* Marquee trust strip ----------------------------------------------------- */
.strip {
  background: var(--color-deep-2);
  color: rgb(238 246 250 / 0.9);
  padding-block: var(--space-5);
}
.strip__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  text-align: center;
}
@media (max-width: 52rem) {
  .strip__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }
}
.strip__stat {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-accent);
}
.strip__label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(238 246 250 / 0.7);
}

/* Honeypot — hidden from people, visible to bots */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.quote-form__status {
  margin: var(--space-3) 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.5;
  text-wrap: pretty;
}
.quote-form__status.is-pending {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.quote-form__status.is-ok {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.quote-form__status.is-err {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-accent-hover);
  font-weight: 600;
}
