/* Advanced Animations and Styles for Evan Creative Agency */

/* Custom CSS Variables */
:root {
    --primary: #4B2E78;
    --secondary: #F9CB5B;
    --dark-purple: #3a2358;
    --darker-purple: #2a1a48;
    --light-purple: #5a3888;
}

/* Parallax Background Text */
#about-parallax-text {
    font-size: 15rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.05);
    user-select: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Magnetic Button Styles */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s ease;
}

/* Service Cards Interactive Styles */
.service-card-main {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.service-sublist {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(249, 203, 91, 0.2);
}

.service-sublist.hidden {
    display: none;
}

/* Enhanced Hover Effects */
.service-card-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 203, 91, 0.1), transparent);
    transition: left 0.5s;
}

.service-card-main:hover::before {
    left: 100%;
}

/* Testimonials Slider Styles */
#testimonials-slider {
    position: relative;
    overflow: hidden;
}

#testimonials-grid {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

@media (min-width: 768px) {
    #testimonials-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Testimonial Card Enhanced Styles */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 120px;
    color: rgba(249, 203, 91, 0.1);
    font-family: Georgia, serif;
}

/* Portfolio Item Enhanced Hover */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249, 203, 91, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* Navigation Button Styles */
#testimonial-prev,
#testimonial-next {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.2);
}

#testimonial-prev:hover,
#testimonial-next:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(249, 203, 91, 0.3);
}

/* Slider Indicator Styles */
#testimonial-indicators button {
    transition: all 0.3s ease;
}

#testimonial-indicators button:hover {
    transform: scale(1.2);
}

/* Enhanced Counter Animation */
.counter {
    position: relative;
}

.counter::after {
    content: '+';
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 0.5em;
    color: var(--secondary);
    opacity: 0;
    transition: opacity 0.3s;
}

.counter:hover::after {
    opacity: 1;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    #about-parallax-text {
        font-size: 8rem;
    }
    
    #testimonials-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .testimonial-card {
        margin: 0 1rem;
    }
    
    #testimonial-prev,
    #testimonial-next {
        display: none;
    }
    
    .service-card-main {
        min-height: 250px;
    }
}

/* About Section Floating Element Animation */
@keyframes float3d {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: translateY(-10px) rotateY(90deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-20px) rotateY(180deg) rotateX(10deg);
    }
    75% {
        transform: translateY(-10px) rotateY(270deg) rotateX(5deg);
    }
}

#about-floating-element {
    animation: float3d 6s ease-in-out infinite;
}

/* Testimonials Slider Styles */
#testimonials-slider {
    position: relative;
    overflow: hidden;
}

#testimonials-grid {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

@media (min-width: 768px) {
    #testimonials-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Enhanced Service Card Hover Effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 203, 91, 0.1), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

/* Testimonial Card Enhanced Styles */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 120px;
    color: rgba(249, 203, 91, 0.1);
    font-family: Georgia, serif;
}

/* Portfolio Item Enhanced Hover */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249, 203, 91, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* Navigation Button Styles */
#testimonial-prev,
#testimonial-next {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.2);
}

#testimonial-prev:hover,
#testimonial-next:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(249, 203, 91, 0.3);
}

/* Slider Indicator Styles */
#testimonial-indicators button {
    transition: all 0.3s ease;
}

#testimonial-indicators button:hover {
    transform: scale(1.2);
}

/* Core Values Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.service-card:hover {
    animation: pulse 2s infinite;
}

/* Enhanced Counter Animation */
.counter {
    position: relative;
}

.counter::after {
    content: '+';
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 0.5em;
    color: var(--secondary);
    opacity: 0;
    transition: opacity 0.3s;
}

.counter:hover::after {
    opacity: 1;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    #testimonials-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .testimonial-card {
        margin: 0 1rem;
    }
    
    #testimonial-prev,
    #testimonial-next {
        display: none;
    }
}

/* Advanced Keyframe Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(2deg);
    }
    66% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-15px) translateX(10px);
    }
    50% {
        transform: translateY(-25px) translateX(-10px);
    }
    75% {
        transform: translateY(-10px) translateX(5px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px) rotateX(30deg);
        transform-origin: center bottom;
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) rotateY(45deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) rotateY(-45deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(249, 203, 91, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(249, 203, 91, 0.6);
    }
}

@keyframes geometric-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark-purple) 50%, var(--darker-purple) 100%);
}

/* Geometric Background Elements */
.geometric-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.geometric-shape:nth-child(2) {
    animation: float-delayed 8s ease-in-out infinite;
}

.geometric-shape:nth-child(3) {
    animation: geometric-rotate 20s linear infinite;
}

/* 3D Logo Styles */
#logo-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    background: linear-gradient(45deg, var(--secondary), #FFD700);
    box-shadow: 
        0 20px 40px rgba(249, 203, 91, 0.3),
        0 0 80px rgba(249, 203, 91, 0.1);
    animation: pulse-glow 3s ease-in-out infinite;
}

#logo-3d::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, var(--secondary), transparent);
    border-radius: inherit;
    z-index: -1;
    animation: shimmer 3s linear infinite;
}

/* Enhanced Navigation */
nav {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(249, 203, 91, 0.1);
    transition: all 0.3s ease;
}

nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section Enhancements */
.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--secondary) 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(249, 203, 91, 0.3);
}

.hero-subtitle {
    text-shadow: 0 0 20px rgba(249, 203, 91, 0.2);
}

