/* ─────────────────────────────────────────────────────────────────────────────
   BUILT FOR TRADIES — ROOT CSS
   Fonts · CSS variables · Base reset · Core components · Nav · Footer
   Loaded as a blocking stylesheet — fully styles all sitewide chrome
   before the Tailwind bundle arrives.
───────────────────────────────────────────────────────────────────────────── */

/* ─── FONTS ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Poppins Fallback";
  src: local("Arial");
  size-adjust: 112%;
  ascent-override: 93%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-style: normal; font-family: "Poppins"; font-weight: 400; font-display: swap;
  src: local(""), url("/assets/fonts/poppins-v24-latin-regular.woff2") format("woff2"),
       url("/assets/fonts/poppins-v24-latin-regular.woff") format("woff");
}
@font-face {
  font-style: normal; font-family: "Poppins"; font-weight: 500; font-display: swap;
  src: local(""), url("/assets/fonts/poppins-v24-latin-500.woff2") format("woff2"),
       url("/assets/fonts/poppins-v24-latin-500.woff") format("woff");
}
@font-face {
  font-style: normal; font-family: "Poppins"; font-weight: 600; font-display: swap;
  src: local(""), url("/assets/fonts/poppins-v24-latin-600.woff2") format("woff2"),
       url("/assets/fonts/poppins-v24-latin-600.woff") format("woff");
}
@font-face {
  font-style: normal; font-family: "Poppins"; font-weight: 700; font-display: swap;
  src: local(""), url("/assets/fonts/poppins-v24-latin-700.woff2") format("woff2"),
       url("/assets/fonts/poppins-v24-latin-700.woff") format("woff");
}

/* ─── CSS VARIABLES ──────────────────────────────────────────────────────── */

:root {
  --foreground: 0 0% 100%;
  --primary: 32 100% 50%;
  --primary-foreground: 0 0% 100%;
  --radius: 0.75rem;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* ─── BASE RESET ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: hsl(205, 52%, 18%); }
