/* ═══════════════════════════════════════════
   PREMIUM ENHANCEMENTS — Construction Georgia
   Includes: cursor, progress bar, floating btn,
   back-to-top, cookie banner, tilt, transitions
═══════════════════════════════════════════ */

/* ── 1. КАСТОМНЫЙ КУРСОР ── */
* { cursor: none !important; }
@media (hover: none) { * { cursor: auto !important; } }

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--gold, #b07840);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-200px, -200px);
  transition: width 0.2s, height 0.2s, background 0.2s, opacity 0.2s;
  will-change: transform;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(176, 120, 64, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-200px, -200px);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1),
              height 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.2s,
              opacity 0.2s;
  will-change: transform;
}
.cursor-dot.hover  { width: 12px; height: 12px; background: var(--gold-lt, #c8904e); }
.cursor-ring.hover { width: 48px; height: 48px; border-color: rgba(176,120,64,.85); }
.cursor-dot.click  { width: 6px; height: 6px; opacity: .5; }
.cursor-ring.click { width: 22px; height: 22px; }

/* ── 2. SCROLL PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dk, #8a5e2e), var(--gold, #b07840), var(--gold-lt, #c8904e));
  z-index: 99997;
  transition: width 0.05s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(176,120,64,.5);
}

/* ── 3. FLOATING WHATSAPP — dropdown ── */
.floating-wa-wrap {
  position: fixed;
  bottom: 2rem;
  right: calc(2rem + 62px + 8px);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.floating-wa-menu {
  position: absolute;
  bottom: calc(100% + .55rem);
  right: 0;
  width: max-content;
  background: rgba(22, 18, 12, 0.92);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: .4rem;
  display: flex; flex-direction: column; gap: .15rem;
  opacity: 0;
  transform: translateY(10px) scale(.95);
  pointer-events: none;
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
}
.floating-wa-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.floating-wa-menu-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem 1rem;
  border-radius: 10px;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: .88rem; font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.floating-wa-menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.floating-wa-menu-item svg { color: #25D366; flex-shrink: 0; }
.wa-menu-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #25D366; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(37,211,102,.7);
}
.floating-wa-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: none; cursor: pointer;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s;
  flex-shrink: 0;
}
.floating-wa-btn { position: relative; }
.floating-wa-btn::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(37,211,102,.45);
  animation: wa-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
.floating-wa-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,.6); }
.floating-wa-btn[aria-expanded="true"] { transform: scale(.95); }

