/* ============================================
   PROJECT PAGE STYLES
   ============================================ */

/* ---- Project Hero ---- */
.project-hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: calc(var(--letterbox) + 80px) 40px calc(var(--letterbox) + 60px);
}

.project-hero-video--placeholder {
    background: linear-gradient(160deg, #141414 0%, #0a0a0a 100%);
}

.project-hero-video-container {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.project-hero-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 1;
}
#project-vimeo-player {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.project-hero-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    pointer-events: none;
}

.project-hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 177.78vh;
    height: 56.25vw;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: none;
}

.project-hero-video-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--bg);
    pointer-events: none;
    animation: vimeo-unmask 0.2s ease 1.2s forwards;
}

@keyframes vimeo-unmask {
    to { opacity: 0; }
}

.project-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10,10,10,0.9) 0%,
        rgba(10,10,10,0.3) 50%,
        rgba(10,10,10,0.15) 100%
    );
    z-index: 0;
}

.project-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.project-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.project-hero-eyebrow-line {
    width: 24px; height: 1px;
    background: var(--text-dim); opacity: .3;
}

.project-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -.04em;
    text-transform: uppercase;
    color: var(--white);
    line-height: .9;
    margin-bottom: 40px;
}

.project-hero-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.project-hero-meta-sep { opacity: .3; }

/* ---- Project Info ---- */
.project-info {
    padding: 100px 40px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 100px;
    align-items: start;
}

.project-info-description {
    font-size: clamp(.9rem, 1.3vw, 1.05rem);
    color: var(--text-dim);
    line-height: 1.85;
    max-width: 560px;
    padding-top: 8px;
}

.project-info-description p {
    margin-bottom: 16px;
}
.project-info-description p:last-child {
    margin-bottom: 0;
}

.project-info-specs {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.06);
}

.project-info-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.project-info-label {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.project-info-value {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* ---- Gallery Carousel ---- */
.gallery {
    padding: 0 0 140px;
}

.gallery-header {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.gallery-label-line {
    width: 24px; height: 1px;
    background: var(--text-dim); opacity: .3;
}

.gallery-counter {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .15em;
    color: var(--text-dim);
}
.gallery-counter-current { color: var(--accent); }

.gallery-track-wrap {
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.gallery-track-wrap.dragging { cursor: grabbing; }

.gallery-track {
    display: flex;
    gap: 24px;
    transition: transform .7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.gallery-track.no-transition { transition: none; }

.gallery-slide {
    flex-shrink: 0;
    width: min(78vw, 1020px);
    aspect-ratio: 2.39 / 1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transform: scale(0.91);
    opacity: 0.38;
    transition: transform .7s cubic-bezier(0.16, 1, 0.3, 1),
                opacity .7s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-slide.active {
    transform: scale(1);
    opacity: 1;
}

.gallery-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.gallery-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-placeholder {
    position: absolute;
    inset: 0;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 4px;
}

.gallery-placeholder-num {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .3em;
    color: var(--text-dim);
    opacity: .3;
}

.gallery-controls {
    max-width: 1400px;
    margin: 28px auto 0;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.gallery-btn {
    width: 38px; height: 38px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: all .3s var(--ease);
    flex-shrink: 0;
    font-size: .85rem;
}
.gallery-btn:hover {
    border-color: rgba(255,255,255,.35);
    color: var(--white);
    background: rgba(255,255,255,.04);
}
.gallery-btn:disabled {
    opacity: .2;
    cursor: not-allowed;
    pointer-events: none;
}

.gallery-progress {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.08);
    position: relative;
    overflow: hidden;
}
.gallery-progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: var(--accent);
    transition: width .65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Section divider ---- */
.project-divider {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,.06), transparent);
}

/* ---- Footer back link ---- */
.footer-back {
    font-size: .65rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color .3s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-back:hover { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .project-hero { padding: calc(var(--letterbox) + 60px) 28px calc(var(--letterbox) + 40px); }
    .project-info { grid-template-columns: 1fr; gap: 56px; padding: 80px 28px; }
    .gallery-header, .gallery-controls { padding: 0 28px; }
    .gallery-slide { width: min(85vw, 900px); }
    .project-divider { padding: 0 28px; }
}

@media (max-width: 640px) {
    .project-hero { padding: calc(var(--letterbox) + 60px) 20px calc(var(--letterbox) + 32px); }
    .project-info { padding: 60px 20px; }
    .project-hero-title { font-size: clamp(1.4rem, 7.5vw, 3rem); }
    .gallery-header, .gallery-controls { padding: 0 20px; }
    .gallery-slide { width: 88vw; aspect-ratio: 16/9; }
    .project-divider { padding: 0 20px; }
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease-out both vt-out; }
::view-transition-new(root) { animation: 280ms ease-in  both vt-in;  }
@keyframes vt-out { to   { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; } }
