/* ======================================================
   IDEN.STUDIO — v2 with Apple-style motion scrolling
   ====================================================== */

:root {
    --bg-color: #050505;
    --bg-elev: #080808;
    --text-main: #F5F5F7;
    --text-dim: #86868B;
    --text-mute: #444;
    --accent: #A855F7;
    --accent-2: #3B82F6;
    --accent-3: #FDE047;
    --line: rgba(255, 255, 255, 0.05);
    --line-strong: rgba(255, 255, 255, 0.1);
    --grad-iris: linear-gradient(135deg, #A855F7, #3B82F6, #FDE047);
    --grad-iris-2: linear-gradient(135deg, var(--accent), var(--accent-2));
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Lenis smooth scroll requires this */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

::selection { background: rgba(168, 85, 247, 0.4); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }


/* ======================================================
   SCROLL PROGRESS BAR (top of page)
   ====================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    z-index: 200;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--grad-iris);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
    transition: width 0.1s linear;
}


/* ======================================================
   NAVIGATION
   ====================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transition: padding 0.4s var(--ease);
}

.main-nav.scrolled { padding: 14px 40px; }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad-iris);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
    position: relative;
}

.nav-logo::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), transparent 60%);
}

.nav-dot {
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; gap: 40px; }

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--grad-iris);
    transition: width 0.4s var(--ease);
}

.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 10px 22px;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--grad-iris-2);
    color: #fff;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.35);
}

@media (max-width: 820px) {
    .nav-links { display: none; }
    .main-nav { padding: 16px 20px; }
}


/* ======================================================
   HERO
   ====================================================== */
.hero-section {
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(59, 130, 246, 0.1) 40%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    animation: heroFloat 12s ease-in-out infinite alternate;
    z-index: 0;
    will-change: transform;
}

@keyframes heroFloat {
    0%   { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-45%, -55%) scale(1.1); }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hero-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(3.5rem, 9vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    margin: 0;
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-dim);
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 60px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-num {
    font-family: 'Urbanist', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    z-index: 1;
}

.hero-scroll i { animation: scrollBounce 2s ease-in-out infinite; }

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50%      { transform: translateY(8px); opacity: 1; }
}

@media (max-width: 720px) {
    .hero-stats { gap: 30px; margin-top: 50px; }
    .stat-num { font-size: 1.8rem; }
}


/* ======================================================
   SECTION TITLES (shared)
   ====================================================== */
.section-eyebrow {
    display: block;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 30px;
    color: var(--text-main);
    line-height: 1.05;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 50px;
    line-height: 1.6;
}


/* ======================================================
   SERVICES
   ====================================================== */
.services-section {
    padding: 150px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    padding: 50px 30px;
    border-radius: 24px;
    transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.025);
}

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

