/* ============================================================
   THE VFX BRIDGE — Pipeline Training v2
   pipeline2.css
   ============================================================ */

/* ── Additional font face ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,200;0,300;0,600;0,700;0,800;0,900;1,300&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Page variables ────────────────────────────────────────── */
:root {
    --p2-accent:      #00d2ff;
    --p2-accent-dim:  rgba(0, 210, 255, 0.10);
    --p2-accent-glow: rgba(0, 210, 255, 0.25);
    --p2-amber:       #f0a500;
    --p2-amber-dim:   rgba(240, 165, 0, 0.10);
    --p2-glass:       rgba(255, 255, 255, 0.04);
    --p2-glass-hover: rgba(255, 255, 255, 0.08);
    --p2-border:      rgba(255, 255, 255, 0.09);
    --p2-border-cyan: rgba(0, 210, 255, 0.18);
    --p2-mono:        'DM Mono', monospace;
    --p2-display:     'Barlow Condensed', sans-serif;
    --p2-body:        'DM Sans', sans-serif;
}

/* ── Scroll-reveal system ──────────────────────────────────── */
.reveal {
    opacity: 0;
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal--up     { transform: translateY(44px); }
.reveal--left   { transform: translateX(-40px); }
.reveal--right  { transform: translateX(40px); }
.reveal--scale  { transform: scale(0.93); }
.reveal--fade   { transform: none; }

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Delay utilities */
.reveal-d1  { transition-delay: 0.08s; }
.reveal-d2  { transition-delay: 0.18s; }
.reveal-d3  { transition-delay: 0.28s; }
.reveal-d4  { transition-delay: 0.40s; }
.reveal-d5  { transition-delay: 0.52s; }
.reveal-d6  { transition-delay: 0.64s; }


/* ── Decorative background additions ───────────────────────── */
.p2-noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.p2-scan-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}


/* ── Hero ──────────────────────────────────────────────────── */
.p2-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 80px;
    position: relative;
    overflow: hidden;
}

.p2-hero-bg-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.p2-hero-bg-lines::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 210, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
}

.p2-hero-bg-lines::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6));
}

/* Animated diagonal accent line */
.p2-hero-slash {
    position: absolute;
    top: -10%;
    right: 8%;
    width: 2px;
    height: 130%;
    background: linear-gradient(to bottom, transparent 0%, var(--p2-accent) 40%, transparent 100%);
    opacity: 0.12;
    transform: rotate(12deg);
    transform-origin: top center;
}

.p2-hero-slash-2 {
    position: absolute;
    top: -10%;
    right: 14%;
    width: 1px;
    height: 130%;
    background: linear-gradient(to bottom, transparent 0%, var(--p2-accent) 50%, transparent 100%);
    opacity: 0.07;
    transform: rotate(12deg);
    transform-origin: top center;
}

.p2-hero-label {
    font-family: var(--p2-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--p2-accent);
    opacity: 0.85;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.p2-hero-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--p2-accent);
    opacity: 0.6;
}

