/* ─── PRELOADER ──────────────────────────────────────────── */

.preloader {
  position: fixed;
  inset: 0;
  background: var(--donker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

/* ─── SCROLL REVEAL ──────────────────────────────────────– */

.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ─── SPLIT TEXT (SplitText animation) ───────────────────– */

.split-line {
  display: inline-block;
  overflow: clip;
  clip-path: inset(100% 0 0 0);
  opacity: 0;
}

.split-line.animate {
  clip-path: inset(0% 0 0 0);
  opacity: 1;
}

/* ─── FLOATING ANIMATION (background orbs) ────────────────– */

.floating {
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(30px, -20px);
  }
  50% {
    transform: translate(-20px, 30px);
  }
  75% {
    transform: translate(20px, -30px);
  }
}

.floating.slow {
  animation-duration: 10s;
}

.floating.slower {
  animation-duration: 12s;
}

/* ─── PULSE ANIMATION ────────────────────────────────────– */

@keyframes pulse-opacity {
  0%, 100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.12;
  }
}

.pulse {
  animation: pulse-opacity 4s ease-in-out infinite;
}

/* ─── COUNTER ANIMATION (stats) ──────────────────────────– */

.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ─── CARD HOVER TRANSFORM ───────────────────────────────– */

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(44, 36, 32, 0.12);
}

/* ─── 3D TILT EFFECT ─────────────────────────────────────– */

.tilt-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.tilt-item {
  transition: transform 0.1s ease-out;
  transform-style: preserve-3d;
}

/* ─── ACCORDION ANIMATION ────────────────────────────────– */

.accordion-item {
  border-bottom: 1px solid var(--rand);
}

.accordion-header {
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.accordion-header:hover {
  color: var(--accent);
}

.accordion-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.accordion-toggle.active {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  padding-bottom: 0;
}

.accordion-content.active {
  max-height: 500px;
  opacity: 1;
  padding-bottom: 20px;
}

/* ─── SCROLL INDICATOR (chevron) ─────────────────────────– */

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 247, 243, 0.4);
  opacity: 0;
  animation: fade-in 1s ease-out 0.5s both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.scroll-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ─── BUTTON EFFECTS ─────────────────────────────────────– */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

/* ─── MAGNETIC BUTTON (if implemented) ──────────────────– */

.btn-magnetic {
  position: relative;
}

/* ─── TOAST/NOTIFICATION ─────────────────────────────────– */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: white;
  padding: 16px 24px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 9000;
  animation: slide-up 0.3s ease-out;
  box-shadow: 0 8px 24px rgba(217, 119, 87, 0.3);
}

@keyframes slide-up {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.success {
  background: #3A7C5A;
}

.toast.error {
  background: #A83636;
}

/* ─── FORM ANIMATION ─────────────────────────────────────– */

.form-input {
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.form-input.error {
  border-color: #A83636;
  box-shadow: 0 0 0 3px rgba(168, 54, 54, 0.1);
}

/* ─── BROWSER FRAME SCROLL ───────────────────────────────– */

.browser-viewport {
  position: relative;
  overflow: hidden;
}

.browser-screenshot {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.browser-frame:hover .browser-screenshot {
  transform: translateY(-8%);
}
