/* =============================================================================
   Main styles
============================================================================= */

/* =============================================================================
   CUSTOM PROPERTIES
============================================================================= */
:root {
    --color-bg:        #0a0a0a;
    --color-bg-alt:    #111111;
    --color-text:      #f0f0f0;
    --color-muted:     #888888;
    --color-accent:    #c0c0c0;
    --color-border:    #222222;
    --grid-gap:        3px;
    --transition:      0.3s ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
            Arial, sans-serif;
}

/* =============================================================================
   RESET & BASE
============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* =============================================================================
   TOP BAR
============================================================================= */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    height: 36px;
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity var(--transition);
}

.top-bar-logo:hover {
    opacity: 1;
}

.top-bar-logo img {
    display: block;
    height: 20px;
    width: auto;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.top-bar-link {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    text-transform: lowercase;
    transition: color var(--transition);
    white-space: nowrap;
}

.top-bar-addr {
    text-transform: none;
}

.top-bar-link .bi {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.3em;
    vertical-align: -0.1em;
    display: inline-block;
    flex-shrink: 0;
}

.top-bar-link:hover {
    color: var(--color-text);
}

.top-bar-sep {
    color: var(--color-border);
    font-size: 0.75rem;
    line-height: 1;
    user-select: none;
}

.top-bar-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-social a {
    color: var(--color-muted);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.top-bar-social a:hover {
    color: var(--color-text);
}

.top-bar-social svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    display: block;
}

@media (max-width: 768px) {
    #top-bar {
        height: auto;
    }
    .top-bar-inner {
        flex-wrap: wrap;
    }
    .top-bar-logo {
        order: 1;
        height: 36px;
    }
    .top-bar-social {
        order: 2;
        height: 36px;
    }
    .top-bar-contact {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 5px 1rem 6px;
        border-top: 1px solid var(--color-border);
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow: hidden;
        font-size: 0.62rem;
    }
    #hero {
        padding-top: 64px;
    }
}

/* =============================================================================
   HERO
============================================================================= */
#hero {
    position: relative;
    height: 100svh;
    padding-top: 36px; /* offset for fixed top bar */
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0a;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.hero-logo {
    width: clamp(160px, 28vw, 340px);
    height: auto;
}

.hero-tagline {
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--color-accent));
    animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50%  { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(1); transform-origin: top; }
}

/* =============================================================================
   SECTION HEADER
============================================================================= */
.section-header {
    padding: 5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.section-header h2 {
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 500;
}

.ig-cta--header {
    font-size: clamp(0.55rem, 0.9vw, 0.7rem);
    opacity: 0.6;
    transition: opacity var(--transition);
}

.ig-cta--header:hover {
    opacity: 1;
    color: var(--color-text);
}

/* =============================================================================
   INSTAGRAM GRID
============================================================================= */
#work {
    background: var(--color-bg);
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

@media (min-width: 768px) {
    .ig-grid {
        grid-template-columns: repeat(9, 1fr);
    }
}

.ig-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-alt);
    outline: none;
}

.ig-item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.ig-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
    pointer-events: none;
}

.ig-item:hover img,
.ig-item:focus-visible img {
    transform: scale(1.04);
}

.ig-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition), background-color var(--transition);
}

/* Video thumbnails: cutout play icon always visible */
.ig-item.is-video .ig-item-overlay {
    opacity: 1;
}

.ig-item:hover .ig-item-overlay,
.ig-item:focus-visible .ig-item-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.38);
}

.play-cutout {
    width: 48px;
    height: 48px;
    fill: rgba(255, 255, 255, 0.72);
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.4));
    transition: fill var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.ig-item:hover .play-cutout,
.ig-item:focus-visible .play-cutout {
    fill: rgba(255, 255, 255, 0.95);
    transform: scale(1.08);
}

.ig-item-overlay svg {
    /* intentionally empty — play-cutout handles its own sizing */
}

/* Loading dots */
.ig-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5rem 2rem;
}

.ig-loading span {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-muted);
    animation: dot 1.3s ease-in-out infinite;
}

.ig-loading span:nth-child(2) { animation-delay: 0.2s; }
.ig-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.3; }
    40%            { transform: scale(1);    opacity: 1;   }
}

/* Error state */
.ig-error {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
}

.ig-error[hidden] {
    display: none;
}

.ig-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-muted);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color var(--transition);
}

.ig-cta:hover {
    color: var(--color-text);
}

.ig-cta svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.ig-more-wrap {
    display: flex;
    justify-content: center;
    padding: 2.5rem 0 2rem;
}

.ig-load-more {
    background: transparent;
    border: 1px solid var(--color-muted);
    color: var(--color-muted);
    font-family: var(--font);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.75rem 2.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: border-color var(--transition), color var(--transition);
}

.ig-load-more:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}



/* =============================================================================
   LIGHTBOX
============================================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-media img,
#lightbox-media video {
    max-width: 88vw;
    max-height: 86vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity var(--transition);
    z-index: 1001;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
    opacity: 1;
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.lightbox-close {
    top: 1.25rem;
    right: 1.75rem;
    font-size: 2.5rem;
    padding: 0.5rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
    padding: 1rem;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

/* =============================================================================
   CONTACT
============================================================================= */
#contact {
    background: var(--color-bg-alt);
    padding: 3rem 2rem 4rem;
    text-align: center;
}

.contact-inner {
    max-width: 520px;
    margin: 0 auto 3.5rem;
}

.contact-info {
    margin-bottom: 2.5rem;
}

.contact-info p {
    color: var(--color-muted);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
    line-height: 1.8;
}

.contact-info a {
    color: var(--color-text);
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
}

.contact-info a:hover {
    color: var(--color-accent);
}

.contact-info .bi {
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
    color: var(--color-muted);
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
}

.social-links a {
    color: var(--color-muted);
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--color-text);
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.contact-footer {
    border-top: 1px solid var(--color-border);
    padding-top: 2.5rem;
    margin-top: 2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.contact-footer p {
    font-size: 0.72rem;
    color: var(--color-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =============================================================================
   REDUCED MOTION
============================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .scroll-line {
        animation: none;
        opacity: 1;
        transform: scaleY(1);
    }

    .ig-loading span {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }
}
