/* Critical Asset Drone Inspections — site styles
   Used in addition to Tailwind (compiled locally to assets/tailwind.css).
   Variables:
     --ink, --ink-2  : primary dark backgrounds
     --accent        : amber brand accent
     --line          : 8% white border for dark surfaces
*/

:root {
  --ink: #0a1628;
  --ink-2: #101f38;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --line: rgba(255, 255, 255, .08);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: #0f172a; background: #fff; }
h1, h2, h3, .display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

/* Hero backgrounds */
.hero-bg {
  background-image:
    linear-gradient(135deg, rgba(10, 22, 40, .92) 0%, rgba(10, 22, 40, .75) 100%),
    url('https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1920&q=80');
  background-size: cover; background-position: center;
}
.hero-svc {
  background-image:
    linear-gradient(135deg, rgba(10, 22, 40, .92) 0%, rgba(10, 22, 40, .80) 100%),
    url('https://images.unsplash.com/photo-1497435334941-8c899ee9e8e9?auto=format&fit=crop&w=1920&q=80');
  background-size: cover; background-position: center;
}
.hero-abt {
  background-image:
    linear-gradient(135deg, rgba(10, 22, 40, .90) 0%, rgba(10, 22, 40, .78) 100%),
    url('https://images.unsplash.com/photo-1473968512647-3e447244af8f?auto=format&fit=crop&w=1920&q=80');
  background-size: cover; background-position: center;
}
.hero-ctc {
  background-image:
    linear-gradient(135deg, rgba(10, 22, 40, .95) 0%, rgba(10, 22, 40, .82) 100%),
    url('https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&w=1920&q=80');
  background-size: cover; background-position: center;
}

.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Buttons */
.btn-primary { background: var(--accent); color: #0a1628; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

/* Nav, badges, labels */
.nav-link { position: relative; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -24px;
  height: 2px; background: var(--accent);
}

.badge {
  background: rgba(245, 158, 11, .12); color: #b45309;
  padding: 4px 12px; border-radius: 4px; font-size: 11px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge-dark {
  background: rgba(245, 158, 11, .15); color: #fbbf24;
  padding: 4px 12px; border-radius: 4px; font-size: 11px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #64748b;
}

.accent-line { width: 48px; height: 3px; background: var(--accent); margin-bottom: 20px; }
.mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; }

/* Gallery */
.gallery { aspect-ratio: 4/3; overflow: hidden; border-radius: 8px; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery:hover img { transform: scale(1.05); }

/* Stats */
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem; font-weight: 800; color: #f59e0b; line-height: 1;
}

input, textarea, select { font-family: inherit; }

/* Consistent focus styling on every form control */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .25);
}

/* Form validation states */
.field-error { border-color: #dc2626 !important; background: #fef2f2; }
.field-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }
.field-error-msg { color: #dc2626; font-size: 12px; margin-top: 4px; display: none; }
.field-error-msg.show { display: block; }
/* Icon prefix so the error signal is not colour-only */
.field-error-msg.show::before {
  content: "⚠ "; font-weight: 700; margin-right: 2px;
}

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
  max-width: 720px; margin: 0 auto;
  background: #0a1628; color: #fff;
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 8px; padding: 18px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  display: none;
  font-size: 14px; line-height: 1.5;
}
.cookie-banner.show { display: block; }
.cookie-banner a { color: #fbbf24; text-decoration: underline; }
.cookie-banner .actions {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px;
}
.cookie-banner button {
  font-family: inherit; font-weight: 600; font-size: 13px;
  padding: 8px 16px; border-radius: 4px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff;
}
.cookie-banner button.primary {
  background: #f59e0b; color: #0a1628; border-color: #f59e0b;
}
.cookie-banner button.primary:hover { background: #fbbf24; }
.cookie-banner button:hover { background: rgba(255, 255, 255, .08); }

/* Form status banner */
.form-status {
  display: none; padding: 12px 16px; border-radius: 6px;
  font-size: 14px; margin-bottom: 16px;
}
.form-status.success {
  display: block; background: #ecfdf5; color: #065f46;
  border: 1px solid #6ee7b7;
}
.form-status.error {
  display: block; background: #fef2f2; color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Honeypot — hidden from real users, attractive to bots */
.hp-field {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* FAQ accordion — hide native disclosure marker across browsers */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { content: ''; }
/* Keyboard focus ring on FAQ summaries (replaces the native marker users lost) */
details > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Skip-to-content link — visible only when keyboard-focused */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 100;
  background: var(--accent);
  color: var(--ink);
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Global keyboard focus indicator — applies to all interactive elements
   that don't already define a more specific focus state above. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Don't double-up on form controls — they have their own focus ring. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

/* Honour user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .gallery:hover img { transform: none; }
}
