:root {
  --bg: #f6f8fb;
  --bg-elevated: #eef1f6;
  --bg-card: #ffffff;
  --border: rgba(15,23,42,0.08);
  --border-strong: rgba(15,23,42,0.16);
  --text: #101a2b;
  --text-dim: #4c5a70;
  --text-faint: #8993a4;
  --accent: #1e4a7a;
  --accent-strong: #163a61;
  --accent-bright: #2f6fb0;
  --accent-soft: rgba(30,74,122,0.08);
  --accent-soft-strong: rgba(30,74,122,0.14);
  --accent-glow: rgba(30,74,122,0.22);
  --warn: #b5680b;
  --success: #12805c;
  --error: #c02b3c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,26,43,0.04), 0 1px 1px rgba(16,26,43,0.03);
  --shadow-md: 0 10px 30px -12px rgba(16,26,43,0.16);
  --shadow-lg: 0 20px 50px -18px rgba(16,26,43,0.22);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { color: var(--text-dim); margin: 0; }

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

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(246, 248, 251, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(246, 248, 251, 0.92);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo span { color: var(--accent); }

.logo-mark {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 1px 3px rgba(16,26,43,0.18));
}

.footer-inner .logo-mark { height: 30px; }

.logo-llc {
  align-self: flex-start;
  margin-top: 0.2rem;
  margin-left: -0.3rem;
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.logo-full img { display: block; width: 160px; height: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.nav a:hover { color: var(--text); }

.nav-cta {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 600;
}

.nav-cta:hover { background: var(--accent-strong); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  padding-top: clamp(120px, 20vh, 168px);
  padding-bottom: 4rem;
}

/* Closing video at the bottom of the page: full-bleed like the top hero, video only (no text, no scrim). */
.hero--closing { padding: 0; background: #000; }

/* The clip is a scene panel on pure black with the drone breaking out of it: show it whole (contain),
   never cropped; the black section background continues the clip's own black around it. */
.hero--closing .hero-media img,
.hero--closing .showcase-video { object-fit: contain; }

@media (orientation: portrait) {
  /* A full-screen crop of this landscape clip would leave only a narrow slice on phones: show the whole frame. */
  .hero--closing { min-height: 0; aspect-ratio: 16 / 9; }
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video,
.showcase-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  /* Outgoing clip stays opaque under the incoming one, then drops once the fade-in is done. */
  transition: opacity 0s linear 1s;
  pointer-events: none;
}

.hero-video.is-playing,
.showcase-video.is-playing {
  opacity: 1;
  z-index: 1;
  transition: opacity 1s var(--ease);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(105deg, rgba(6,10,20,0.82) 0%, rgba(6,10,20,0.62) 32%, rgba(6,10,20,0.28) 58%, rgba(6,10,20,0.08) 78%),
    linear-gradient(0deg, rgba(6,10,20,0.55), transparent 40%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255,255,255,0.6);
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero h1 span { color: var(--accent-bright); }

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 560px;
  margin-bottom: 2.25rem;
  color: rgba(255,255,255,0.86);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

@media (min-width: 760px) {
  .hero-actions { flex-wrap: nowrap; width: max-content; max-width: calc(100vw - 3rem); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px var(--accent-glow);
}

.hero .btn-ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.hero .btn-ghost:hover {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(255,255,255,0.16);
}

.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block { width: 100%; }

.btn-estimate {
  gap: 0.55rem;
  background: #ffffff;
  color: var(--accent-strong);
  border-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-estimate:hover {
  background: #ffffff;
  border-color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px var(--accent-glow);
}

.btn-estimate:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

.btn-icon { width: 1.15em; height: 1.15em; flex: none; }

.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.cta-band .btn-estimate { border-color: var(--accent); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 1.5rem;
  column-gap: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.22);
}

.stat { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.stat strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #ffffff;
  line-height: 1.15;
}

.stat span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.25;
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  background: rgba(255,255,255,0.08);
}

.scroll-cue span {
  width: 4px; height: 8px;
  border-radius: 2px;
  background: #ffffff;
  animation: scrollDown 1.8s infinite var(--ease);
}

@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Section shells ---------- */

section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

section h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--text);
  max-width: 640px;
  margin-bottom: 1rem;
}

section > .container > p:not(.section-eyebrow) {
  max-width: 560px;
  margin-bottom: 2.5rem;
}

/* ---------- Why grid ---------- */

.why { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.why-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.why-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.why-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--text); }
.why-card p { font-size: 0.92rem; }

/* ---------- Tech (scroll-driven) ---------- */

.tech { padding-top: 0; padding-bottom: 0; position: relative; }

.tech::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/drone-blueprint.jpg') center / cover no-repeat;
  opacity: 0.08;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  pointer-events: none;
  z-index: 0;
}

.tech-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.tech-sticky {
  position: sticky;
  top: 96px;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.tech-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.tech-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.tech-img.is-active { opacity: 1; }

.tech-steps {
  display: flex;
  flex-direction: column;
}

.tech-step {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 3rem) 0;
}

.tech-step p:not(.section-eyebrow) { max-width: 460px; }

@media (max-width: 900px) {
  .tech-inner { grid-template-columns: 1fr; }
  .tech-sticky { position: static; padding: 3rem 0 0; }
  .tech-step { min-height: 0; padding: 2rem 0; }
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.service-card:hover {
  border-color: var(--accent-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.service-card h3 { font-size: 1.15rem; color: var(--text); }
.service-card p { font-size: 0.92rem; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.gallery-item--wide img { object-position: center 25%; }

.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}

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

.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.75rem 1rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(6,10,20,0.75), transparent);
}

/* ---------- Areas ---------- */

.areas { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.areas-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; }

.checklist li {
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.areas-list { display: flex; flex-direction: column; gap: 1rem; }

.area-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.area-card h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 0.4rem; }
.area-card p { font-size: 0.88rem; }

/* ---------- FAQ ---------- */

.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 760px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.3rem;
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p { padding-bottom: 1.1rem; font-size: 0.92rem; }

/* ---------- Before Project Start (permits) ---------- */

.permit-locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.permit-location {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1.25rem 3.5rem 1.25rem 1.35rem;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.permit-location:hover { border-color: var(--accent-bright); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.permit-location:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.permit-location.is-active { border-color: var(--accent); background: var(--accent-soft); }

.permit-location-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.permit-location-meta { font-size: 0.85rem; color: var(--text-dim); }

.permit-location-icon {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  width: 36px;
  height: 36px;
  padding: 7px;
  margin-top: -18px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.permit-location:hover .permit-location-icon,
.permit-location.is-active .permit-location-icon { background: var(--accent); color: #ffffff; }

.permit-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.permit-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.permit-table th,
.permit-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.permit-table tbody tr:last-child > * { border-bottom: 0; }
.permit-table thead th { background: var(--bg-elevated); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.permit-table tbody th { width: 22%; font-weight: 600; color: var(--text); }
.permit-table td { color: var(--text-dim); }
.permit-table td strong { color: var(--text); }

.permit-col-link {
  padding: 0;
  font: inherit;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  background: none;
  border: 0;
  border-bottom: 1.5px dashed currentColor;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.permit-col-link:hover { color: var(--accent-bright); }
.permit-col-link:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 2px; }

.permit-tag {
  display: inline-block;
  margin: 0 0.35rem 0.25rem 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-elevated);
}

.permit-tag--req { color: #ffffff; background: var(--accent); }

.permit-downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}

.permit-downloads .btn { gap: 0.55rem; }
.permit-downloads-each { font-size: 0.9rem; }
.permit-downloads-each a { color: var(--accent); font-weight: 600; border-bottom: 1px solid var(--accent-soft-strong); }
.permit-downloads-each a:hover { border-bottom-color: var(--accent); }

.permit-note { margin-top: 1.25rem; font-size: 0.82rem; color: var(--text-faint); max-width: 720px; }

/* Balloon window: a card with a pointer, opened next to whichever link was clicked (positioned in main.js).
   Without Popover API support the lists simply show inline below the table. */
.permit-pop {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem 1.1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.permit-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.permit-pop-head h3 { font-size: 1.2rem; }

.permit-pop-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.permit-pop-close:hover { color: var(--accent); border-color: var(--accent); }
.permit-pop-close:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

.permit-pop-list {
  counter-reset: permit;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.permit-pop-list li { counter-increment: permit; position: relative; padding-left: 2.1rem; }

.permit-pop-list li::before {
  content: counter(permit);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.45rem;
  height: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft-strong);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.permit-pop-list strong { display: block; font-size: 0.93rem; color: var(--text); }
.permit-pop-list span { display: block; font-size: 0.85rem; line-height: 1.5; color: var(--text-dim); }

.permit-pop-download {
  align-self: flex-start;
  margin-top: 1rem;
  padding-top: 0.85rem;
  width: 100%;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.permit-pop-download:hover { color: var(--accent-bright); }

@supports selector(:popover-open) {
  .permit-pop {
    position: fixed;
    inset: auto;
    margin: 0;
    width: min(500px, calc(100vw - 32px));
    max-height: var(--pop-max, calc(100vh - 32px));
    overflow: visible;
    box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft);
    transform-origin: var(--arrow-x, 50%) top;
    opacity: 0;
    transform: translateY(8px) scale(0.94);
    transition: opacity 0.18s var(--ease), transform 0.28s var(--ease), overlay 0.28s allow-discrete, display 0.28s allow-discrete;
  }

  .permit-pop:not(:popover-open) { display: none; }

  .permit-pop:popover-open { opacity: 1; transform: none; }

  @starting-style {
    .permit-pop:popover-open { opacity: 0; transform: translateY(8px) scale(0.94); }
  }

  .permit-pop.is-above { transform-origin: var(--arrow-x, 50%) bottom; }

  /* The pointer: a rotated square sharing the card's border, aimed at the clicked link. */
  .permit-pop::before {
    content: '';
    position: absolute;
    top: -8px;
    left: calc(var(--arrow-x, 50%) - 8px);
    width: 16px;
    height: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-strong);
    border-left: 1px solid var(--border-strong);
    transform: rotate(45deg);
  }

  .permit-pop.is-above::before {
    top: auto;
    bottom: -8px;
    border: 0;
    border-right: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
  }

  .permit-pop::backdrop { background: transparent; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--bg);
  border-top: 1px solid var(--border);
}

.cta-band h2 { margin: 0 auto 0.75rem; }
.cta-band p { margin: 0 auto 2rem; }

/* ---------- Contact ---------- */

.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
}

.contact-info { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 1rem; }

.contact-info li { display: flex; flex-direction: column; gap: 0.15rem; }

.contact-info strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }

.contact-info a { color: var(--accent); font-weight: 600; }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow-md);
}

.form-row { display: flex; flex-direction: column; gap: 0.4rem; }

.form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-row--split > div { display: flex; flex-direction: column; gap: 0.4rem; }

label { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }

input, textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft-strong);
}

textarea { resize: vertical; min-height: 100px; }

.form-row--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.88rem;
  margin: 0;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }
