:root {
    --background: 213 45% 67%; 
    --foreground: 0 0% 100%; 
    --primary: 0 0% 100%; 
    --primary-foreground: 213 45% 67%; 
    --border: 0 0% 100% / 0.2; 
    --radius: 9999px; 
    --font-heading: 'Instrument Serif', serif; 
    --font-body: 'Barlow', sans-serif; 
}

body {
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #202124;
    overflow-x: hidden;
    width: 100%;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
}

/* Liquid Glass Effects */
.contact-card.is-revealed .contact-front {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}
.contact-card.is-revealed .contact-back {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.copy-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-btn.copy-success {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transform: scale(0.95);
}

@property --border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes spin-border {
    to {
        --border-angle: 360deg;
    }
}

.liquid-glass {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: conic-gradient(
        from var(--border-angle),
        rgba(255,255,255,0.05) 0deg,
        rgba(255,255,255,0.8) 45deg,
        rgba(255,255,255,0.05) 90deg,
        rgba(255,255,255,0.8) 135deg,
        rgba(255,255,255,0.05) 180deg,
        rgba(255,255,255,0.8) 225deg,
        rgba(255,255,255,0.05) 270deg,
        rgba(255,255,255,0.8) 315deg,
        rgba(255,255,255,0.05) 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: spin-border 8s linear infinite;
}

.liquid-glass-strong {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
    position: relative;
    border: none;
}

.liquid-glass-strong::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: conic-gradient(
        from var(--border-angle),
        rgba(255,255,255,0.05) 0deg,
        rgba(255,255,255,0.8) 45deg,
        rgba(255,255,255,0.05) 90deg,
        rgba(255,255,255,0.8) 135deg,
        rgba(255,255,255,0.05) 180deg,
        rgba(255,255,255,0.8) 225deg,
        rgba(255,255,255,0.05) 270deg,
        rgba(255,255,255,0.8) 315deg,
        rgba(255,255,255,0.05) 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: spin-border 6s linear infinite;
}

.section-badge {
    @apply liquid-glass rounded-full px-3.5 py-1 text-xs font-medium text-white inline-block mb-4;
}

.section-heading {
    @apply text-4xl md:text-5xl lg:text-6xl font-heading italic text-white tracking-tight leading-[0.9];
}

/* Base resets for the dark theme */
body.entered {
    background-color: #000;
}

/* Technical Grid Background for Frontend Design */
.bg-technical-grid {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

/* Dot Grid Background for Others Design */
.bg-dot-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center top;
}

/* Custom dashed line for annotations */
.annotation-line {
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    width: 100%;
    position: absolute;
    transform-origin: left center;
}

/* Monospace font utility for the frontend design */
.font-mono-tech {
    font-family: 'Courier New', Courier, monospace;
}

body.start-mode {
    overflow: hidden;
}

#start-screen {
    position: fixed;
    inset: 0;
    z-index: 20;
}

body.entered #start-screen {
    display: none;
}

@property --enter-r {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

#enter-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: #ffffff;
    overflow: hidden;
    transition: opacity 220ms ease;
    opacity: 0;
    pointer-events: none;
    --enter-r: 0px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0, transparent var(--enter-r), #000 calc(var(--enter-r) + 1px));
    mask-image: radial-gradient(circle at 50% 50%, transparent 0, transparent var(--enter-r), #000 calc(var(--enter-r) + 1px));
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

@keyframes enterReveal {
    from { --enter-r: 0px; }
    to { --enter-r: 220vmax; }
}

body.is-entering #enter-overlay {
    opacity: 1;
    animation: enterReveal var(--enter-dur, 3800ms) cubic-bezier(0.42, 0, 1, 1) forwards;
}

body.entered #enter-overlay {
    opacity: 0;
    pointer-events: none;
}

#main-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.is-entering #start-screen {
    display: none;
}

body.is-entering #main-content,
body.entered #main-content {
    display: block !important;
}

body.entered #main-content {
    opacity: 1;
}

.blur-word {
    display: inline-block;
    padding: 0.4em 0.1em;
    margin: -0.4em -0.1em;
    transform: translateZ(0);
}

/* Physics Container */
#physics-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: -1;
    pointer-events: auto;
}

body.entered #physics-container {
    pointer-events: none;
    display: none;
}

/* Hero Section Intro */
.hero-section {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    text-align: center;
    pointer-events: none; 
}

.hero-title {
    position: relative;
    display: inline-block;
    font-size: clamp(40px, 8vw, 100px);
    line-height: 1.1;
    font-weight: 500; 
    margin-bottom: 40px;
    color: #202124;
    letter-spacing: -1px;
    pointer-events: auto;
}

.hero-title.is-intro-hidden {
    opacity: 0;
}

.hero-title-svg {
    position: absolute;
    z-index: 12;
    pointer-events: none;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    width: 100%;
    pointer-events: auto;
}

.enter-hint {
    margin-top: 72px;
    font-family: 'Dancing Script', 'Google Sans', 'Roboto', Arial, sans-serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(32, 33, 36, 0.78);
    user-select: none;
}

