/* ─────────────────────────────────────────────
   Reset & Custom Properties
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #080808;
    --surface:     #111;
    --text:        #f2f2f2;
    --muted:       #888;
    --gap:         5px;
    --radius:      2px;
    --header-h:    64px;
    --transition:  0.35s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color:      var(--text);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─────────────────────────────────────────────
   Header
───────────────────────────────────────────── */
.site-header {
    position:   fixed;
    inset-inline: 0;
    top:        0;
    z-index:    200;
    height:     var(--header-h);
    padding:    0 clamp(20px, 4vw, 48px);
    display:    flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(8,8,8,.85), transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background var(--transition);
}

.site-header.solid { background: rgba(8,8,8,.96); }

.header-inner {
    width:   100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size:      .9rem;
    font-weight:    700;
    letter-spacing: .25em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    transition: opacity .2s;
}
.site-logo:hover { opacity: .7; }

.site-nav {
    display: flex;
    gap: 32px;
}
.site-nav a {
    font-size:      .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    transition: color .2s;
}
.site-nav a:hover { color: var(--text); }

/* ─────────────────────────────────────────────
   Hero
───────────────────────────────────────────── */
.hero {
    min-height:  100svh;
    display:     flex;
    align-items: center;
    justify-content: center;
    text-align:  center;
    padding:     var(--header-h) clamp(20px, 5vw, 80px) 40px;
    position:    relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 240px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-title {
    font-size:      clamp(3.5rem, 10vw, 8rem);
    font-weight:    700;
    letter-spacing: -.03em;
    line-height:    .95;
    margin-bottom:  20px;
}
.hero-title em {
    font-weight: 300;
    font-style: italic;
}

/* All-caps hero variant */
.hero-title:not(:has(em)) {
    letter-spacing: .04em;
    font-size: clamp(2.8rem, 8vw, 7rem);
}

.hero-sub {
    font-size:      .72rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    justify-content: center;
    text-decoration: none;
}
.hero-scroll span {
    display: block;
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--muted));
    animation: scrollLine 1.8s ease infinite;
}
@keyframes scrollLine {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─────────────────────────────────────────────
   Gallery
───────────────────────────────────────────── */
.gallery-section { padding: var(--gap); }

/* Masonry container — JS sets item positions, this holds the height */
.gallery-grid {
    position: relative;
    min-height: 300px;
    transition: height .3s ease;
}

.gallery-loader {
    position:    absolute;
    inset:       0;
    min-height:  300px;
    display:     flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width:  28px;
    height: 28px;
    border: 2px solid #2a2a2a;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Individual gallery items */
.gallery-item {
    position:   absolute;
    overflow:   hidden;
    background: var(--surface);
    cursor:     pointer;
    /* height set by JS based on aspect ratio */
}

.gallery-item img,
.gallery-item video {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform var(--transition), filter var(--transition);
}

/* Dark gradient + title on hover */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 1;
}
.gallery-item:hover::before { opacity: 1; }
.gallery-item:hover img,
.gallery-item:hover video    { transform: scale(1.05); filter: brightness(.9); }

.gallery-item-caption {
    position:   absolute;
    bottom:     0;
    left:       0;
    right:      0;
    padding:    14px 16px;
    z-index:    2;
    transform:  translateY(6px);
    opacity:    0;
    transition: transform var(--transition), opacity var(--transition);
}
.gallery-item:hover .gallery-item-caption {
    transform: translateY(0);
    opacity:   1;
}
.gallery-item-caption span {
    font-size:      .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight:    500;
    color: #fff;
}

/* Video play icon */
.gallery-item .play-icon {
    position:    absolute;
    top:         50%;
    left:        50%;
    transform:   translate(-50%, -50%);
    z-index:     2;
    width:       48px;
    height:      48px;
    background:  rgba(255,255,255,.15);
    border:      1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    display:     flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition:  background var(--transition);
}
.gallery-item:hover .play-icon { background: rgba(255,255,255,.25); }
.gallery-item .play-icon svg {
    width: 16px; height: 16px;
    fill: #fff;
    margin-left: 2px; /* optical center for triangle */
}

/* ─────────────────────────────────────────────
   Lightbox
───────────────────────────────────────────── */
.lightbox {
    position:        fixed;
    inset:           0;
    z-index:         900;
    background:      rgba(0,0,0,.97);
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    opacity:         0;
    pointer-events:  none;
    transition:      opacity .25s ease;
}
.lightbox.active {
    opacity:        1;
    pointer-events: all;
}

.lb-stage {
    flex:           1;
    width:          100%;
    display:        flex;
    align-items:    center;
    justify-content: center;
    padding:        var(--header-h) 80px 20px;
    overflow:       hidden;
}
.lb-stage img,
.lb-stage video {
    max-width:   100%;
    max-height:  100%;
    object-fit:  contain;
    display:     block;
    animation:   lbIn .2s ease;
    outline:     none;
}
@keyframes lbIn {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: scale(1); }
}

.lb-close {
    position:   absolute;
    top:        20px;
    right:      24px;
    background: none;
    border:     none;
    color:      #fff;
    font-size:  2rem;
    line-height: 1;
    cursor:     pointer;
    opacity:    .5;
    padding:    6px 10px;
    transition: opacity .2s;
    z-index:    10;
}
.lb-close:hover { opacity: 1; }

.lb-nav {
    position:   absolute;
    top:        50%;
    transform:  translateY(-50%);
    background: rgba(255,255,255,.05);
    border:     1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    width:      48px;
    height:     48px;
    display:    flex;
    align-items: center;
    justify-content: center;
    cursor:     pointer;
    opacity:    .4;
    transition: opacity .2s, background .2s;
    color:      #fff;
}
.lb-nav:hover { opacity: 1; background: rgba(255,255,255,.12); }
.lb-nav svg   { width: 22px; height: 22px; }
.lb-prev      { left: 16px; }
.lb-next      { right: 16px; }

.lb-footer {
    width:      100%;
    padding:    12px 80px 20px;
    display:    flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-shrink: 0;
}
.lb-caption {
    font-size:      .72rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color:          rgba(255,255,255,.55);
}
.lb-counter {
    font-size:  .68rem;
    color:      rgba(255,255,255,.3);
    letter-spacing: .08em;
}

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */
.site-footer {
    padding:    60px clamp(20px, 4vw, 48px);
    text-align: center;
    font-size:  .7rem;
    letter-spacing: .12em;
    color:      var(--muted);
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
@media (max-width: 600px) {
    .lb-stage  { padding: var(--header-h) 16px 16px; }
    .lb-footer { padding: 8px 16px 16px; }
    .lb-prev   { left: 4px; }
    .lb-next   { right: 4px; }
    .lb-nav    { width: 36px; height: 36px; }

    .site-nav  { gap: 20px; }
}
@media (max-width: 400px) {
    .site-nav  { display: none; }
}