.service-card .icon {
    font-size: 2.5rem;
    background: var(--grad-iris-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    display: block;
}

.service-card h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.service-card p {
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 28px;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.service-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}

.service-list li::before {
    content: '→';
    color: var(--accent);
    font-weight: 600;
}

.service-card:hover .service-list li { color: var(--text-main); }


/* ======================================================
   MANIFESTO — word-by-word reveal at scroll
   ====================================================== */
.manifesto-section {
    padding: 200px 20px;
    text-align: center;
    position: relative;
}

.manifesto-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.manifesto-text {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(1.6rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 30px 0 0;
}

.manifesto-text .word {
    display: inline-block;
    margin-right: 0.25em;
    color: rgba(245, 245, 247, 0.15); /* faded by default */
    transition: color 0.2s ease;
    will-change: color;
}

.manifesto-text .word.is-lit {
    color: var(--text-main);
}

.manifesto-text .word.is-iris {
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ======================================================
   SHOWCASE — Apple-style stacked cards with pinning
   ====================================================== */
.showcase-section {
    /* Big height so we can scrub through cards while pinning */
    height: 400vh;
    position: relative;
    background: linear-gradient(to bottom, var(--bg-color) 0%, #0a0612 50%, var(--bg-color) 100%);
}

.showcase-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 20px 20px;
}

.showcase-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.stack-container {
    position: relative;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    height: 480px;
}

.stack-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    transform-origin: center top;
    will-change: transform, opacity;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.stack-card[data-card="1"] { z-index: 3; }
.stack-card[data-card="2"] { z-index: 2; }
.stack-card[data-card="3"] { z-index: 1; }

.stack-card-num {
    position: absolute;
    top: 32px;
    right: 36px;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.stack-card-content h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stack-card-content p {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 420px;
}

.stack-card-metrics {
    display: flex;
    gap: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.stack-card-metrics > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-num {
    font-family: 'Urbanist', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--grad-iris-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.metric-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.stack-card-visual {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Visual 1 — Orbits */
.visual-orbit {
    width: 280px;
    height: 280px;
    position: relative;
}

.orbit {
    position: absolute;
    border: 1px solid;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbitSpin linear infinite;
}

.orbit-1 {
    width: 280px;
    height: 280px;
    border-color: rgba(168, 85, 247, 0.3);
    animation-duration: 20s;
}

.orbit-2 {
    width: 200px;
    height: 200px;
    border-color: rgba(59, 130, 246, 0.4);
    animation-duration: 14s;
    animation-direction: reverse;
}

.orbit-3 {
    width: 120px;
    height: 120px;
    border-color: rgba(253, 224, 71, 0.4);
    animation-duration: 10s;
}

.orbit::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 16px currentColor;
}

.orbit-1::before { color: #A855F7; }
.orbit-2::before { color: #3B82F6; }
.orbit-3::before { color: #FDE047; }

.orbit-core {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-iris);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes orbitSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.15); }
}

/* Visual 2 — Bars */
.visual-bars {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 240px;
}

.visual-bars .bar {
    width: 28px;
    height: var(--h);
    background: var(--grad-iris);
    border-radius: 8px;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.3);
    animation: barRise 2s var(--ease) infinite alternate;
}

.visual-bars .bar:nth-child(1) { animation-delay: 0s; }
.visual-bars .bar:nth-child(2) { animation-delay: 0.15s; }
.visual-bars .bar:nth-child(3) { animation-delay: 0.3s; }
.visual-bars .bar:nth-child(4) { animation-delay: 0.45s; }
.visual-bars .bar:nth-child(5) { animation-delay: 0.6s; }
.visual-bars .bar:nth-child(6) { animation-delay: 0.75s; }

@keyframes barRise {
    0%   { transform: scaleY(0.8); }
    100% { transform: scaleY(1); }
}

/* Visual 3 — Grid */
.visual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: 260px;
}

.visual-grid .dot {
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--grad-iris);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
    animation: dotBlink 3s ease-in-out infinite;
}

.visual-grid .dot:nth-child(1)  { animation-delay: 0.0s; }
.visual-grid .dot:nth-child(2)  { animation-delay: 0.1s; }
.visual-grid .dot:nth-child(3)  { animation-delay: 0.2s; }
.visual-grid .dot:nth-child(4)  { animation-delay: 0.3s; }
.visual-grid .dot:nth-child(5)  { animation-delay: 0.4s; }
.visual-grid .dot:nth-child(6)  { animation-delay: 0.5s; }
.visual-grid .dot:nth-child(7)  { animation-delay: 0.6s; }
.visual-grid .dot:nth-child(8)  { animation-delay: 0.7s; }
.visual-grid .dot:nth-child(9)  { animation-delay: 0.8s; }
.visual-grid .dot:nth-child(10) { animation-delay: 0.9s; }
.visual-grid .dot:nth-child(11) { animation-delay: 1.0s; }
.visual-grid .dot:nth-child(12) { animation-delay: 1.1s; }
.visual-grid .dot:nth-child(13) { animation-delay: 1.2s; }
.visual-grid .dot:nth-child(14) { animation-delay: 1.3s; }
.visual-grid .dot:nth-child(15) { animation-delay: 1.4s; }
.visual-grid .dot:nth-child(16) { animation-delay: 1.5s; }

@keyframes dotBlink {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1); }
}

@media (max-width: 900px) {
    .showcase-section { height: auto; }
    .showcase-sticky {
        position: relative;
        height: auto;
        padding: 100px 20px;
    }
    .stack-container { height: auto; display: flex; flex-direction: column; gap: 24px; }
    .stack-card {
        position: relative;
        height: auto;
        grid-template-columns: 1fr;
        padding: 40px 30px;
        gap: 30px;
    }
    .stack-card-visual { height: 240px; }
    .visual-orbit { width: 220px; height: 220px; }
    .orbit-1 { width: 220px; height: 220px; }
    .orbit-2 { width: 160px; height: 160px; }
    .orbit-3 { width: 100px; height: 100px; }
}


/* ======================================================
   HORIZONTAL SCROLL — Apple Mac Pro style
   ====================================================== */
.horizontal-section {
    background: var(--bg-color);
    position: relative;
}

.horizontal-intro {
    padding: 120px 20px 60px;
    text-align: center;
}

.horizontal-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 40px;
    animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintBounce {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.horizontal-pin {
    position: relative;
    height: 500vh; /* 4 panels × ~125vh = horizontal track length */
    overflow: hidden;
}

.horizontal-track {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 400vw; /* 4 panels */
    display: flex;
    align-items: center;
    will-change: transform;
}

.horizontal-panel {
    flex: 0 0 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 8vw;
    position: relative;
}

.panel-num {
    font-family: 'Urbanist', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.horizontal-panel h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    margin: 0 0 30px;
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 0.95;
}

.horizontal-panel p {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--text-dim);
    max-width: 540px;
    line-height: 1.55;
    margin: 0;
}

.panel-visual {
    position: absolute;
    right: 8vw;
    top: 50%;
    transform: translateY(-50%);
    width: 32vw;
    max-width: 420px;
    aspect-ratio: 1;
    background: var(--g);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 820px) {
    .horizontal-pin { height: auto; overflow: visible; }
    .horizontal-track {
        position: relative;
        top: auto;
        height: auto;
        width: 100%;
        flex-direction: column;
    }
    .horizontal-panel {
        flex: none;
        width: 100%;
        height: auto;
        padding: 80px 20px;
        align-items: center;
        text-align: center;
    }
    .panel-visual { display: none; }
}


/* ======================================================
   PORTFOLIO — Video previews with hover accent
   ====================================================== */
.portfolio-section {
    padding: 150px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.portfolio-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    border: 1px solid var(--line);
    background-color: #0a0a0a;
    will-change: transform;
    transition: transform 0.5s var(--ease),
                border-color 0.5s var(--ease),
                box-shadow 0.5s var(--ease);
}

/* Media wrapper (holds video + fallback + pill) */
.portfolio-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

/* The video itself — always playing softly, lifts up at hover */
.portfolio-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
                filter 0.6s ease,
                opacity 0.5s ease;
    /* Low-key by default: slight desaturation + dim brightness */
    filter: saturate(0.7) brightness(0.7);
    will-change: transform, filter;
    opacity: 0;
    background: #0a0a0a;
}