/* Valve Transition */
#valve-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1200;
    background: transparent;
    --valve-seam-y: 55%;
    --valve-seam-epsilon: 0.2px;
    --valve-seam-color: rgba(255, 225, 140, 1);
    --valve-seam-soft: rgba(255, 200, 90, 0.85);
    --valve-seam-stroke: 2px;
    --valve-metal-sheen: rgba(255, 255, 255, 0.12);
    --valve-metal-line: rgba(255, 255, 255, 0.065);
    --valve-ui-opacity: 0;
    --valve-seam-opacity: 0;
}

.valve-seam {
    position: fixed;
    inset: 0;
    z-index: 2;
    width: 100vw;
    height: 100dvh;
    display: block;
    opacity: var(--valve-seam-opacity);
    transform: translateZ(0);
}

.valve-seam path {
    fill: none;
    stroke: var(--valve-seam-color);
    stroke-width: var(--valve-seam-stroke);
    vector-effect: non-scaling-stroke;
    stroke-linecap: butt;
    stroke-linejoin: bevel;
    filter:
        drop-shadow(0 0 2px rgba(255, 245, 205, 0.95))
        drop-shadow(0 0 8px rgba(255, 220, 130, 0.65))
        drop-shadow(0 0 18px rgba(255, 200, 90, 0.65));
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
}

.valve-seam:not(.animate):not(.animate-out) path {
    stroke-dashoffset: 4000;
}

.valve-seam.animate path {
    animation: drawSeam 3.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.valve-seam.animate-out path {
    animation: eraseSeam 0.3s cubic-bezier(0.8, 0, 0.9, 0.1) forwards;
}

@keyframes drawSeam {
    to { stroke-dashoffset: 0; }
}

@keyframes eraseSeam {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: 4000; }
}

.valve-ui {
    position: fixed;
    inset: 0;
    z-index: 3;
    opacity: var(--valve-ui-opacity);
    transition: opacity 0.18s linear;
}

.valve-scramble {
    display: inline-block;
    white-space: pre;
}

.valve-title {
    position: absolute;
    left: 6vw;
    top: 8vh;
    font-family: 'Black Ops One', 'Google Sans', 'Roboto', Arial, sans-serif;
    font-size: clamp(48px, 10vw, 160px);
    letter-spacing: 0.02em;
    line-height: 0.92;
    color: rgba(255, 245, 225, 0.92);
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.valve-tag {
    position: absolute;
    font-family: 'Roboto Mono', 'Google Sans', 'Roboto', Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(11px, 1.2vw, 18px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

.valve-tag--top-right { top: 6vh; right: 6vw; }
.valve-tag--mid-left { left: 6vw; top: calc(var(--valve-seam-y) - 6vh); }
.valve-tag--bottom-center { left: 50%; bottom: 8vh; transform: translateX(-50%); }

.valve-top, .valve-bottom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: #000;
    z-index: 1;
    transition: transform 0.1s linear;
    will-change: transform;
    pointer-events: none;
}

.valve-top { 
    transform: translateY(-100%); 
    clip-path: polygon(0 0, 100% 0, 100% 45%, 55% 45%, 50% var(--valve-seam-y), 0 calc(var(--valve-seam-y) + var(--valve-seam-epsilon)));
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 45%, 55% 45%, 50% var(--valve-seam-y), 0 calc(var(--valve-seam-y) + var(--valve-seam-epsilon)));
    filter:
        drop-shadow(0 1px 0 var(--valve-seam-color))
        drop-shadow(0 2px 0 rgba(255, 216, 120, 0.55))
        drop-shadow(0 0 3px rgba(255, 216, 120, 0.95))
        drop-shadow(0 0 26px var(--valve-seam-soft));
}
.valve-bottom { 
    transform: translateY(100%); 
    clip-path: polygon(0 calc(var(--valve-seam-y) - var(--valve-seam-epsilon)), 50% var(--valve-seam-y), 55% 45%, 100% 45%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 calc(var(--valve-seam-y) - var(--valve-seam-epsilon)), 50% var(--valve-seam-y), 55% 45%, 100% 45%, 100% 100%, 0 100%);
    filter:
        drop-shadow(0 -1px 0 var(--valve-seam-color))
        drop-shadow(0 -2px 0 rgba(255, 216, 120, 0.55))
        drop-shadow(0 0 3px rgba(255, 216, 120, 0.95))
        drop-shadow(0 0 26px var(--valve-seam-soft));
}

.valve-top::before,
.valve-bottom::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, var(--valve-metal-sheen) 14%, rgba(0, 0, 0, 0) 36%, var(--valve-metal-sheen) 58%, rgba(0, 0, 0, 0) 100%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 14px, var(--valve-metal-line) 14px 15px);
    transform-origin: 50% 50%;
    z-index: 1;
}

.valve-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
}

.project-showcase-shell {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-showcase-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-showcase-kicker,
.project-showcase-batch {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
}

.project-showcase-title {
    margin: 8px 0 0;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 0.95;
    color: #fff;
}

.project-showcase-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 7, 10, 0.88);
    padding: 18px;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.project-card-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.26);
}

.project-card-visual {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #020202;
    aspect-ratio: 16 / 10;
}

.project-card-visual-media,
.project-card-visual-grid {
    position: absolute;
    inset: 0;
}

