/* =========================================
   MÄO AGENCY — Premium Effects Layer
   Gradient orbs, grain texture, capability tags,
   vertical timeline, ambient glow
   Inspired by: Apple, Linear, Awwwards winners
   ========================================= */

/* ─────────────────────────────────
   1. GRAIN TEXTURE OVERLAY
   Subtle film grain across the entire page
   ───────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ─────────────────────────────────
   2. GRADIENT ORBS — Floating ambient light
   Warm earthy tones, soft blurs
   ───────────────────────────────── */
.orb-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0;
    transition: opacity 2s ease;
    will-change: transform;
}

.orb.visible { opacity: 1; }

.orb--1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(142,131,114,0.12) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb--2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196,183,161,0.10) 0%, transparent 70%);
    top: 40%;
    left: -8%;
    animation: orbFloat2 30s ease-in-out infinite;
}

.orb--3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(142,131,114,0.08) 0%, transparent 70%);
    bottom: 5%;
    right: 10%;
    animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 60px) scale(1.05); }
    66% { transform: translate(30px, -30px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -40px) scale(1.08); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-30px, -50px) scale(1.03); }
    70% { transform: translate(20px, 30px) scale(0.97); }
}

/* ─────────────────────────────────
   3. SECTION GLOW — Ambient light on sections
   Positioned pseudo-elements for depth
   ───────────────────────────────── */
.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 200px;
    background: radial-gradient(ellipse, rgba(142,131,114,0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

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

.services::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(142,131,114,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─────────────────────────────────
   4. CAPABILITY TAGS — Pill-style labels
   Adapted from Ariza case study
   ───────────────────────────────── */
.capability-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.cap-tag {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-light);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(12px);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cap-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.cap-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142,131,114,0.15);
}

.cap-tag:active,
.cap-tag.cap-tag--active {
    border-color: var(--color-accent);
    color: var(--color-text);
    background: rgba(142,131,114,0.08);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(142,131,114,0.2);
    transform: translateY(0);
}

.cap-tag--highlight {
    border-color: var(--color-accent);
    color: var(--color-text);
    background: rgba(142,131,114,0.08);
}

/* ─────────────────────────────────
   5. VERTICAL TIMELINE — Process section
   Scroll-driven line reveal with dots
   ───────────────────────────────── */
.v-timeline-section {
    position: relative;
    overflow: hidden;
}

/* Ambient glow behind timeline */
.v-timeline-section::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(142,131,114,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.v-timeline-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.v-timeline-header .section-eyebrow {
    color: var(--color-text-light);
}

.v-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 60px;
}

/* The vertical track line */
.v-timeline-track {
    position: absolute;
    top: 0;
    left: 29px;
    width: 1px;
    height: 100%;
    background: rgba(0,0,0,0.08);
}

.v-timeline-track-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--color-accent) 0%, rgba(142,131,114,0.2) 100%);
    transition: height 0.1s linear;
}

/* Timeline items */
.v-timeline-item {
    position: relative;
    padding-bottom: 5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.v-timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.v-timeline-item:last-child {
    padding-bottom: 0;
}

/* The dot on the line */
.v-timeline-dot {
    position: absolute;
    left: -39px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid rgba(0,0,0,0.12);
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.v-timeline-item.visible .v-timeline-dot {
    border-color: var(--color-accent);
    background: var(--color-accent);
    box-shadow: 0 0 0 6px rgba(142,131,114,0.15);
}

/* Pulse animation on active dot */
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(142,131,114,0.15); }
    50% { box-shadow: 0 0 0 12px rgba(142,131,114,0.05); }
}

.v-timeline-item.visible .v-timeline-dot {
    animation: dotPulse 3s ease-in-out infinite;
}

.v-timeline-step-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    display: block;
}

.v-timeline-item h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.v-timeline-item p {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-width: 600px;
}

/* Tags within timeline items */
.v-timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.v-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    background: transparent;
}

/* ─────────────────────────────────
   5b. TIMELINE — Consultancy note
   Visual callout for the "you decide" moment
   ───────────────────────────────── */
.v-timeline-note {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    border-left: 2px solid var(--color-accent);
    background: rgba(142,131,114,0.04);
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
    max-width: 500px;
}

/* ─────────────────────────────────
   6. HERO ENHANCEMENTS
   Gradient mesh + animated lines
   ───────────────────────────────── */

/* Subtle horizontal light sweep across hero */
@keyframes heroSweep {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    z-index: 1;
    animation: heroSweep 8s ease-in-out infinite;
    pointer-events: none;
}

/* ─────────────────────────────────
   7. SMOOTH SECTION TRANSITIONS
   Gradient dividers between sections
   ───────────────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(142,131,114,0.3) 20%,
        rgba(142,131,114,0.5) 50%,
        rgba(142,131,114,0.3) 80%,
        transparent 100%
    );
    max-width: 80%;
    margin: 0 auto;
}

/* ─────────────────────────────────
   8. WORK SECTION — Hover glow
   ───────────────────────────────── */
.work-item .work-img-wrapper {
    position: relative;
    overflow: hidden;
}

.work-item .work-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.work-item:hover .work-img-wrapper::after {
    opacity: 1;
}

/* ─────────────────────────────────
   RESPONSIVE — Mobile
   ───────────────────────────────── */
@media (max-width: 768px) {
    /* Orbs — smaller and more subtle */
    .orb--1 { width: 300px; height: 300px; }
    .orb--2 { width: 250px; height: 250px; }
    .orb--3 { display: none; }

    /* Tags */
    .capability-tags {
        gap: 0.5rem;
        margin-top: var(--space-md);
    }

    .cap-tag {
        padding: 0.45rem 1.1rem;
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    /* Timeline */
    .v-timeline {
        padding-left: 40px;
    }

    .v-timeline-track {
        left: 15px;
    }

    .v-timeline-dot {
        left: -32px;
        width: 14px;
        height: 14px;
    }

    .v-timeline-item {
        padding-bottom: 2.25rem;
    }

    .v-timeline-item h3 {
        font-size: 1.2rem;
    }

    .v-timeline-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Grain — slightly less visible on mobile */
    body::before { opacity: 0.025; }
}

@media (max-width: 390px) {
    .v-timeline { padding-left: 32px; }
    .v-timeline-track { left: 11px; }
    .v-timeline-dot { left: -27px; width: 12px; height: 12px; }
}

/* ─────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .orb { animation: none !important; }
    .hero-bg::after { animation: none !important; }
    .v-timeline-item.visible .v-timeline-dot { animation: none !important; }
    body::before { display: none; }
}