.form-status.loading { color: var(--text-faint); }

/* ---------- Instant estimate ---------- */

.estimate { background: var(--bg-elevated); }

.estimate-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.estimate-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow-md);
}

.estimate-address { position: relative; }

.estimate-form [hidden] { display: none !important; }

.estimate-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0.25rem 0 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.estimate-suggestions li {
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  font-size: 0.92rem;
  cursor: pointer;
}

.estimate-suggestions li:hover,
.estimate-suggestions li[aria-selected="true"] { background: var(--accent-soft-strong); }

.estimate-scope { border: 0; padding: 0; margin: 0; flex-direction: row; flex-wrap: wrap; gap: 0.6rem; }

.estimate-scope legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  width: 100%;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft-strong); }
.choice input { accent-color: var(--accent); }
.choice:focus-within { box-shadow: 0 0 0 3px var(--accent-soft-strong); }

.optional { font-weight: 400; color: var(--text-faint); }

.estimate-result {
  min-height: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.2s var(--ease);
}

.estimate-result.has-result { border-style: solid; border-color: var(--accent); box-shadow: var(--shadow-lg); }
.estimate-result.is-loading { opacity: 0.55; }

.estimate-empty { margin: auto 0; color: var(--text-dim); }
.estimate-empty-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--text); margin-bottom: 0.4rem; }