.p2-hero-title {
    font-family: var(--p2-display);
    font-size: clamp(3.6rem, 8.5vw, 7.5rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
    color: #fff;
}

.p2-hero-title .p2-italic {
    font-style: italic;
    font-weight: 300;
    color: rgba(255,255,255,0.55);
}

.p2-hero-title .p2-cyan {
    color: var(--p2-accent);
}

.p2-hero-sub {
    font-family: var(--p2-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.65;
    max-width: 540px;
    margin-bottom: 0;
}

.p2-hero-cta-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 44px;
}

/* Scroll indicator */
.p2-scroll-cue {
    position: absolute;
    bottom: 40px;
    right: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.3;
    animation: p2-bob 2.4s ease-in-out infinite;
}

.p2-scroll-cue span {
    font-family: var(--p2-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.p2-scroll-cue i { font-size: 0.8rem; }

@keyframes p2-bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}


/* ── Stat panel ────────────────────────────────────────────── */
.p2-stat-strip {
    border-top: 1px solid var(--p2-border-cyan);
    border-bottom: 1px solid var(--p2-border-cyan);
    background: rgba(0, 210, 255, 0.035);
    padding: 40px 0;
    overflow: hidden;
}

.p2-stat-item {
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.p2-stat-item + .p2-stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: var(--p2-border-cyan);
}

.p2-stat-num {
    font-family: var(--p2-display);
    font-size: clamp(2.8rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--p2-accent);
    line-height: 1;
    display: block;
    letter-spacing: -0.02em;
}

.p2-stat-label {
    font-family: var(--p2-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.5;
    margin-top: 8px;
    display: block;
}


/* ── Section layout ────────────────────────────────────────── */
.p2-section {
    padding: 110px 0;
}

.p2-section--tight {
    padding: 80px 0;
}

.p2-section-divider {
    border: none;
    border-top: 1px solid var(--p2-border);
    margin: 0;
    opacity: 1;
}

.p2-eyebrow {
    font-family: var(--p2-mono);
    font-size: 0.70rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--p2-accent);
    opacity: 0.85;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.p2-eyebrow::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

.p2-section-title {
    font-family: var(--p2-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

.p2-section-title .dim {
    opacity: 0.35;
    font-weight: 300;
    font-style: italic;
}


/* ── Why section — two-column ───────────────────────────────── */
.p2-why-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    align-items: start;
}

.p2-body-text {
    font-family: var(--p2-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
    opacity: 0.7;
    margin-bottom: 1.2rem;
}

/* Metric box */
.p2-metric-box {
    background: var(--p2-glass);
    border: 1px solid var(--p2-border-cyan);
    border-radius: 20px;
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.p2-metric-row {
    padding: 28px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s;
    position: relative;
}

.p2-metric-row:last-child { border-bottom: none; }

.p2-metric-row:hover { background: var(--p2-glass-hover); }

.p2-metric-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--p2-accent);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.p2-metric-row:hover::before { transform: scaleY(1); }

.p2-metric-value {
    font-family: var(--p2-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--p2-accent);
    line-height: 1;
    display: block;
    letter-spacing: -0.02em;
}

.p2-metric-label {
    font-family: var(--p2-body);
    font-size: 0.82rem;
    opacity: 0.55;
    font-weight: 300;
    margin-top: 4px;
    display: block;
}


/* ── Pipeline flow stages ──────────────────────────────────── */
.p2-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
    margin-top: 60px;
}

/* Connecting rail */
.p2-pipeline-grid::before {
    content: '';
    position: absolute;
    top: 48px;
    left: calc(10% + 24px);
    right: calc(10% + 24px);
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--p2-border-cyan) 10%,
        var(--p2-border-cyan) 90%,
        transparent
    );
}

.p2-stage-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px 32px;
    position: relative;
    cursor: default;
}

/* Node circle */
.p2-stage-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,210,255,0.08), rgba(0,210,255,0.02));
    border: 1px solid var(--p2-border-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-bottom: 24px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                background 0.35s ease,
                border-color 0.35s ease;
}

.p2-stage-circle i {
    font-size: 1.7rem;
    color: var(--p2-accent);
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
}

.p2-stage-node:hover .p2-stage-circle {
    transform: translateY(-8px) scale(1.08);
    background: rgba(0, 210, 255, 0.14);
    border-color: var(--p2-accent);
    box-shadow: 0 20px 50px -10px rgba(0, 210, 255, 0.3),
                0 0 0 1px rgba(0, 210, 255, 0.15);
}

.p2-stage-node:hover .p2-stage-circle i {
    opacity: 1;
    transform: scale(1.1);
}

/* Glow dot at top of circle */
.p2-stage-circle::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--p2-accent);
    opacity: 0;
    box-shadow: 0 0 12px 3px var(--p2-accent);
    transition: opacity 0.3s;
}

.p2-stage-node:hover .p2-stage-circle::after { opacity: 1; }

.p2-stage-num {
    font-family: var(--p2-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--p2-accent);
    opacity: 0.5;
    margin-bottom: 8px;
    text-align: center;
}

.p2-stage-title {
    font-family: var(--p2-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.2;
}

.p2-stage-desc {
    font-family: var(--p2-body);
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.65;
    opacity: 0.55;
    text-align: center;
}

/* Stage badge tag */
.p2-stage-tag {
    display: inline-block;
    font-family: var(--p2-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p2-accent);
    border: 1px solid var(--p2-border-cyan);
    background: var(--p2-accent-dim);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 14px;
}


/* ── Skills grid ───────────────────────────────────────────── */
.p2-skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--p2-border);
    border: 1px solid var(--p2-border);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 60px;
}

.p2-skill-card {
    background: #0b1a22;
    padding: 40px 36px;
    position: relative;
    transition: background 0.3s;
    overflow: hidden;
}

.p2-skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--p2-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.p2-skill-card:hover { background: #0f2230; }
.p2-skill-card:hover::before { transform: scaleX(1); }

.p2-skill-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--p2-accent-dim);
    border: 1px solid var(--p2-border-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: background 0.3s, transform 0.3s;
}

