:root{
  --qmd-orange:#F59000;
  --qmd-green:#1F983E;
  --qmd-lime:#BFD345;
  --qmd-ink:#0f172a;
}

html, body { height: 100%; }

/* Smooth anchor behaviour */
html { scroll-behavior: smooth; }

/* Useful for anchored sections with sticky header */
.anchor-offset { scroll-margin-top: 96px; }

/* Text selection */
::selection {
  background: rgba(191, 211, 69, 0.35); /* qmd-lime */
}

/* =========================
   Sleek load-in (no blank page)
   Requires: document.documentElement.classList.add('js') early
             and main.js adds 'js-loaded' on DOMContentLoaded
   ========================= */
html.js main{
  opacity: 0.985;
  transform: translateY(5px);
  filter: saturate(0.985) contrast(0.99);
}

html.js.js-loaded main{
  opacity: 1;
  transform: translateY(0);
  filter: saturate(1) contrast(1);
  transition:
    transform 320ms cubic-bezier(.2,.8,.2,1),
    opacity 260ms ease,
    filter 420ms ease;
}

@media (prefers-reduced-motion: reduce){
  html.js main,
  html.js.js-loaded main{
    transition: none;
    transform: none;
    filter: none;
  }
}

/* Better focus ring */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 152, 62, 0.35);
  border-radius: 12px;
}

/* =========================
   Buttons
   ========================= */
.btn-premium{
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease;
  will-change: transform;
}

.btn-premium:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.12);
}

.btn-premium:active{
  transform: translateY(0px) scale(0.985);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
}

@media (prefers-reduced-motion: reduce){
  .btn-premium, .btn-premium:hover, .btn-premium:active{
    transition: none;
    transform: none;
    box-shadow: none;
  }
}

/* =========================
   Cards
   ========================= */
.card-premium{
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease;
  will-change: transform;
}

.card-premium:hover{
  transform: translateY(-2px);
  border-color: rgba(31, 152, 62, 0.35);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, 0.10),
    0 10px 26px rgba(31, 152, 62, 0.06);
}

.card-premium:active{
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce){
  .card-premium, .card-premium:hover, .card-premium:active{
    transition: none;
    transform: none;
    box-shadow: none;
  }
}

/* =========================
   Mobile nav open animation (used by main.js)
   ========================= */
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-drop{ animation: dropIn 180ms ease-out; }

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

/* =========================
   Bring back brand personality (no glows)
   ========================= */

/* HERO: subtle brand tint + accent bar (works even with neutral placeholder hero image) */
section.relative.overflow-hidden.bg-slate-950{
  isolation: isolate;
}

/* Saturate hero image slightly */
section.relative.overflow-hidden.bg-slate-950 > img{
  z-index: 0;
  filter: saturate(1.18) contrast(1.05);
}

/* Keep existing overlay under our tint layer */
section.relative.overflow-hidden.bg-slate-950 > div.absolute{
  z-index: 0;
}

/* Brand tint overlay (adds colour cast without blur/glow) */
section.relative.overflow-hidden.bg-slate-950::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(15, 23, 42, 0.82) 0%,
    rgba(31, 152, 62, 0.26) 55%,
    rgba(245, 144, 0, 0.18) 100%
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* Accent bar at bottom of hero */
section.relative.overflow-hidden.bg-slate-950::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--qmd-green), var(--qmd-lime), var(--qmd-orange));
  opacity: 0.92;
  pointer-events: none;
  z-index: 3;
}

/* Keep hero content above overlays */
section.relative.overflow-hidden.bg-slate-950 > div.relative{
  position: relative;
  z-index: 2;
}

/* =========================
   Tasteful "Get a Quote" (header only)
   ========================= */
header a.btn-premium[href*="contact/#quote"]{
  background-color: var(--qmd-orange);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.06));
  border: 1px solid rgba(245, 144, 0, 0.45);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
}

header a.btn-premium[href*="contact/#quote"]:hover{
  filter: brightness(1.02) saturate(1.03);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.12);
  border-color: rgba(245, 144, 0, 0.65);
}

header a.btn-premium[href*="contact/#quote"]:active{
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
}

/* Optional: slightly nicer inputs everywhere (if you want the form to feel more premium) */
input, select, textarea{
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: rgba(31, 152, 62, 0.65);
  box-shadow: 0 0 0 3px rgba(31, 152, 62, 0.18);
}
/* Hero secondary CTA: visible “glass” button */
.hero-btn-secondary{
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.40);
  filter: brightness(1.02);
}
/* QMD colour fallbacks (in case Tailwind config colours don't apply) */
.bg-qmd-green { background-color: #1F983E !important; }
.bg-qmd-orange { background-color: #F59000 !important; }
.bg-qmd-lime { background-color: #BFD345 !important; }

.text-qmd-green { color: #1F983E !important; }
.text-qmd-orange { color: #F59000 !important; }
.text-qmd-lime { color: #BFD345 !important; }

.border-qmd-green { border-color: #1F983E !important; }
.border-qmd-orange { border-color: #F59000 !important; }
.border-qmd-lime { border-color: #BFD345 !important; }

/* Optional: make coloured buttons feel consistent on hover */
.btn-premium.bg-qmd-green:hover,
.btn-premium.bg-qmd-orange:hover,
.btn-premium.bg-qmd-lime:hover {
  filter: brightness(0.97) saturate(1.02);
}