.project-card-visual-media {
    filter: grayscale(1) saturate(0) brightness(0.72) contrast(1.15);
    transition: filter 0.45s ease, transform 0.6s ease;
}

.project-card:hover .project-card-visual-media {
    filter: grayscale(0) saturate(1.15) brightness(0.96) contrast(1);
    transform: scale(1.03);
}

.project-card-visual-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mix-blend-mode: screen;
    opacity: 0.26;
}

.project-card-visual-label {
    position: absolute;
    left: 16px;
    bottom: 14px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.project-visual-ai .project-card-visual-media {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 116, 116, 0.9) 0 6%, transparent 7%),
        radial-gradient(circle at 34% 30%, rgba(255, 206, 92, 0.8) 0 7%, transparent 8%),
        radial-gradient(circle at 52% 18%, rgba(165, 118, 255, 0.95) 0 7%, transparent 8%),
        radial-gradient(circle at 68% 42%, rgba(255, 112, 188, 0.82) 0 8%, transparent 9%),
        radial-gradient(circle at 84% 24%, rgba(96, 168, 255, 0.82) 0 7%, transparent 8%),
        radial-gradient(circle at 26% 72%, rgba(152, 118, 255, 0.7) 0 10%, transparent 11%),
        radial-gradient(circle at 58% 70%, rgba(255, 144, 94, 0.72) 0 11%, transparent 12%),
        linear-gradient(135deg, rgba(25, 28, 42, 0.95), rgba(10, 10, 10, 0.98));
}

.project-visual-workflow .project-card-visual-media {
    background:
        radial-gradient(circle at 12% 22%, rgba(52, 133, 255, 0.9) 0 7%, transparent 8%),
        radial-gradient(circle at 30% 46%, rgba(80, 255, 167, 0.72) 0 8%, transparent 9%),
        radial-gradient(circle at 62% 28%, rgba(111, 124, 255, 0.82) 0 7%, transparent 8%),
        radial-gradient(circle at 78% 62%, rgba(0, 226, 190, 0.75) 0 10%, transparent 11%),
        linear-gradient(130deg, rgba(8, 20, 48, 0.98), rgba(7, 9, 16, 0.96) 44%, rgba(8, 42, 33, 0.98));
}

.project-visual-frontend .project-card-visual-media {
    background:
        radial-gradient(circle at 20% 24%, rgba(255, 153, 72, 0.9) 0 9%, transparent 10%),
        radial-gradient(circle at 42% 54%, rgba(255, 117, 74, 0.82) 0 10%, transparent 11%),
        radial-gradient(circle at 72% 30%, rgba(112, 101, 255, 0.9) 0 11%, transparent 12%),
        radial-gradient(circle at 84% 68%, rgba(82, 117, 255, 0.78) 0 14%, transparent 15%),
        linear-gradient(135deg, rgba(36, 18, 7, 0.98), rgba(13, 13, 18, 0.96) 46%, rgba(21, 22, 58, 0.98));
}

.project-card-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.project-card-title {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 0.95;
    color: #fff;
}

.project-card-subline {
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
}

.project-card-copy {
    margin: 14px 0 0;
    max-width: 520px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.56);
}

.project-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    padding-top: 6px;
}

.project-card-meta span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.22);
    margin-bottom: 6px;
}

.project-card-meta strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.84);
}

.project-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-end;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: border-color 0.35s ease, background-color 0.35s ease;
}

.project-card:hover .project-card-action {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 1024px) {
    .project-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card--full {
        grid-column: span 2;
    }

    .project-card--full .project-card-visual {
        aspect-ratio: 18 / 8;
    }
}