.p2-skill-icon i {
    font-size: 1.3rem;
    color: var(--p2-accent);
}

.p2-skill-card:hover .p2-skill-icon {
    background: rgba(0, 210, 255, 0.18);
    transform: scale(1.08) rotate(-3deg);
}

.p2-skill-title {
    font-family: var(--p2-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 12px;
    line-height: 1.1;
}

.p2-skill-desc {
    font-family: var(--p2-body);
    font-size: 0.86rem;
    font-weight: 300;
    line-height: 1.75;
    opacity: 0.58;
    margin: 0;
}

/* Bottom row - 2 wider cards via subgrid trick */
.p2-skill-grid .p2-skill-card:nth-child(4),
.p2-skill-grid .p2-skill-card:nth-child(5) {
    /* handled via col-span in HTML */
}


/* ── Quote section ─────────────────────────────────────────── */
.p2-quote-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.p2-quote-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0,210,255,0.03) 0%,
        transparent 50%,
        rgba(0,210,255,0.03) 100%
    );
}

.p2-quote-mark {
    font-family: var(--p2-display);
    font-size: 12rem;
    font-weight: 900;
    color: var(--p2-accent);
    opacity: 0.06;
    line-height: 0.7;
    display: block;
    margin-bottom: -40px;
    user-select: none;
}

.p2-quote-text {
    font-family: var(--p2-display);
    font-size: clamp(1.6rem, 3.2vw, 2.5rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    color: rgba(255,255,255,0.85);
    max-width: 860px;
    position: relative;
    z-index: 1;
}

.p2-quote-text strong {
    font-weight: 700;
    font-style: normal;
    color: var(--p2-accent);
}

.p2-quote-attribution {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.p2-quote-attribution::before {
    content: '';
    display: block;
    width: 48px;
    height: 1px;
    background: var(--p2-accent);
    opacity: 0.5;
}

.p2-quote-name {
    font-family: var(--p2-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--p2-accent);
    opacity: 0.75;
}


/* ── CTA section ───────────────────────────────────────────── */
.p2-cta-section {
    padding: 120px 0;
    position: relative;
}

.p2-cta-inner {
    background: var(--p2-glass);
    border: 1px solid var(--p2-border-cyan);
    border-radius: 24px;
    padding: 70px 80px;
    position: relative;
    overflow: hidden;
}

.p2-cta-inner::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--p2-accent), transparent);
    opacity: 0.6;
}

/* Large decorative number */
.p2-cta-deco {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--p2-display);
    font-size: 18rem;
    font-weight: 900;
    color: var(--p2-accent);
    opacity: 0.025;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.p2-cta-title {
    font-family: var(--p2-display);
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 0.96;
    margin-bottom: 24px;
}

.p2-cta-sub {
    font-family: var(--p2-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.65;
    max-width: 480px;
    margin-bottom: 40px;
}

/* Pill buttons */
.p2-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--p2-accent);
    color: #000;
    font-family: var(--p2-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
    white-space: nowrap;
}

.p2-btn-primary:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px -8px rgba(0, 210, 255, 0.45);
    text-decoration: none;
}

.p2-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-family: var(--p2-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 36px;
    border-radius: 50px;
    border: 1px solid var(--p2-border);
    text-decoration: none;
    transition: color 0.25s, border-color 0.25s, transform 0.25s ease;
    white-space: nowrap;
}

.p2-btn-ghost:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-3px);
    text-decoration: none;
}


/* ── Count-up animation trigger ────────────────────────────── */
.count-target {
    display: inline;
}


/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .p2-why-grid { grid-template-columns: 1fr; gap: 50px; }
    .p2-metric-box { position: static; }

    .p2-pipeline-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .p2-pipeline-grid::before { display: none; }

    .p2-skill-grid { grid-template-columns: repeat(2, 1fr); }

    .p2-cta-inner { padding: 50px 40px; }
    .p2-cta-deco  { display: none; }
}

@media (max-width: 768px) {
    .p2-hero-title { font-size: clamp(3rem, 11vw, 5rem); }

    .p2-pipeline-grid { grid-template-columns: 1fr; }

    .p2-skill-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .p2-hero-cta-row { gap: 12px; }

    .p2-section        { padding: 70px 0; }
    .p2-quote-section  { padding: 80px 0; }
    .p2-cta-section    { padding: 80px 0; }
    .p2-quote-mark     { font-size: 7rem; }
    .p2-scroll-cue     { display: none; }
    .p2-cta-inner      { padding: 40px 28px; }
}
