/*
Theme Name: DigiManzil Scroll Motion
Theme URI: https://digimanzil.com/
Author: DigiManzil
Description: DigiManzil scroll-motion creative studio WordPress theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: digimanzil
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&display=swap');


:root {
  --bg: #0a0a0b;
  --bg-soft: #111114;
  --bg-card: #16161a;
  --ink: #f5f5f4;
  --ink-soft: #a1a1aa;
  --ink-dim: #52525b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #f97316;
  --accent-soft: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --emerald: #10b981;
  --sky: #0ea5e9;
  --rose: #f43f5e;
  --amber: #f59e0b;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: 'ss01' on;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  z-index: 100;
  transition: width 0.1s linear;
}

/* Section reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 40s linear infinite;
}

/* Number ticker */
@keyframes count-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #fbbf24 50%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow */
.glow-accent {
  box-shadow: 0 0 80px var(--accent-glow);
}

/* Grain overlay */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Link underline animation */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover::after {
  width: 100%;
}

/* Chapter number pulse */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Hero text mask reveal */
@keyframes mask-reveal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.mask-reveal {
  display: inline-block;
  overflow: hidden;
}
.mask-reveal > span {
  display: inline-block;
  animation: mask-reveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Card hover lift */
.card-lift {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease, background 0.5s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
}

/* Magnetic button */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-magnetic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.btn-magnetic:hover::before {
  transform: translateY(0);
}
.btn-magnetic:hover {
  color: var(--bg);
}


/* Premium scroll-driven motion */
@keyframes hero-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, 12vh, 0) scale(1.08); }
}
@keyframes scroll-fade {
  0% { opacity: 1; transform: translateY(0); }
  35% { opacity: .72; transform: translateY(-3vh); }
  100% { opacity: 0; transform: translateY(-12vh); }
}
@keyframes view-rise {
  0% { opacity: 0; transform: translateY(70px) scale(.97); }
  18%, 72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: .15; transform: translateY(-35px) scale(1.01); }
}
@keyframes image-breathe {
  0% { transform: scale(1.12); }
  50% { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.scroll-hero-bg {
  animation: hero-drift linear both;
  animation-timeline: scroll(root);
  animation-range: 0 70vh;
}
.scroll-hero-content {
  animation: scroll-fade linear both;
  animation-timeline: scroll(root);
  animation-range: 0 75vh;
}
.scroll-view {
  animation: view-rise linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 55%;
}
.scroll-image {
  animation: image-breathe linear both;
  animation-timeline: view();
  animation-range: entry 0% cover 100%;
}
@supports not (animation-timeline: view()) {
  .scroll-view, .scroll-image, .scroll-hero-bg, .scroll-hero-content { animation: none; }
}
.motion-line { transform-origin: left center; transition: transform 1s cubic-bezier(.16,1,.3,1); }
.motion-line:hover { transform: scaleX(1.12); }
.section-number { transition: color .4s ease, transform .5s cubic-bezier(.16,1,.3,1); }
.section-number:hover { color: var(--ink); transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
