/* ============================================================
   Sant' Cost Engenharia — custom stylesheet
   Extends Tailwind with motion, rare utilities, and component
   polish aligned to the Industrial Minimalism direction.
   ============================================================ */

:root {
  --ink: #182946;
  --ink-950: #0B1626;
  --accent: #5CBD6F;
  --mist: #F8FAFC;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- vertical label ---------- */
.writing-vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.3em;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms cubic-bezier(.2, .7, .2, 1), transform 900ms cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* stagger when children share a parent.reveal-group */
.reveal-group>.reveal {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- scroll cue (hero) ---------- */
@keyframes scrollCue {
  0% {
    transform: translateY(-120%);
  }

  60% {
    transform: translateY(380%);
  }

  100% {
    transform: translateY(380%);
  }
}

.animate-scroll-cue {
  animation: scrollCue 2.4s cubic-bezier(.4, .1, .3, 1) infinite;
}

/* ---------- marquee ---------- */
@keyframes marqueeSlide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.marquee {
  width: max-content;
  animation: marqueeSlide 40s linear infinite;
}

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

/* ---------- header scrolled state ---------- */
header#nav.is-scrolled {
  box-shadow: 0 10px 40px -30px rgba(11, 22, 38, .35);
}

header#nav.is-scrolled>div:first-of-type {
  height: 4rem;
}

/* ---------- portfolio filter pills ---------- */
.filter-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.15rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: #182946;
  background: transparent;
  border: 1px solid rgba(24, 41, 70, .15);
  transition: all .3s cubic-bezier(.2, .7, .2, 1);
  cursor: pointer;
}

.filter-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #CBD5E1;
  transition: background .3s;
}

.filter-pill:hover {
  border-color: #182946;
}

.filter-pill.is-active {
  background: #182946;
  color: #fff;
  border-color: #182946;
}

.filter-pill.is-active::before {
  background: #5CBD6F;
}

/* ---------- portfolio card hover compare ---------- */
.compare {
  position: relative;
  overflow: hidden;
}

.compare .before,
.compare .after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare .after {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1);
}

.compare:hover .after {
  opacity: 1;
}

.compare .tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .7rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  z-index: 2;
}

.compare .tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #5CBD6F;
}

/* ---------- custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(24, 41, 70, .2);
  border-radius: 9999px;
  border: 2px solid #fff;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 41, 70, .4);
}

/* ---------- focus ring ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #5CBD6F;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- subtle image loaded fade ---------- */
img {
  transition: opacity .6s ease;
}

/* ---------- whatsapp radar ---------- */
@keyframes radar {
  0% {
    transform: scale(1);
    opacity: .55;
  }

  20% {
    transform: scale(2);
    opacity: 0;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.wa-ping-1 {
  animation: radar 5s ease-out infinite;
}

.wa-ping-2 {
  animation: radar 5s ease-out infinite 2.5s;
}

.group:hover .wa-ping-1,
.group:hover .wa-ping-2 {
  animation-play-state: paused;
  opacity: 0;
  transition: opacity .3s;
}

/* ---------- print & motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee,
  .animate-scroll-cue {
    animation: none !important;
  }
}