@media (max-width: 1023px) {
    .project-card-bottom {
        grid-template-columns: 1fr;
    }

    .project-card-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .project-card {
        padding: 14px;
    }

    .project-card-title {
        font-size: 26px;
    }

    .project-card-meta {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mobile: Typography + Layout Fix Pack (iPhone 375px)
   Goal: don't change desktop effects, only prevent overflow/oversized text on mobile.
   ========================================================================== */
@media (max-width: 767px) {
    /* --- Hero (The Starfield Archives) --- */
    #hero .hero-main-copy {
        /* Keep the composition but give text a little more vertical room */
        /* Pull the main title block upward to avoid colliding with the terminal ("总述") block */
        top: 46%;
        transform: translateY(-58%);
        padding-left: 16px;
        padding-right: 16px;
    }

    #hero .blur-text-container {
        font-size: clamp(44px, 12vw, 66px);
        letter-spacing: -2px;
        margin-bottom: 16px;
        transform: none;
    }

    #hero .hero-subtext {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 18px;
        max-width: 92vw;
    }

    #hero .hero-archive-shell {
        /* Push the terminal block down a bit to increase the gap from the title/subtext */
        bottom: 12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* The red-box paragraph in your screenshot: stop it from feeling "too big" and ensure wrap */
    .hero-archive-container {
        font-size: 10px;
        letter-spacing: 0.06em;
    }
    .hero-archive-content {
        padding-right: 0;
        font-size: 12px;
        line-height: 1.55;
        word-break: break-word;
    }
    .hero-archive-label {
        font-size: 11px;
    }

    /* --- Stack Showcase section header (精选 切片) --- */
    #project-stack-showcase .project-showcase-title {
        font-size: 40px;
        line-height: 1.02;
        margin-bottom: 14px;
    }
    #project-stack-showcase .project-showcase-header p {
        font-size: 16px;
        line-height: 1.55;
    }

    /* AI card top banner text inside the 16:9 visual */
    .ai-campaign-title {
        top: 18px;
    }
    .ai-campaign-title h2 {
        font-size: 22px;
        margin: 0 0 8px 0;
        letter-spacing: 0.03em;
        padding: 0 12px;
    }
    .ai-campaign-title p {
        font-size: 12px;
        padding: 0 14px;
    }
    /* Floating keywords were designed for desktop; reduce their sizes so they don't dominate */
    .kw-1 { font-size: 22px; }
    .kw-2 { font-size: 18px; }
    .kw-3 { font-size: 14px; }
    .kw-4 { font-size: 16px; }
    .kw-5 { font-size: 20px; }
    .kw-6 { font-size: 12px; }
    .kw-7 { font-size: 24px; }
    .kw-8 { font-size: 16px; }
    .kw-9 { font-size: 14px; }
    .kw-10 { font-size: 20px; }
    .kw-11 { font-size: 12px; }
    .kw-12 { font-size: 18px; }

    /* --- Contact cards (微信/手机号/邮箱) --- */
    .contact-grid .contact-card {
        padding: 18px;
        min-height: 240px;
    }
    .contact-grid .contact-front i[data-lucide] {
        width: 40px;
        height: 40px;
        margin-bottom: 14px;
    }
    .contact-grid .contact-front h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .contact-grid .get-contact-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    .contact-grid .contact-back {
        padding: 16px;
    }
    .contact-grid .contact-back h3 {
        font-size: 18px;
        letter-spacing: 0.12em;
    }
    .contact-grid .contact-back p {
        margin-bottom: 14px;
    }
    .contact-grid .contact-value {
        font-size: 16px;
    }

    /* --- CTA footer typography: remove the forced single-line and scale down --- */
    .contact-cta-title {
        font-size: 42px;
        line-height: 1.15;
        margin-bottom: 18px;
    }
    .contact-cta-subtext {
        white-space: normal !important;
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 28px;
        padding: 0 6px;
    }
}

/* --- Stack Showcase (5 重叠卡片) --- */
.project-showcase-sticky {
    position: relative;
}

.project-showcase-frame {
    width: 100%;
    position: relative;
}