.portfolio-video.is-ready { opacity: 1; }

/* Fallback gradient — shown if video fails or isn't ready */
.portfolio-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.25), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.2), transparent 55%),
        linear-gradient(135deg, #0e0a1a 0%, #0a0a0a 100%);
    transition: opacity 0.5s ease;
    z-index: 0;
}

.portfolio-item.video-loaded .portfolio-fallback { opacity: 0; }

/* "Vidéo" pill in top-right of each card */
.portfolio-pill {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    z-index: 3;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.portfolio-item.video-loaded .portfolio-pill {
    opacity: 1;
    transform: translateY(0);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

/* Overlay (project name + category) */
.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95) 20%, rgba(5, 5, 5, 0.6) 60%, transparent 100%);
    text-align: left;
    box-sizing: border-box;
    transform: translateY(30px);
    opacity: 0.7;
    transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
    z-index: 2;
}

.portfolio-overlay h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 8px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.02em;
    transform: translateY(0);
    transition: transform 0.5s var(--ease);
}

.portfolio-overlay span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---- HOVER ACCENT — the "wake up" moment ---- */
.portfolio-item:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 30px 60px -20px rgba(168, 85, 247, 0.25),
                0 0 0 1px rgba(168, 85, 247, 0.1);
}

.portfolio-item:hover .portfolio-video {
    transform: scale(1.06);
    filter: saturate(1.1) brightness(1);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay h3 {
    transform: translateY(-2px);
}

.portfolio-item:hover .portfolio-pill {
    color: var(--text-main);
    border-color: rgba(168, 85, 247, 0.4);
}

/* Save CPU when off-screen (JS toggles this class) */
.portfolio-item.is-offscreen .portfolio-video {
    filter: saturate(0.5) brightness(0.5);
}


/* ======================================================
   PROCESS
   ====================================================== */
.process-section {
    padding: 150px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 60px;
    text-align: left;
}

.process-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    padding: 40px 30px;
    border-radius: 24px;
    transition: transform 0.4s ease, border-color 0.4s ease;
    position: relative;
}

