:root {
  --navy: #1B2A4A;
  --navy-soft: #2A3B60;
  --charcoal: #2B2E33;
  --white: #F7F9FB;
  --white-pure: #FFFFFF;
  --teal: #2A9D8F;
  --teal-dark: #1F7A6F;
  --signal: #17E3D0;
  --signal-dark: #0FBBAC;
  --slate: #D7DEE5;
  --slate-soft: #EDF1F4;

  --text-muted: #4A4F58;   /* secondary body copy */
  --text-faint: #8B93A0;   /* placeholder / low-emphasis copy */
  --text-on-dark: #C7D0DE; /* body copy on .section-dark (navy) — always dark, doesn't flip with theme */
  --text-on-charcoal: #A8ADB5; /* body copy on the footer (charcoal) — always dark, doesn't flip with theme */

  /* Theme-responsive roles. .section-dark and the footer are deliberately
     "always dark" accent surfaces in BOTH themes (the existing light-mode
     design already treats them that way), so they keep referencing the raw
     hue tokens above directly rather than these — only the roles below
     actually redefine between light and dark. */
  --bg: var(--white);
  --bg-alt: var(--slate-soft);
  --surface: var(--white-pure);
  --text: var(--charcoal);
  --heading: var(--navy);
  --heading-soft: var(--navy-soft);
  --border: var(--slate);
  --accent-text: var(--teal-dark);
  --roof-line: var(--navy);

  /* The request-form card sits on the fixed-navy .section-dark background
     in both themes, so it needs its own scale rather than --surface/--bg
     above (which are calibrated for the main, non-navy page background).
     Light mode keeps the original white card; dark mode uses --navy-soft
     instead of near-black, so the card still visibly lifts off the navy
     section instead of nearly disappearing into it. */
  --form-card-bg: var(--white-pure);
  --form-label: var(--navy);
  --form-input-bg: var(--white);
  --form-input-text: var(--charcoal);
  --form-input-border: var(--slate);

  --font-head: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;

  --max-width: 1080px;
}

/* Dark mode, system default: applies when the OS/browser is set to dark
   AND the visitor hasn't made an explicit choice via the footer toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1720;
    --bg-alt: #17212E;
    --surface: #1A2436;
    --text: #DCE3EC;
    --heading: #F2F5F8;
    --heading-soft: #B9C3D6;
    --border: #2A3648;
    --accent-text: var(--teal);
    --roof-line: #C7D0DE;
    --text-muted: #A7B1C2;
    --text-faint: #6E7A8C;

    --form-card-bg: var(--navy-soft);
    --form-label: #F2F5F8;
    --form-input-bg: var(--navy);
    --form-input-text: #E4E9F1;
    --form-input-border: #3E4F78;
  }
}

/* Dark mode, explicit override via the footer toggle — wins regardless of
   the system setting. */
:root[data-theme="dark"] {
  --bg: #0F1720;
  --bg-alt: #17212E;
  --surface: #1A2436;
  --text: #DCE3EC;
  --heading: #F2F5F8;
  --heading-soft: #B9C3D6;
  --border: #2A3648;
  --accent-text: var(--teal);
  --roof-line: #C7D0DE;
  --text-muted: #A7B1C2;
  --text-faint: #6E7A8C;

  --form-card-bg: var(--navy-soft);
  --form-label: #F2F5F8;
  --form-input-bg: var(--navy);
  --form-input-text: #E4E9F1;
  --form-input-border: #3E4F78;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  transition: background-color 0.15s ease, color 0.15s ease;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-bottom: 1.2em; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { max-width: 62ch; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
  text-decoration: none;
}

.logo-mark { color: var(--teal); display: flex; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--white-pure);
}
.btn-primary:hover { background: var(--teal-dark); }

.btn-signal {
  background: var(--signal);
  color: var(--navy);
  box-shadow: 0 0 0 0 rgba(23, 227, 208, 0.5);
  transition: background-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-signal:hover {
  background: var(--signal-dark);
  box-shadow: 0 0 24px rgba(23, 227, 208, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--heading);
}
.btn-ghost:hover { background: var(--heading); color: var(--bg); }

.btn-small { padding: 9px 18px; font-size: 0.88rem; }

.btn-full { width: 100%; }

/* HERO */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  text-transform: none;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 30px;
  flex-wrap: wrap;
}

.hero-trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--heading-soft);
  font-weight: 500;
}