.showcase-nav-btn {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.showcase-nav-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.showcase-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.project-stack-stage {
    position: relative;
    width: 100%;
    height: min(78vh, 800px);
    overflow: visible; /* Changed from hidden to visible so arrows show */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.project-stack-track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: flat;
}

[data-stack-card] {
    position: absolute;
    width: 90vw;
    max-width: 860px;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(8, 10, 12, 0.9);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    transform-origin: 50% 50%;
    will-change: transform, filter, opacity;
}

/* 
  Animated Border using pseudo-elements 
  Creates a flowing conic-gradient mask
*/
[data-stack-card]::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px; /* border thickness */
    background: conic-gradient(
        from var(--angle, 0deg),
        rgba(255, 255, 255, 0.08) 0deg,
        rgba(255, 255, 255, 0.8) 60deg,
        rgba(255, 255, 255, 0.08) 120deg,
        rgba(255, 255, 255, 0.08) 180deg,
        rgba(255, 255, 255, 0.8) 240deg,
        rgba(255, 255, 255, 0.08) 300deg,
        rgba(255, 255, 255, 0.08) 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes borderRotate {
    to {
        --angle: 360deg;
    }
}

[data-stack-card]:hover::before, [data-stack-card].is-active::before {
    opacity: 1;
    animation: borderRotate 4s linear infinite;
}

.project-stack-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 0 14px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.project-stack-visual {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: min(44vh, 480px);
    overflow: hidden;
}

.project-stack-visual-media,
.project-stack-visual-noise {
    position: absolute;
    inset: 0;
}

.project-stack-visual-media {
    transition: filter 420ms ease, transform 600ms ease;
    opacity: 1 !important;
    visibility: visible !important;
}

[data-stack-card]:hover .project-stack-visual-media {
    transform: scale(1.03);
}
[data-project-trigger="workflow"][data-stack-card]:hover .project-stack-visual-media {
    transform: none;
}

.project-stack-visual-noise {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mix-blend-mode: screen;
    opacity: 0.18;
}

.project-stack-visual-code {
    position: absolute;
    left: 14px;
    bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.62);
}

.project-stack-visual--ai .project-stack-visual-media { background: radial-gradient(circle at 16% 22%, rgba(255,114,114,.9) 0 6%, transparent 7%), radial-gradient(circle at 32% 32%, rgba(255,196,92,.86) 0 7%, transparent 8%), radial-gradient(circle at 52% 18%, rgba(165,118,255,.95) 0 7%, transparent 8%), radial-gradient(circle at 68% 42%, rgba(255,112,188,.82) 0 8%, transparent 9%), radial-gradient(circle at 84% 24%, rgba(96,168,255,.82) 0 7%, transparent 8%), radial-gradient(circle at 26% 72%, rgba(152,118,255,.7) 0 10%, transparent 11%), radial-gradient(circle at 58% 70%, rgba(255,144,94,.72) 0 11%, transparent 12%), linear-gradient(135deg, rgba(25,28,42,.95), rgba(10,10,10,.98)); }
.project-stack-visual--workflow .project-stack-visual-media {
}
.project-stack-visual--workflow .workflow-visual-copy {
    display: none;
}
.project-stack-visual--workflow .workflow-visual-panel {
    display: none;
}
.project-stack-visual--workflow .workflow-visual-copy-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.38);
    font-size: 8px;
    letter-spacing: 0.16em;
    margin-bottom: 24px;
}
.project-stack-visual--workflow .workflow-visual-copy-title {
    margin: 0;
    font-size: clamp(42px, 4.5vw, 68px);
    line-height: 1.05;
    font-weight: 300;
    letter-spacing: -0.04em;
    color: rgba(244, 244, 246, 0.96);
}
.project-stack-visual--workflow .workflow-visual-copy-text {
    margin: 24px 0 0 0;
    max-width: 340px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.48);
}
.project-stack-visual--workflow .workflow-visual-copy-action {
    margin-top: 40px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.project-stack-visual--workflow .workflow-visual-copy-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(222,226,233,0.85));
    color: rgba(21, 23, 28, 0.96);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    font-size: 16px;
}
.project-stack-visual--workflow .workflow-visual-panel {
    display: none !important;
}
.project-stack-visual--workflow .workflow-visual-flow {
    position: absolute;
    inset: 0 0 0 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.project-stack-visual--workflow .workflow-visual-flow path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.34);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 4 10;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.26));
}
.project-stack-visual--workflow .workflow-visual-node {
    position: absolute;
    width: 27%;
    height: 22%;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(53, 58, 70, 0.34), rgba(34, 38, 48, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 22px 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.project-stack-visual--workflow .workflow-visual-node::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
}
.project-stack-visual--workflow .workflow-visual-node--a { left: 4%; top: 2%; }
.project-stack-visual--workflow .workflow-visual-node--a::after { right: 12px; bottom: 16px; }
.project-stack-visual--workflow .workflow-visual-node--b { right: 4%; top: 4%; }
.project-stack-visual--workflow .workflow-visual-node--b::after { left: 12px; bottom: 16px; }
.project-stack-visual--workflow .workflow-visual-node--c { left: 2%; bottom: 22%; }
.project-stack-visual--workflow .workflow-visual-node--c::after { right: 12px; top: 50%; transform: translateY(-50%); }
.project-stack-visual--workflow .workflow-visual-node--d { right: 2%; bottom: 2%; }
.project-stack-visual--workflow .workflow-visual-node--d::after { right: 14px; bottom: 16px; }
.project-stack-visual--workflow .workflow-visual-node-dot {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}
.project-stack-visual--workflow .workflow-visual-node-line {
    position: absolute;
    left: 38px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}
.project-stack-visual--workflow .workflow-visual-node-line--lg { top: 18px; width: 42%; }
.project-stack-visual--workflow .workflow-visual-node-line--sm { top: 28px; width: 26%; }
.project-stack-visual--workflow .workflow-visual-node-arrow {
    position: absolute;
    right: 14px;
    bottom: 12px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    line-height: 1;
}
.project-stack-visual--workflow .workflow-visual-node-label {
    position: absolute;
    left: 18px;
    bottom: -18px;
    font-size: 8px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.22);
}
[data-stack-card]:hover .project-stack-visual--workflow .project-stack-visual-media {
}
[data-stack-card]:hover .project-stack-visual--workflow .workflow-visual-flow path {
    stroke: rgba(255, 255, 255, 0.48);
}
[data-stack-card]:hover .project-stack-visual--workflow .workflow-visual-node::after {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 900px) {
    .project-stack-visual--workflow .workflow-visual-copy {
        width: 34%;
        display: none;
    }
    .project-stack-visual--workflow .workflow-visual-copy-title {
        font-size: clamp(30px, 3.2vw, 46px);
    }
    .project-stack-visual--workflow .workflow-visual-panel {
        width: 46%;
        display: none !important;
    }
}
/* .project-stack-visual--frontend .project-stack-visual-media { background: radial-gradient(circle at 20% 24%, rgba(255,153,72,.9) 0 9%, transparent 10%), radial-gradient(circle at 42% 54%, rgba(255,117,74,.82) 0 10%, transparent 11%), radial-gradient(circle at 72% 30%, rgba(112,101,255,.9) 0 11%, transparent 12%), radial-gradient(circle at 84% 68%, rgba(82,117,255,.78) 0 14%, transparent 15%), linear-gradient(135deg, rgba(36,18,7,.98), rgba(13,13,18,.96) 46%, rgba(21,22,58,.98)); } */
.project-stack-visual--threed .project-stack-visual-media { background: radial-gradient(circle at 24% 18%, rgba(82,117,255,.86) 0 8%, transparent 9%), radial-gradient(circle at 76% 62%, rgba(255,112,188,.76) 0 9%, transparent 10%), linear-gradient(135deg, rgba(8,16,36,.98), rgba(10,10,12,.96)); }
.project-stack-visual--other .project-stack-visual-media { background: radial-gradient(circle at 14% 20%, rgba(255,114,114,.84) 0 8%, transparent 9%), radial-gradient(circle at 48% 64%, rgba(80,255,167,.72) 0 10%, transparent 11%), linear-gradient(135deg, rgba(18,18,18,.98), rgba(7,9,16,.96)); }

