/* ============ WOW LAYER v=44 ============
 * Premium animations, particles, splash screen, hover effects.
 * Loaded after luxury.css. Adds the "milion EUR" feel.
 */

/* ============ SPLASH SCREEN ============ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1A0F08 0%, #3D2418 50%, #261309 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: splashFadeOut 0.7s ease-in 1.2s forwards;
  pointer-events: none;
}
#splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(201,168,118,0.15) 0%, transparent 60%);
  animation: splashPulse 2s ease-in-out infinite;
}
.splash-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 600;
  color: transparent;
  background: linear-gradient(135deg, #E0BE8C 0%, #C9A876 50%, #9F7F4F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 24px rgba(201,168,118,0.4));
}
.splash-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(201,168,118,0.7);
  animation: splashFadeIn 0.6s ease-out 0.3s backwards;
}
.splash-bar {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #C9A876 50%, transparent 100%);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}
.splash-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #E0BE8C, transparent);
  animation: splashSwipe 1.2s ease-in-out infinite;
}
@keyframes splashFadeOut {
  to { opacity: 0; visibility: hidden; }
}
@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
@keyframes splashSwipe {
  to { left: 100%; }
}

/* ============ HERO with animated wood pattern ============ */
.hero-projects {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top right, rgba(201,168,118,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(159,127,79,0.15) 0%, transparent 50%),
    linear-gradient(135deg, var(--ivory-soft) 0%, rgba(255,247,237,0.9) 100%);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gold);
  padding: 2.5rem 1.8rem !important;
}
.hero-projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,
      transparent 0px,
      transparent 30px,
      rgba(201,168,118,0.04) 30px,
      rgba(201,168,118,0.04) 31px),
    repeating-linear-gradient(-45deg,
      transparent 0px,
      transparent 30px,
      rgba(159,127,79,0.04) 30px,
      rgba(159,127,79,0.04) 31px);
  animation: heroPatternShift 30s linear infinite;
  pointer-events: none;
}
@keyframes heroPatternShift {
  to { background-position: 600px 600px; }
}
.hero-projects h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--mahogany);
  margin: 0 0 0.5rem 0;
  position: relative;
  z-index: 1;
}
.hero-projects h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  margin-top: 0.6rem;
}
.hero-projects p {
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  max-width: 480px;
  line-height: 1.6;
}

/* ============ PROJECT CARD - premium hover with tilt ============ */
.cards .card {
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  will-change: transform;
}
.cards .card::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cards .card:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow:
    0 20px 50px rgba(38,19,9,0.18),
    0 0 0 1px var(--gold);
}
.cards .card:hover::after { opacity: 1; }
.cards .card:hover h3 {
  color: var(--gold-deep);
  letter-spacing: 0.5px;
}

/* ============ FAB - dramatic premium ============ */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #E0BE8C 0%, #C9A876 40%, #9F7F4F 100%);
  color: var(--espresso);
  border: 1px solid var(--gold-deep);
  font-size: 2rem;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(159,127,79,0.45),
    0 4px 12px rgba(0,0,0,0.15),
    inset 0 1px 2px rgba(255,255,255,0.4),
    inset 0 -1px 2px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: all 0.3s var(--easing);
  animation: fabIdle 4s ease-in-out infinite;
}
.fab::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), transparent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}
.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow:
    0 16px 40px rgba(159,127,79,0.55),
    0 6px 16px rgba(0,0,0,0.2),
    inset 0 1px 2px rgba(255,255,255,0.5);
}
.fab:hover::before { opacity: 0.6; }
@keyframes fabIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============ PARTICLE BURST przy success ============ */
.particle-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 0;
  height: 0;
}
.particle-burst span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: particleFly 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  box-shadow: 0 0 8px rgba(201,168,118,0.8);
}
@keyframes particleFly {
  0%   { transform: translate(0, 0) scale(0); opacity: 1; }
  50%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

/* ============ BTN-PRIMARY ULTRA - z 3D tilt + ripple ============ */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}
.btn-primary:active::after {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}
.btn-primary.big {
  padding: 1.05rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ============ INFO STRIP - bardziej dramatyczny ============ */
.info-strip > div {
  position: relative;
  transition: all 0.3s var(--easing);
}
.info-strip > div:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #FFFFFF, var(--ivory-soft));
}
.info-strip > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.info-strip > div:hover::before { opacity: 1; }

/* ============ TAB - aktywna z glow ============ */
.tab.active, button.tab.active {
  position: relative;
  background: linear-gradient(135deg, var(--mahogany), var(--mahogany-deep)) !important;
  color: var(--gold-bright) !important;
  border: 1px solid var(--gold) !important;
  box-shadow:
    0 4px 16px rgba(38,19,9,0.3),
    inset 0 1px 0 rgba(201,168,118,0.2),
    0 0 20px rgba(201,168,118,0.2);
}
.tab.active::after, button.tab.active::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============ HEADER LOGO HOVER ============ */
.brand-icon {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)) !important;
  box-shadow: 0 4px 12px rgba(201,168,118,0.3);
}
.app-header:hover .brand-icon {
  transform: rotate(-10deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(201,168,118,0.5);
}

/* ============ EMPTY STATE - elegantna ilustracja ============ */
.empty-state {
  background: linear-gradient(135deg, var(--ivory-soft), var(--surface));
  border: 1px dashed var(--gold);
  position: relative;
  overflow: hidden;
}
.empty-state::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(201,168,118,0.15) 0%, transparent 50%);
}
.empty-icon {
  filter: drop-shadow(0 8px 16px rgba(159,127,79,0.3));
  animation: emptyIconFloat 3s ease-in-out infinite;
}
@keyframes emptyIconFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text);
}

/* ============ POLY CANVAS WRAP - z gold inner glow ============ */
.canvas-wrap {
  position: relative;
}
.canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius);
  box-shadow: inset 0 0 80px rgba(201,168,118,0.06);
}

/* ============ MODAL - dramatic backdrop with animation ============ */
.modal-overlay {
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: radial-gradient(ellipse at center, rgba(38,19,9,0.5) 0%, rgba(15,8,4,0.85) 100%) !important;
  animation: modalBackdropIn 0.3s ease-out;
}
@keyframes modalBackdropIn {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to   { opacity: 1; backdrop-filter: blur(12px) saturate(150%); }
}
#modal-content {
  animation: modalContentIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalContentIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ MISC POLISH ============ */
.hint, .canvas-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  font-style: italic;
  opacity: 0.9;
}

/* Custom selection */
::selection {
  background: linear-gradient(135deg, rgba(201,168,118,0.5), rgba(159,127,79,0.5));
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* Premium focus rings - złoty */
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--gold) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(201,168,118,0.2) !important;
}

/* Smooth scroll całej strony */
html { scroll-behavior: smooth; }

/* Reduced motion - szanuj preferencje użytkownika */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
