/* ============================================
   ADVANCED ANIMATIONS
   Scarlett Davies - Premium Interactions
   ============================================ */

/* Parallax Layers */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    inset: -20%;
    will-change: transform;
}

.parallax-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    display: inline-block;
    transition: transform 0.3s var(--ease-out);
}

/* Text Split Animation */
.split-text .word {
    display: inline-block;
    overflow: hidden;
}

.split-text .char {
    display: inline-block;
    transform: translateY(105%);
    transition: transform 0.5s var(--ease-out);
}

.split-text.animated .char {
    transform: translateY(0);
}

/* Marquee (legacy - kept for other pages if needed) */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 20px 0;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-weight: 300;
    color: var(--text-light);
    padding: 0 24px;
    white-space: nowrap;
}

.marquee-item .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
    margin: 0 16px;
    vertical-align: middle;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Decorative blobs - hidden by default, too template-like */
.organic-blob {
    display: none;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

/* Horizontal Scroll Section */
.horizontal-scroll-section {
    overflow: hidden;
    position: relative;
}

.horizontal-scroll-track {
    display: flex;
    gap: 30px;
    will-change: transform;
}

.horizontal-scroll-item {
    flex-shrink: 0;
    width: 400px;
}

/* Number Counter */
.counter-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
    display: inline-block;
}

/* Circle Progress */
.circle-progress {
    width: 120px;
    height: 120px;
    position: relative;
}

.circle-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-progress circle {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.circle-progress .circle-bg {
    stroke: var(--stone);
}

.circle-progress .circle-fill {
    stroke: var(--gold);
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 1.5s var(--ease-out);
}

.circle-progress .circle-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--charcoal);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--gold);
    width: 0%;
    z-index: 10001;
    transition: width 0.1s linear;
}

/* Image Hover Distortion */
.hover-distort {
    position: relative;
    overflow: hidden;
}

.hover-distort img {
    transition: transform 0.6s var(--ease-out);
}

.hover-distort:hover img {
    transform: scale(1.03);
}

/* Stagger Grid Animation */
.stagger-grid > * {
    opacity: 0;
    transform: translateY(40px);
}

.stagger-grid.animated > *:nth-child(1) { transition-delay: 0s; }
.stagger-grid.animated > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-grid.animated > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-grid.animated > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-grid.animated > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-grid.animated > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-grid.animated > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-grid.animated > *:nth-child(8) { transition-delay: 0.7s; }
.stagger-grid.animated > *:nth-child(9) { transition-delay: 0.8s; }
.stagger-grid.animated > *:nth-child(10) { transition-delay: 0.9s; }
.stagger-grid.animated > *:nth-child(11) { transition-delay: 1.0s; }
.stagger-grid.animated > *:nth-child(12) { transition-delay: 1.1s; }

.stagger-grid.animated > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

/* Luxury Gold Line Decorations */
.gold-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.gold-line-long {
    width: 120px;
}

.gold-line-center {
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Morphing Shape */
.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 50% 70% 50%; }
    75% { border-radius: 40% 60% 50% 40% / 60% 40% 60% 30%; }
}

/* Gradient Text — disabled, too template-like */
.gradient-text {
    color: var(--gold);
}

/* Luxury Border Animation */
.luxury-border {
    position: relative;
}

.luxury-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, var(--gold), transparent, var(--gold));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

.luxury-border:hover::before {
    opacity: 1;
}

/* Smooth Scale on Scroll */
.scale-on-scroll {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 1.2s var(--ease-out), opacity 0.8s var(--ease-out);
}

.scale-on-scroll.in-view {
    transform: scale(1);
    opacity: 1;
}

/* Rotating Badge */
.rotating-badge {
    animation: rotateBadge 15s linear infinite;
}

@keyframes rotateBadge {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Page Transition */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--charcoal);
    z-index: 99998;
    transform: scaleY(0);
    transform-origin: bottom;
}

.page-transition.entering {
    animation: pageEnter 0.6s var(--ease-in-out) forwards;
}

@keyframes pageEnter {
    0% { transform: scaleY(0); transform-origin: bottom; }
    50% { transform: scaleY(1); transform-origin: bottom; }
    50.01% { transform-origin: top; }
    100% { transform: scaleY(0); transform-origin: top; }
}

/* Shine Effect */
.shine-effect {
    transition: border-color 0.3s var(--ease-out);
}

.shine-effect:hover {
    border-color: var(--gold);
}

/* Dot Pattern Background */
.dot-pattern {
    background-image: radial-gradient(circle, var(--stone-dark) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Treatment Plan Floating Badge */
.treatment-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.2);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dark);
    transition: all 0.3s;
}

.treatment-badge:hover {
    background: rgba(201, 169, 110, 0.15);
}