.project-stack-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 14px;
    padding: 0 14px 14px 14px;
}

.project-stack-card-copy {
    text-align: left;
}

.project-stack-card-title {
    margin: 0 0 16px 0;
    font-size: clamp(24px, 3.5vw, 36px);
    line-height: 1;
    font-family: inherit;
    font-style: normal;
    font-weight: 500;
}

.project-stack-card-lineage {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 24px;
    text-transform: uppercase;
}

.project-stack-card-text {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

.project-stack-card-specs {
    display: flex;
    flex-direction: column;
    padding-top: 4px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.spec-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.spec-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    text-align: right;
    font-family: monospace;
}

.project-stack-card-action {
    position: absolute;
    right: 14px;
    bottom: 12px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 300ms ease, border-color 300ms ease;
    z-index: 20;
}

[data-stack-card]:hover .project-stack-card-action {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-stack-status {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.65);
}

@media (max-width: 1023px) {
    .project-stack-stage { padding: 16px 16px 50px 16px; }
    .project-stack-visual { height: min(36vh, 380px); }
    .project-stack-card-body { grid-template-columns: 1fr; }
    [data-stack-card] { width: calc(100vw - 64px); max-width: none; }
}

/* Mobile tuning for the stack showcase: keep the same layout/effects, just scale typography/spacings down */
@media (max-width: 767px) {
    .project-stack-stage {
        /* Use svh to reduce iOS address-bar "jump" while keeping the same feel */
        height: min(70svh, 620px);
        padding: 12px 12px 44px 12px;
    }

    [data-stack-card] {
        width: calc(100vw - 32px);
        border-radius: 14px;
        gap: 12px;
    }

    .project-stack-card-body {
        gap: 10px;
        padding: 0 12px 12px 12px;
    }

    .project-stack-card-title {
        font-size: 22px;
        margin: 0 0 10px 0;
    }

    .project-stack-card-lineage {
        font-size: 10px;
        letter-spacing: 0.14em;
        margin-bottom: 14px;
    }

    .project-stack-card-text {
        font-size: 13px;
        line-height: 1.55;
    }

    .spec-row {
        padding: 10px 0;
    }

    .spec-label {
        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .spec-value {
        font-size: 12px;
    }

    .project-stack-card-action {
        padding: 9px 14px;
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .project-stack-status {
        font-size: 10px;
        letter-spacing: 0.18em;
    }
}

/* ==========================================================================
   Hero Section Text Layout (Objective & Protocol)
   ========================================================================== */
.hero-archive-container {
    width: 100%;
    margin: 0;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
}

.hero-archive-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-archive-row--no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-archive-label {
    text-transform: uppercase;
    width: 120px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.25);
}

.hero-archive-content {
    flex-grow: 1;
    margin-right: auto;
    padding-right: 40px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

.hero-archive-right {
    text-align: right;
    text-transform: uppercase;
}

.hero-archive-right span {
    display: block;
    margin-bottom: 6px;
}

.hero-archive-right .status-active {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 767px) {
    .hero-archive-row {
        flex-direction: column;
        gap: 12px;
    }
    .hero-archive-label {
        width: 100%;
    }
    .hero-archive-right {
        text-align: left;
        margin-top: 12px;
    }
}

/* BACKGROUND VIDEO STYLES (Restored) */
.section-video-backdrop {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.section-video-backdrop video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-video-backdrop--showcase {
    top: -380px;
    height: calc(100% + 520px);
}

.section-video-backdrop--showcase video {
    transform: scale(1.16);
    object-position: center 8%;
}

.section-video-backdrop--showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.4) 80%, rgba(0,0,0,1) 100%),
        linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.1) 15%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.1) 85%, rgba(0,0,0,1) 100%);
    pointer-events: none;
}

.section-video-backdrop--how-it-works {
    overflow: visible;
}

.section-video-backdrop--how-it-works .section-video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-video-backdrop--how-it-works .section-video-layer--blur {
    transform: scaleY(0.68) scaleX(1.1);
    filter: blur(24px) brightness(0.6) saturate(1.2);
    opacity: 0.8;
}

.section-video-backdrop--how-it-works .section-video-layer--core {
    transform: scaleY(0.58) scaleX(1.05);
    filter: brightness(0.9);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 70%);
}

.section-video-backdrop--how-it-works::after {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 75%, rgba(0,0,0,1) 100%),
        linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 80%, rgba(0,0,0,1) 100%);
    pointer-events: none;
    z-index: 2;
}

#master-archive {
    background: transparent !important;
}

#master-archive .archive-item {
    background: transparent !important;
    transform: translateY(0);
    transition:
        transform 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

#master-archive .archive-item:hover,
#master-archive .archive-item:focus-within {
    background: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

#master-archive .archive-item > div:nth-of-type(2) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005)) !important;
    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease,
        filter 0.24s ease;
}

