/* ============================================================
   Evins Construction LLC v2 — Premium Features
   Progress bar, scroll reveals, parallax, hover lifts,
   blur-reveal, shimmer, view transitions, textures
   ============================================================ */

/* --- Reading Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--amber), var(--amber-light));
  z-index: 300;
  width: 0%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.progress-bar.active { opacity: 1; }

/* --- Scroll Reveals --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.92); opacity: 0; }
[data-reveal="up"]    { transform: translateY(24px); }
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* --- Blur-to-Focus Reveal --- */
.blur-reveal {
  filter: blur(6px);
  opacity: 0.7;
  transition: filter 0.9s var(--ease-out), opacity 0.9s var(--ease-out);
}
.blur-reveal.revealed { filter: blur(0); opacity: 1; }

/* --- Lazy-Load Shimmer --- */
img[loading="lazy"] {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-dark) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
img[loading="lazy"][src] { animation: none; background: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Scroll-to-Top Button --- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s, visibility 0.35s, transform 0.35s var(--ease-out), background 0.2s;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(201,125,46,0.45);
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover { background: var(--amber-light); transform: translateY(-2px); }

@media (max-width: 1024px) {
  .scroll-top-btn { bottom: 5rem; right: 1rem; width: 40px; height: 40px; }
}

/* --- Card Hover Lifts --- */
.lift-card {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.lift-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* --- Parallax Container --- */
.parallax-wrap {
  overflow: hidden;
  position: relative;
}
.parallax-img {
  position: absolute;
  inset: -20% 0;
  will-change: transform;
  object-fit: cover;
  width: 100%;
  height: 140%;
}

/* --- Noise Texture Overlay --- */
.textured {
  position: relative;
}
.textured::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.textured > * { position: relative; z-index: 2; }

/* --- View Transitions --- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.25s ease-in forwards; }
::view-transition-new(root) { animation: vt-in 0.3s ease-out forwards; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(8px); } }

/* --- Kinetic Quote Animation --- */
.kinetic-quote .kinetic-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.kinetic-quote.active .kinetic-word { opacity: 1; transform: none; }

/* --- Section Pull Quote --- */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-align: center;
  color: var(--white);
  padding: 4rem 2rem;
  position: relative;
}

/* --- Reduced Motion Override --- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .blur-reveal  { filter: none !important; opacity: 1 !important; transition: none !important; }
  .progress-bar { display: none !important; }
  img[loading="lazy"] { animation: none !important; }
  .lift-card    { transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