body {
  font-family: 'Poppins', 'Poppins Fallback', sans-serif;
  color: #fff;
  background: hsl(205, 52%, 18%);
  -webkit-font-smoothing: antialiased;
  font-size: .875rem;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* ─── CORE COMPONENTS ────────────────────────────────────────────────────── */

/* Orange gradient text */
.text-primary {
  background: linear-gradient(135deg, hsl(32 100% 55%) 0%, hsl(25 100% 50%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Foreground = white */
.text-foreground { color: #fff; }

/* Frosted glass panel */
.glass {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

/* Pill button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.625rem 2rem;
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-decoration: none;
  transition: all 200ms;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.btn:hover {
  transform: scale(1.02);
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}
.btn:active { transform: scale(0.98); }

/* Skip nav link */
.skip {
  position: absolute; top: 0; left: 0;
  opacity: 0; z-index: -1111111;
}
.skip:focus { opacity: 1; z-index: 50; }

/* ─── NAV ────────────────────────────────────────────────────────────────── */

/* Sticky wrapper */
.sticky  { position: sticky; }
.top-0   { top: 0; }
.z-50    { z-index: 50; }

/* Nav bar — mobile: frosted glass, desktop: transparent */
nav.flex {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background-color: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Left group: logo + desktop links */
nav .flex.items-center {
  display: flex;
  align-items: center;
}
.gap-8  { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Logo image */
.h-8   { height: 2rem; }
.w-auto { width: auto; }

/* Icon sizes */
.size-4 { width: 1rem;    height: 1rem; }
.size-5 { width: 1.25rem; height: 1.25rem; }
.size-6 { width: 1.5rem;  height: 1.5rem; }

/* Hide on mobile (desktop nav links + CTA group) */
.hidden { display: none; }

/* Dropdown positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.top-full { top: 100%; }
.left-0   { left: 0; }
.pt-2     { padding-top: 0.5rem; }

/* Dropdown transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition {
  transition-property: color, background-color, border-color, opacity, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Dropdown open/close states */
.opacity-0     { opacity: 0; }
.opacity-100   { opacity: 1; }
.invisible     { visibility: hidden; }
.visible       { visibility: visible; }
.-translate-y-1 { transform: translateY(-0.25rem); }
.translate-y-0  { transform: translateY(0); }
.rotate-180     { transform: rotate(180deg); }

/* Dropdown inner panel */
.rounded-lg         { border-radius: 0.5rem; }
.shadow-xl          { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }
.border             { border-width: 1px; border-style: solid; }
.border-white\/20   { border-color: rgba(255, 255, 255, 0.2); }
.min-w-\[240px\]   { min-width: 240px; }
.min-w-\[200px\]   { min-width: 200px; }

/* Dropdown link spacing */
.block { display: block; }
.px-4  { padding-left: 1rem;   padding-right: 1rem; }
.py-2  { padding-top: 0.5rem;  padding-bottom: 0.5rem; }
.py-3  { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* Text colours used in nav */
.text-sm       { font-size: 0.875rem; line-height: 1.25rem; }
.text-base     { font-size: 1rem;     line-height: 1.5rem; }
.text-lg       { font-size: 1.125rem; line-height: 1.75rem; }
.text-white    { color: #fff; }
.text-gray-200 { color: rgb(229, 231, 235); }
.text-gray-300 { color: rgb(209, 213, 219); }
.text-gray-400 { color: rgb(156, 163, 175); }
.text-gray-500 { color: rgb(107, 114, 128); }
.font-medium   { font-weight: 500; }
.font-bold     { font-weight: 700; }

/* Desktop nav link spacing (space-x-6 / lg:space-x-8) */
.space-x-6 > * + * { margin-left: 1.5rem; }

/* Mobile hamburger active state */
.active\:scale-90:active { transform: scale(0.9); }

/* ── Mobile menu overlay ── */
.fixed    { position: fixed; }
.inset-0  { inset: 0; }
.flex-col { flex-direction: column; }
.justify-center { justify-content: center; }
.items-center   { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.backdrop-blur-2xl {
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
}
/* Off-screen until JS opens it */
.-translate-x-full { transform: translateX(-100%); }
.translate-x-0    { transform: translateX(0); }

/* Mobile close button position */
.top-8   { top: 2rem; }
.right-4 { right: 1rem; }
.z-\[51\] { z-index: 51; }

/* ── Nav breakpoint: 950px ── */
@media (min-width: 950px) {
  /* Nav bar goes transparent on desktop */
  nav.flex {
    padding-left: 4rem;
    padding-right: 4rem;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  /* Scrolled state: frosted glass re-applied via nav:bg-white/15 class */
  nav.flex.nav\:bg-white\/15 {
    background-color: rgba(255, 255, 255, 0.15) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }
  /* Left group gap */
  nav .flex.items-center { gap: 3rem; }

  /* Reveal desktop items */
  .nav\:flex   { display: flex !important; }
  .nav\:hidden { display: none  !important; }

  /* Explicit overrides for scroll state */
  .nav\:bg-transparent    { background-color: transparent !important; }
  .nav\:backdrop-blur-none {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .nav\:bg-white\/15 { background-color: rgba(255,255,255,0.15) !important; }
  .nav\:backdrop-blur-lg {
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }
  .nav\:px-16  { padding-left: 4rem !important; padding-right: 4rem !important; }
  .nav\:gap-12 { gap: 3rem !important; }

  /* Desktop nav link spacing */
  .space-x-6 > * + * { margin-left: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg\:px-24     { padding-left: 6rem !important; padding-right: 6rem !important; }
  .lg\:space-x-8 > * + * { margin-left: 2rem; }
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

footer {
  width: 100%;
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

footer > div {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Footer grid */
.grid        { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-10      { gap: 2.5rem; }

/* Footer logo */
.inline-block { display: inline-block; }
.mb-5 { margin-bottom: 1.25rem; }
.h-12 { height: 3rem; }

/* Footer heading */
.text-2xl      { font-size: 1.5rem; line-height: 2rem; }
.leading-tight { line-height: 1.25; }

/* CTA button */
.mt-6 { margin-top: 1.5rem; }

/* Column headings */
.mb-4 { margin-bottom: 1rem; }

/* Link lists */
ul { list-style: none; }
.space-y-3 > * + * { margin-top: 0.75rem; }

/* Products column span */
.lg\:col-span-2 { grid-column: span 2 / span 2; }

/* Bottom bar divider */
hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}

/* Bottom bar */
.flex-wrap       { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.gap-4           { gap: 1rem; }
.mt-14           { margin-top: 3.5rem; }
.mb-6            { margin-bottom: 1.5rem; }

/* Social icon hover */
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }

/* Footer responsive */
@media (min-width: 768px) {
  footer > div {
    padding-left: 4rem;
    padding-right: 4rem;
  }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:flex-row    { flex-direction: row; }
  .md\:text-3xl    { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:inline      { display: inline; }
  .md\:px-16       { padding-left: 4rem; padding-right: 4rem; }
}

@media (min-width: 1024px) {
  footer > div {
    padding-left: 6rem;
    padding-right: 6rem;
  }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:col-span-2  { grid-column: span 2 / span 2; }
}