#master-archive .archive-item > div:nth-of-type(2) > img,
#master-archive .archive-item > div:nth-of-type(2) > video {
    transition:
        transform 0.3s ease,
        filter 0.3s ease,
        opacity 0.3s ease;
}

#master-archive .archive-item h3,
#master-archive .archive-item button,
#master-archive .archive-item button i {
    transition:
        color 0.22s ease,
        background-color 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease,
        opacity 0.22s ease;
}

#master-archive .archive-item:hover h3,
#master-archive .archive-item:focus-within h3 {
    color: rgba(255, 255, 255, 0.96);
}

#master-archive .archive-item:hover > div:nth-of-type(2),
#master-archive .archive-item:focus-within > div:nth-of-type(2) {
    transform: scale(1.015);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    filter: brightness(1.04);
}

#master-archive .archive-item:hover > div:nth-of-type(2) > img,
#master-archive .archive-item:hover > div:nth-of-type(2) > video,
#master-archive .archive-item:focus-within > div:nth-of-type(2) > img,
#master-archive .archive-item:focus-within > div:nth-of-type(2) > video {
    transform: scale(1.03);
    filter: saturate(1.04);
}

#master-archive .archive-item:hover button,
#master-archive .archive-item:focus-within button {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

#master-archive .archive-item:hover button i,
#master-archive .archive-item:focus-within button i {
    transform: rotate(90deg);
}

.contact-section {
    padding-bottom: 0;
}

.contact-bottom-video {
    position: absolute;
    z-index: 0;
    width: 100vw;
    /* 让背景视频向上延伸覆盖 Testimonials 区块（大致 800px 高度） */
    height: calc(100% + 800px);
    min-height: 100dvh;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    /* overflow removed to allow breaking the black line */
}

.contact-bottom-video::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.46) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.16) 14%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0.16) 86%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.contact-bottom-video-media {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.88;
    object-fit: cover;
    object-position: center bottom;
    filter: saturate(1.06) brightness(0.96);
}

@media (max-width: 768px) {
    .section-video-backdrop--showcase {
        top: -280px;
        height: calc(100% + 380px);
    }
    .section-video-backdrop--showcase video {
        transform: scale(1.25);
        object-position: center 12%;
    }
    .section-video-backdrop--how-it-works .section-video-layer--blur {
        transform: scaleY(0.8) scaleX(1.2);
        filter: blur(16px) brightness(0.84) saturate(0.92);
    }
    .section-video-backdrop--how-it-works .section-video-layer--core {
        transform: scaleY(0.7) scaleX(1.1);
    }
    .contact-section {
        padding-bottom: 0;
    }
    .contact-bottom-video {
        height: calc(100% + 800px);
        min-height: 100dvh;
    }
}

/* Override grayscale on ai composition layout */
.project-stack-visual-media.ai-composition-layout { filter: none !important; }

/* Default color state for active cards */
.ai-composition-layout img {
    filter: grayscale(1) saturate(0) brightness(0.72) contrast(1.15) !important;
    transition: filter 420ms ease, transform 600ms ease;
}

/* When the card is active (centered), it becomes color. When it moves away, it loses color. */
[data-stack-card].is-active .ai-composition-layout img {
    filter: grayscale(0) saturate(1.1) brightness(0.96) contrast(1) !important;
}

[data-stack-card]:hover .ai-composition-layout img { transform: scale(1.03); }