.hero-trust li { position: relative; padding-left: 18px; }
.trust-note { font-weight: 400; color: var(--text-muted); }
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.hero-visual { display: flex; justify-content: center; }
.hero-svg { width: 100%; max-width: 420px; height: auto; overflow: visible; }

/* currentColor on the roof/house line art resolves against this, so it
   stays legible whether the hero sits on a light or dark background. */
.roof-lines { color: var(--roof-line); }

.hud-text {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.03em;
  fill: var(--accent-text);
  font-weight: 500;
}

.hud-blink { animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { opacity: 0; } }

/* 6s loop = the same 3.5s sweep as before, followed by a ~2.5s pause
   before it starts again. */
.scan-line { animation: sweep 6s ease-in-out 0.4s infinite; }

@keyframes sweep {
  0%     { opacity: 0; transform: translateX(0); }
  4.6%   { opacity: 0.6; }
  53.6%  { opacity: 0.6; }
  58.3%  { opacity: 0; transform: translateX(360px); }
  100%   { opacity: 0; transform: translateX(360px); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; }
}

/* 404 PAGE */
.notfound-svg { width: 100%; max-width: 380px; height: auto; margin: 0 auto 8px; display: block; overflow: visible; }

.notfound-drone {
  transform-origin: center;
  transform-box: fill-box;
  animation: wobble 3.2s ease-in-out infinite;
}
@keyframes wobble {
  0%, 100% { transform: rotate(14deg); }
  50%      { transform: rotate(30deg); }
}
@media (prefers-reduced-motion: reduce) {
  .notfound-drone { animation: none; transform: rotate(22deg); }
}

/* SECTIONS */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 32px;
}

.service-item p { color: var(--text-muted); font-size: 0.98rem; }

/* SAMPLE WORK */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.sample-frame {
  aspect-ratio: 16 / 9;
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.92rem;
  text-align: center;
  padding: 20px;
}

.sample-caption {
  margin: 12px 2px 0;
  font-size: 0.88rem;
  color: var(--heading-soft);
  font-weight: 500;
}

/* HOW IT WORKS */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white-pure);
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps p { color: var(--text-muted); font-size: 0.98rem; margin: 0; }

/* REVIEWS */
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.review-card cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--heading);
  font-size: 0.9rem;
}

/* REQUEST FORM — .section-dark itself is a deliberate "always dark" accent
   band in both themes (part of the original design, not something that
   inverts), so it keeps referencing the fixed hue tokens rather than the
   theme-responsive roles above. The form CARD inside it does still need to
   respond to theme though — a stark white card reads as a big out-of-place
   block once the rest of the page goes dark — so it uses the dedicated
   --form-* tokens (see :root) instead of either set. */
.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-dark h2 { color: var(--white-pure); }
.section-dark p { color: var(--text-on-dark); }

.request-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.request-form {
  display: grid;
  gap: 18px;
  background: var(--form-card-bg);
  padding: 32px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.request-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--form-label);
}

.request-form input,
.request-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 11px 13px;
  border: 1.5px solid var(--form-input-border);
  border-radius: 4px;
  color: var(--form-input-text);
  background: var(--form-input-bg);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.request-form input:focus,
.request-form textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

/* FOOTER — also a fixed "always dark" surface in both themes. */
.site-footer {
  padding: 32px 0;
  background: var(--charcoal);
  color: var(--text-on-charcoal);
}

.footer-inner {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.footer-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.footer-inner a { color: var(--teal); text-decoration: none; }

.footer-email-btn,
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1.5px solid var(--teal);
  border-radius: 4px;
  padding: 7px 14px;
  margin: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--teal);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.footer-email-btn:hover,
.theme-toggle-btn:hover { background: var(--teal); color: var(--white-pure); }
.footer-email-btn:focus-visible,
.theme-toggle-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.footer-email-btn .email-btn-icon,
.theme-toggle-btn .theme-icon { flex-shrink: 0; }
.footer-email-btn .email-btn-icon[hidden],
.theme-toggle-btn .theme-icon[hidden] { display: none; }

.footer-email-btn.email-copied {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--navy);
}
.footer-email-btn.email-copy-error {
  border-color: #E8A5A5;
  color: #E8A5A5;
  background: transparent;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .service-grid { grid-template-columns: 1fr; }
  .cf-turnstile { transform: scale(0.9); transform-origin: left; }
  .sample-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .request-inner { grid-template-columns: 1fr; }
}