.estimate-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.estimate-range {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}

.estimate-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}

.estimate-details dt { color: var(--text-faint); }
.estimate-details dd { margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

.estimate-note { font-size: 0.82rem; color: var(--text-dim); margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
  background: var(--bg-elevated);
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/drone-blueprint.jpg') center bottom / cover no-repeat;
  opacity: 0.14;
  mask-image: linear-gradient(to bottom, transparent, black 45%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 45%);
  pointer-events: none;
  z-index: 0;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-inner p { font-size: 0.88rem; margin-top: 0.75rem; max-width: 320px; }

.footer-inner h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.footer-inner > div { display: flex; flex-direction: column; }
.footer-inner a { color: var(--text-dim); font-size: 0.92rem; padding: 0.3rem 0; transition: color 0.2s var(--ease); }
.footer-inner a:hover { color: var(--accent); }

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer-bottom p { font-size: 0.82rem; color: var(--text-faint); }

/* ---------- Social links ---------- */
/* After the footer rules on purpose: same specificity as .footer-inner a, so these win by order. */

.social-links { display: flex; gap: 0.6rem; margin-top: 1.1rem; }

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social-links a:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }

.contact-info .social-inline { display: inline-flex; align-items: center; gap: 0.45rem; }
.contact-info .social-inline svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) and (min-width: 1081px) {
  .nav { gap: 1.1rem; }
  .nav a { font-size: 0.86rem; }
}