@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .7; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ── 3b. FOOTER WA DROPDOWN ── */
.footer-wa-wrap { position: relative; display: inline-flex; }
.footer-wa-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.95);
  transform-origin: bottom center;
  background: rgba(22, 18, 12, 0.95);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: .4rem;
  display: flex; flex-direction: column; gap: .1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  z-index: 200;
  white-space: nowrap;
}
.footer-wa-menu.open {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* ── 4. BACK-TO-TOP ── */
#back-to-top {
  position: fixed;
  bottom: calc(2rem + 62px + 10px);
  right: calc(2rem + 62px + 8px + 11px);
  z-index: 8999;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface, #f8f3ea);
  border: 1px solid var(--border, #d8cec0);
  color: var(--gold, #b07840);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.18s, border-color 0.18s;
  box-shadow: 0 2px 12px rgba(100,65,20,.1);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover { background: var(--gold, #b07840); color: #fdf9f4; border-color: var(--gold); }

/* ── 5. COOKIE BANNER ── */
#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 9001;
  background: var(--text, #1e1a14);
  color: var(--white, #fdf9f4);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 560px;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.3s;
  opacity: 0;
}
#cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.cookie-text {
  font-size: .8rem;
  line-height: 1.55;
  color: rgba(253,249,244,.75);
  flex: 1;
}
.cookie-text a { color: var(--gold-lt, #c8904e); text-decoration: underline; }
.cookie-btns { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-accept {
  background: var(--gold, #b07840);
  color: #1e1a14;
  border: none;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  font-family: var(--f-body, sans-serif);
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s;
}
.cookie-accept:hover { background: var(--gold-lt, #c8904e); transform: scale(1.03); }
.cookie-decline {
  background: none;
  color: rgba(253,249,244,.5);
  border: 1px solid rgba(253,249,244,.15);
  border-radius: 8px;
  padding: .5rem .8rem;
  font-size: .78rem;
  font-family: var(--f-body, sans-serif);
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}
.cookie-decline:hover { color: rgba(253,249,244,.85); border-color: rgba(253,249,244,.35); }

/* ── 6. PAGE TRANSITIONS ── */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg, #f0e8d8);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.page-transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── 7. 3D TILT + GLOW ── */
.pf-card, .tool-card, .svc-card {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s;
  position: relative;
}
.pf-card:hover, .tool-card:hover {
  box-shadow: 0 16px 48px rgba(100,65,20,.18) !important;
}
.pf-card::before, .tool-card::before, .svc-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle 130px at var(--mx, 50%) var(--my, 50%), rgba(176,120,64,.13), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: inherit;
}
.pf-card:hover::before, .tool-card:hover::before, .svc-card:hover::before { opacity: 1; }

/* ── PROJECTS STRIP ── */
.proj-strip-wrap {
  overflow-x: scroll;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0 0;
  cursor: grab;
}
.proj-strip-wrap::-webkit-scrollbar { display: none; }
.proj-strip-wrap:active { cursor: grabbing; }
.proj-strip {
  display: flex;
  gap: 16px;
  padding: 0 40px 40px;
  width: max-content;
}
.proj-card {
  flex-shrink: 0;
  width: 268px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface, #f8f3ea);
  border: 1px solid var(--border, #e0d4c0);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
}
.proj-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 14px 40px rgba(100,65,20,.14);
}
.proj-card__img {
  height: 175px;
  width: 100%;
}
.proj-card__body { padding: 16px 20px 20px; }
.proj-card__tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold, #b07840); display: block; margin-bottom: 6px;
}
.proj-card__title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.proj-card__meta { font-size: 12px; color: var(--muted, #8a7e6e); }
.proj-strip-hint {
  text-align: center; padding: 0 0 36px;
  font-size: 13px; color: var(--muted, #8a7e6e); opacity: 0.55;
  letter-spacing: 0.05em;
}

/* ── 8. TYPING CURSOR ── */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  background: var(--gold, #b07840);
  margin-left: 2px;
  border-radius: 2px;
  animation: blink 0.9s step-end infinite;
  vertical-align: baseline;
  height: 0.75em;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* ── GRAIN OVERLAY ── */
.grain-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: .042; mix-blend-mode: multiply;
  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='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── ACTIVE NAV ── */
.header-nav a.nav-active { color: var(--white, #fdf9f4) !important; }

/* ── SPLIT HERO LINES ── */
.sh-line {
  display: block;
  overflow: hidden;
  padding-top: 0.15em;
  padding-bottom: 0.2em;
  margin-top: -0.15em;
  margin-bottom: -0.2em;
}
.sh-inner {
  display: block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform .75s cubic-bezier(.16,1,.3,1),
              opacity .5s ease;
}
.sh-inner.in { transform: translateY(0); opacity: 1; }

/* ── STAGGER: children inherit delay from JS inline style ── */
.stagger-parent > * {
  transition-delay: var(--sd, 0ms);
}

/* ── MESH CANVAS ── */
.mesh-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: .55;
}

/* ── SPOTLIGHT CARDS ── */
.spotlight-host { position: relative; isolation: isolate; }
.spotlight-host::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    280px circle at var(--sx, -999px) var(--sy, -999px),
    rgba(176,120,64,.13) 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  border-radius: inherit;
  z-index: 1;
}
.spotlight-host:hover::after { opacity: 1; }

/* ── STACKED REVIEWS ── */
.testimonials--stacked {
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
}
.testimonials--stacked .testimonial {
  position: sticky;
  top: 90px;
  margin-bottom: 1.5rem;
  transform-origin: top center;
  will-change: transform;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .floating-wa-wrap { bottom: 1.25rem; right: calc(1.25rem + 62px + 8px); }
  .floating-wa-btn { width: 62px; height: 62px; }
  #back-to-top { bottom: calc(1.25rem + 62px + 10px); right: calc(1.25rem + 62px + 8px + 11px); }
  #cookie-banner {
    bottom: auto; top: 0; border-radius: 0 0 10px 10px;
    transform: translateX(-50%) translateY(-100px);
    padding: .55rem .85rem; gap: .6rem; flex-wrap: wrap;
  }
  #cookie-banner.show { transform: translateX(-50%) translateY(0); }
  .cookie-text { font-size: .7rem; line-height: 1.4; }
  .cookie-accept, .cookie-decline { font-size: .7rem; padding: .35rem .7rem; }
}

/* ── LOGO BOUNCE (mobile only) ── */
@keyframes logo-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@media (max-width: 600px) {
  .logo--3d { animation: logo-bounce 3s ease-in-out infinite; }
}