.hero-cta {
    background: linear-gradient(45deg, var(--secondary), #FFD700);
    box-shadow: 
        0 10px 30px rgba(249, 203, 91, 0.4),
        0 0 60px rgba(249, 203, 91, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.hero-cta:hover::before {
    left: 100%;
}

/* Service Cards */
.service-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.1);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(249, 203, 91, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(249, 203, 91, 0.1);
    border-color: rgba(249, 203, 91, 0.3);
}

/* Portfolio Items */
.portfolio-item {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.1);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(249, 203, 91, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item img {
    transition: transform 0.7s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* Filter Buttons */
.filter-btn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--secondary), transparent);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.filter-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Testimonial Cards */
.testimonial-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.1);
    transition: all 0.5s ease;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 80px;
    color: var(--secondary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 60px rgba(249, 203, 91, 0.1);
    border-color: rgba(249, 203, 91, 0.2);
}

/* Contact Form */
#contact input,
#contact textarea {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(249, 203, 91, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

#contact input:focus,
#contact textarea:focus {
    border-color: var(--secondary);
    box-shadow: 
        0 0 20px rgba(249, 203, 91, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Footer */
footer {
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(249, 203, 91, 0.1);
}

footer a {
    position: relative;
    transition: all 0.3s ease;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--darker-purple);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 6px;
    border: 2px solid var(--darker-purple);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary);
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .service-card,
    .portfolio-item,
    .testimonial-card {
        margin-bottom: 1rem;
    }
    
    #contact .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .geometric-shape,
    nav,
    footer {
        display: none;
    }
    
    body {
        /* keep site theme even with reduced motion */
        background: linear-gradient(135deg, var(--primary) 0%, var(--dark-purple) 50%, var(--darker-purple) 100%) !important;
        color: #fff !important;
    }
}


/* Premium Expertise Cards */
.expertise-section{
  padding: 80px 5%;
  text-align: center;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(255,255,255,0.08), transparent 60%),
              radial-gradient(900px 500px at 80% 30%, rgba(255,215,0,0.08), transparent 55%),
              linear-gradient(135deg, rgba(60,28,90,0.85), rgba(75,38,115,0.85));
}

.expertise-section .section-title{
  color:#fff;
  font-size: 34px;
  letter-spacing: .5px;
  margin-bottom: 46px;
  text-transform: uppercase;
  font-weight: 800;
}

.expertise-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.expertise-card{
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 38px 30px 28px;
  text-align: left;

  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,215,0,0.38);

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    0 18px 40px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.10);

  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.expertise-card::before{
  content:"";
  position:absolute;
  inset:-40% -40% auto -40%;
  height: 220px;
  transform: rotate(-10deg);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), transparent 55%);
  pointer-events:none;
}

.expertise-card:hover{
  transform: translateY(-10px);
  border-color: rgba(255,215,0,0.65);
  box-shadow:
    0 26px 60px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.expertise-card .icon{
  font-size: 40px;
  margin-bottom: 14px;
}

.expertise-card h3{
  color:#ffd700;
  margin: 0 0 16px;
  font-size: 22px;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-weight: 800;
}

.expertise-card ul{
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex: 1 1 auto;
}

.expertise-card li{
  color: rgba(255,255,255,0.86);
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
}

/* Button to portfolio filter */
.expertise-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,215,0,0.45);
  color: #fff;
  text-decoration:none;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;

  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.expertise-btn:hover{
  transform: translateY(-2px);
  background: rgba(255,215,0,0.10);
  border-color: rgba(255,215,0,0.70);
}

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  filter: blur(4px);
  transition:
    opacity .7s ease,
    transform .7s cubic-bezier(.2,.8,.2,1),
    filter .7s ease;
  transition-delay: var(--d, 0ms);
}

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


/* Reveal gating so content never disappears if JS fails */
.reveal{opacity:1;transform:none;filter:none;}
.js .reveal{opacity:0;transform:translateY(18px) scale(.98);filter:blur(4px);transition:opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), filter .7s ease;transition-delay:var(--d,0ms);} 
.js .reveal.is-visible{opacity:1;transform:translateY(0) scale(1);filter:blur(0);} 



/* Contact Section (Dark) */
.contact-section-dark{
  padding: 90px 0;
  background:
    radial-gradient(900px 450px at 15% 20%, rgba(249,203,91,0.10), transparent 60%),
    radial-gradient(700px 350px at 85% 25%, rgba(255,255,255,0.08), transparent 55%),
    linear-gradient(135deg, rgba(42,26,72,0.96), rgba(58,35,88,0.92));
  color: #fff;
}
.contact-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  backdrop-filter: blur(14px) saturate(140%);
}
.contact-input{
  width:100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color:#fff;
  outline:none;
}
.contact-input::placeholder{ color: rgba(255,255,255,0.55); }
.contact-input:focus{ border-color: rgba(249,203,91,0.55); box-shadow: 0 0 0 3px rgba(249,203,91,0.15); }
.btn-primary-grad{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: linear-gradient(135deg, var(--secondary), #ffd978);
  color: #23143a;
  border: 0;
  cursor:pointer;
  transition: transform .2s ease, filter .2s ease;
}
.btn-primary-grad:hover{ transform: translateY(-2px); filter: brightness(1.02); }

.portfolio-cta-section{
  padding: 80px 0;
  text-align:center;
  background:
    radial-gradient(1100px 550px at 25% 10%, rgba(255,255,255,0.08), transparent 60%),
    radial-gradient(850px 420px at 80% 35%, rgba(249,203,91,0.12), transparent 55%),
    linear-gradient(135deg, rgba(58,35,88,0.92), rgba(42,26,72,0.96));
}