/* Nine nav links stop fitting beside the logo below ~1080px: switch to the slide-in menu there. */
@media (max-width: 1080px) {
  .nav { position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 2rem 1.5rem; gap: 0.5rem; transform: translateX(100%); transition: transform 0.3s var(--ease); }
  .nav.open { transform: translateX(0); }
  .nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: 1rem; }
  .menu-toggle { display: flex; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 900px) {
  .why-grid, .services-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .permit-locations { grid-template-columns: 1fr; }

  /* The comparison table becomes one card per requirement, each value labelled with its location. */
  .permit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .permit-table, .permit-table tbody, .permit-table tr, .permit-table th, .permit-table td { display: block; width: auto; }
  .permit-table tbody tr { border-bottom: 1px solid var(--border); padding: 0.4rem 0; }
  .permit-table tbody tr:last-child { border-bottom: 0; }
  .permit-table tbody th { width: auto; border-bottom: 0; padding-bottom: 0.25rem; font-family: var(--font-display); font-size: 1.02rem; }
  .permit-table td { border-bottom: 0; padding-top: 0.35rem; padding-bottom: 0.35rem; }
  .permit-table td::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
  .areas-inner, .contact-inner, .estimate-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .why-grid, .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row--split { grid-template-columns: 1fr; }
  .estimate-form, .estimate-result { padding: 1.4rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { column-gap: 1rem; }
  .stat strong { font-size: 1.05rem; }
  .stat span { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span { animation: none; }
  .hero-video, .showcase-video { display: none; }
  * { transition-duration: 0.01ms !important; }
}
