/* ==============================
   style.css
   Mirrors src/app/globals.css
   (Tailwind itself is compiled via the standalone CLI — see README)
   ============================== */

:root {
  --transition-duration: 0.3s;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

/* ==============================
   Hazard stripe signature motif
   ============================== */
.hazard-stripe {
  background: repeating-linear-gradient(
    -45deg,
    var(--color-ink),
    var(--color-ink) 10px,
    var(--color-primary) 10px,
    var(--color-primary) 20px
  );
}

/* ==============================
   Nav underline draw-in (chalk-line interaction)
   ============================== */
.nav-underline {
  position: absolute;
  left: 0;
  bottom: 14px;
  height: 2px;
  width: 100%;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
a:hover > .nav-underline {
  transform: scaleX(1);
}

/* ==============================
   Compressed header state, toggled by main.js on scroll
   ============================== */
#site-header.is-scrolled nav {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
#site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==============================
   Back-to-top button
   ============================== */
.back-to-top {
  transition: background-color var(--transition-duration) ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==============================
   Marquee (replaces react-fast-marquee)
   The client list is rendered twice back-to-back in our-clients.php;
   this animation scrolls the whole track left by exactly 50%, which is
   one full copy of the list, producing a seamless infinite loop.
   ============================== */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==============================
   Accessibility
   ============================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==============================
   Portfolio filter tabs (ourprojects.php)
   ============================== */
.filter-btn {
  background-color: var(--color-concrete);
  color: var(--color-steel);
}
.filter-btn.is-active {
  background-color: var(--color-primary);
  color: var(--color-ink);
}
.filter-btn:hover:not(.is-active) {
  background-color: var(--color-ink);
  color: var(--color-mist);
}

/* ==============================
   WhatsApp floating button pulse
   ============================== */
.whatsapp-ping {
  animation: whatsapp-pulse 2.5s ease-out infinite;
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

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