.project-stack-visual--ai .project-stack-visual-media {
    background: linear-gradient(-45deg, #a8caff, #e0eeff, #8cbcfc, #ffffff, #b4d4ff) !important;
    background-size: 400% 400% !important;
    animation: gradientFlow 10s ease infinite !important;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* AI Composition Layout Styles */
.ai-composition-layout { width: 100%; height: 100%; display: flex; align-items: center; justify-content: flex-start; position: relative; background: transparent; overflow: hidden; }

.ai-final {
    position: absolute; right: 0; top: 0; width: 80%; height: 100%; border-radius: 40px 0 0 40px; box-shadow: -15px 0 40px rgba(0,0,0,0.15);
    transform: translateX(20px); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1); opacity: 0;
}
.ai-final img { width: 100%; height: 100%; object-fit: cover; }

.ai-sources-container {
    position: relative; z-index: 10; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 30px; width: 100%; height: 100%;
    transform: translateY(20px); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-source {
    width: 220px; height: 220px; border-radius: 24px; background: #fff; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.12); overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.ai-source img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.ai-plus-icon { font-size: 40px; color: #666; font-weight: 300; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; }

/* Hover Animation State (Like a GIF) */
[data-stack-card]:hover .ai-sources-container, .detail-ai-visual:hover .ai-sources-container { transform: translateY(0%); }
[data-stack-card]:hover .ai-source-1, .detail-ai-visual:hover .ai-source-1 { transform: translateX(120px) scale(0.6); opacity: 0; transition-delay: 0s; }
[data-stack-card]:hover .ai-source-2, .detail-ai-visual:hover .ai-source-2 { transform: translateX(-120px) scale(0.6); opacity: 0; transition-delay: 0s; }
[data-stack-card]:hover .ai-plus-icon, .detail-ai-visual:hover .ai-plus-icon { transform: scale(0) rotate(180deg); opacity: 0; }
[data-stack-card]:hover .ai-final, .detail-ai-visual:hover .ai-final { opacity: 1; transform: translateX(0%); transition-delay: 0.15s; }

/* Reset transitions when not hovering (reverse animation) */
.ai-source-1, .ai-source-2, .ai-plus-icon { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease; transition-delay: 0.2s; }
.ai-final { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: 0s; }

/* Glass Panel Styles */
.ai-final-glass-panel {
    position: absolute; left: -180px; top: 50%; transform: translateY(-50%) translateX(-20px); width: 300px;
    background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 24px; padding: 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    opacity: 0; transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s; z-index: 5;
}
.ai-final-glass-panel h4 { margin: 0 0 12px 0; font-size: 13px; font-weight: 700; color: #1a1a1a; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 10px; }
.ai-final-glass-panel p { margin: 0; font-size: 13px; line-height: 1.6; color: #333; font-weight: 500; text-align: left; }

[data-stack-card]:hover .ai-final-glass-panel, .detail-ai-visual:hover .ai-final-glass-panel { opacity: 1; transform: translateY(-50%) translateX(0); }

/* Campaign Title Styles */
.ai-campaign-title { position: absolute; top: 40px; left: 0; width: 100%; text-align: center; z-index: 20; color: #1a1a1a; transition: opacity 0.6s ease, transform 0.6s ease; }
.ai-campaign-title h2 { font-size: 42px; font-weight: 600; margin: 0 0 12px 0; letter-spacing: 0.05em; }
.ai-campaign-title p { font-size: 16px; color: #666; margin: 0; letter-spacing: 0.02em; }

[data-stack-card]:hover .ai-campaign-title, .detail-ai-visual:hover .ai-campaign-title { opacity: 0; transform: translateY(-20px); }

/* Floating Keywords Background */
.ai-floating-keywords { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.keyword { position: absolute; font-weight: 700; color: rgba(255, 255, 255, 0.4); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.1em; animation: floatKeyword 20s linear infinite; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }

.kw-1 { top: 15%; left: -10%; animation-duration: 25s; font-size: 40px; color: rgba(255, 255, 255, 0.5); }
.kw-2 { top: 65%; left: 80%; animation-duration: 22s; animation-delay: -5s; font-size: 32px; }
.kw-3 { top: 80%; left: -5%; animation-duration: 28s; animation-delay: -12s; font-size: 24px; }
.kw-4 { top: 25%; left: 70%; animation-duration: 24s; animation-delay: -8s; font-size: 28px; }
.kw-5 { top: 45%; left: -15%; animation-duration: 26s; animation-delay: -15s; font-size: 36px; color: rgba(255, 255, 255, 0.6); }
.kw-6 { top: 5%; left: 40%; animation-duration: 30s; animation-delay: -2s; font-size: 22px; color: rgba(255, 255, 255, 0.3); }
.kw-7 { top: 55%; left: -20%; animation-duration: 20s; animation-delay: -10s; font-size: 44px; color: rgba(255, 255, 255, 0.4); }
.kw-8 { top: 85%; left: 30%; animation-duration: 27s; animation-delay: -18s; font-size: 30px; }
.kw-9 { top: 35%; left: -5%; animation-duration: 23s; animation-delay: -6s; font-size: 26px; }
.kw-10 { top: 75%; left: 60%; animation-duration: 29s; animation-delay: -20s; font-size: 38px; color: rgba(255, 255, 255, 0.5); }
.kw-11 { top: 10%; left: 85%; animation-duration: 25s; animation-delay: -14s; font-size: 20px; }
.kw-12 { top: 90%; left: 85%; animation-duration: 21s; animation-delay: -3s; font-size: 34px; color: rgba(255, 255, 255, 0.4); }

@keyframes floatKeyword { 0% { transform: translateX(0) translateY(0) rotate(0deg); } 33% { transform: translateX(10vw) translateY(-2vh) rotate(2deg); } 66% { transform: translateX(20vw) translateY(2vh) rotate(-1deg); } 100% { transform: translateX(100vw) translateY(0) rotate(0deg); } }

/* Make sure the modal detail view is always color */
.detail-ai-visual img { filter: grayscale(0) saturate(1.1) brightness(0.96) contrast(1) !important; }

.template-loop-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 7;
    background: #0a0a0a;
    overflow: hidden;
}

.template-loop-frame {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    animation-duration: 10s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.template-loop-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22));
    pointer-events: none;
}

.template-loop-frame--input {
    animation-name: templateFrameInput;
}

.template-loop-frame--output {
    animation-name: templateFrameOutput;
}

.template-loop-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.template-loop-image--input {
    padding: 18px;
}

.template-loop-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

.template-loop-prompt {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.template-loop-prompt-title {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

.template-loop-prompt-text {
    font-size: 12px;
    line-height: 1.75;
    color: rgba(226, 223, 216, 0.86);
    font-family: Arial, Helvetica, sans-serif;
}

@keyframes templateFrameInput {
    0%, 42% {
        opacity: 1;
        transform: scale(1);
    }
    50%, 100% {
        opacity: 0;
        transform: scale(1.025);
    }
}

@keyframes templateFrameOutput {
    0%, 45% {
        opacity: 0;
        transform: scale(1.025);
    }
    55%, 92% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.015);
    }
}