.process-step:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.3);
}

.process-num {
    display: block;
    font-family: 'Urbanist', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
}

.process-step h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.4rem;
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.process-step p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px;
}

.process-meta {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-mute);
    padding-top: 20px;
    border-top: 1px solid var(--line);
}


/* ======================================================
   TESTIMONIALS
   ====================================================== */
.testimonials-section {
    padding: 150px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
    text-align: left;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    padding: 40px 35px;
    border-radius: 24px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.3);
}

.quote-icon {
    font-size: 1.5rem;
    background: var(--grad-iris-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    display: block;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0 0 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad-iris);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
    position: relative;
    flex-shrink: 0;
}

.author-avatar::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-color);
}

.author-info { display: flex; flex-direction: column; gap: 2px; }

.author-name {
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
}


/* ======================================================
   FAQ
   ====================================================== */
.faq-section {
    padding: 150px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.faq-list { margin-top: 60px; text-align: left; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    transition: color 0.3s ease;
}

.faq-question:hover { color: var(--accent); }

.faq-question i {
    font-size: 0.9rem;
    color: var(--accent);
    transition: transform 0.4s var(--ease);
    flex-shrink: 0;
    margin-left: 20px;
}

.faq-item.is-open .faq-question i { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease), padding 0.4s ease;
    padding: 0;
}

.faq-item.is-open .faq-answer {
    max-height: 300px;
    padding: 0 0 28px;
}

.faq-answer p {
    color: var(--text-dim);
    line-height: 1.7;
    margin: 0;
    max-width: 720px;
}


/* ======================================================
   CONTACT
   ====================================================== */
.contact-section {
    padding: 120px 20px;
    text-align: center;
    background: linear-gradient(to top, #080808, var(--bg-color));
    position: relative;
}

.contact-subtitle {
    color: var(--text-dim);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin: 0 auto 50px;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 20px 50px;
    font-family: 'Urbanist', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: var(--grad-iris-2);
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.4);
}

.contact-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 60px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.contact-meta span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-meta i { color: var(--accent); font-size: 0.9rem; }


/* ======================================================
   FOOTER
   ====================================================== */
.main-footer {
    padding: 80px 40px 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
}

.footer-brand {
    font-family: 'Urbanist', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.footer-dot {
    background: var(--grad-iris);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
}

.footer-col h4 {
    font-family: 'Urbanist', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin: 0 0 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 0.95rem;
    color: var(--text-main);
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover { color: var(--accent); }
.footer-col a i { font-size: 0.7rem; opacity: 0.6; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-mute);
}

.footer-bottom p { margin: 0; }

@media (max-width: 820px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}

@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .main-footer { padding: 60px 20px 30px; }
}


/* ======================================================
   ACCESSIBILITY
   ====================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .showcase-section { height: auto; }
    .showcase-sticky { position: relative; height: auto; padding: 100px 20px; }
    .stack-container { height: auto; display: flex; flex-direction: column; gap: 24px; }
    .stack-card {
        position: relative;
        height: auto;
        grid-template-columns: 1fr;
        opacity: 1 !important;
        transform: none !important;
    }
    .horizontal-pin { height: auto; overflow: visible; }
    .horizontal-track {
        position: relative;
        height: auto;
        width: 100%;
        flex-direction: column;
        transform: none !important;
    }
    .horizontal-panel { flex: none; width: 100%; height: auto; padding: 80px 20px; }
}
