/* ═══════════════════════════════════════════════════
   Julie Ancy Art Studio — Shared Styles
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&display=swap');

:root {
    --bg-primary: #0f0f11;
    --bg-secondary: #161619;
    --bg-elevated: #1c1c20;
    --text-primary: #f0ece4;
    --text-secondary: #9a958c;
    --text-muted: #5c5850;
    --accent: #5a8f8f;
    --accent-warm: #c17754;
    --border: rgba(240, 236, 228, 0.06);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg-primary);
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

img { display: block; border-radius: 4px; }

a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

nav.scrolled {
    background: rgba(15, 15, 17, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--border);
}

/* Interior pages start scrolled */
nav.nav-solid {
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-logo span {
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { width: 100%; }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text-primary);
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── SHARED SECTION STYLES ─── */
section {
    padding: 8rem 3rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 300;
    line-height: 1.3;
    color: var(--text-primary);
    max-width: 600px;
}

/* ─── PAGE HEADER (Interior pages) ─── */
.page-header {
    padding: 10rem 3rem 5rem;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.page-header .section-label {
    margin-bottom: 1.5rem;
}

.page-header .section-title {
    margin: 0 auto;
    max-width: 700px;
}

/* ─── FOOTER ─── */
footer {
    padding: 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer-social a:hover { color: var(--accent); }

/* ─── CTA BUTTON ─── */
.cta-button {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1.1rem 3rem;
    border: 1px solid rgba(240, 236, 228, 0.2);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cta-button:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── LIGHTBOX ─── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    animation: lbFadeIn 0.35s ease;
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4rem 5rem 6rem;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    animation: lbScale 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}

@keyframes lbScale {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(15, 15, 17, 0.5);
    border: 1px solid rgba(240, 236, 228, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: var(--font-body);
    font-weight: 300;
    z-index: 1002;
}

.lightbox-close:hover {
    color: var(--text-primary);
    background: rgba(15, 15, 17, 0.8);
    border-color: rgba(240, 236, 228, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 15, 17, 0.4);
    border: 1px solid rgba(240, 236, 228, 0.08);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: var(--font-body);
    font-weight: 300;
    z-index: 1001;
}

.lightbox-nav:hover {
    color: var(--text-primary);
    background: rgba(15, 15, 17, 0.7);
    border-color: rgba(240, 236, 228, 0.15);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 1.2rem 2rem;
    background: linear-gradient(0deg, rgba(10, 10, 12, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

.lightbox-caption .lb-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.lightbox-caption .lb-medium {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    z-index: 1002;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    section { padding: 6rem 2rem; }
}

@media (max-width: 768px) {
    nav { padding: 1.2rem 1.5rem; }
    nav.scrolled, nav.nav-solid { padding: 0.8rem 1.5rem; }
    section { padding: 5rem 1.5rem; }

    .nav-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 15, 17, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 6rem 2.5rem 3rem;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        border-left: 1px solid var(--border);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 0.85rem;
        letter-spacing: 0.15em;
    }

    .page-header { padding: 8rem 1.5rem 3rem; }

    footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-logo { font-size: 1.2rem; }
}

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
    z-index: 200;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ─── BACK TO TOP ─── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 15, 17, 0.8);
    border: 1px solid rgba(240, 236, 228, 0.15);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 99;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(15, 15, 17, 0.95);
    border-color: var(--accent);
    color: var(--text-primary);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ─── ARTIST SIGNATURE ─── */
.artist-signature {
    font-family: 'Mrs Saint Delafield', cursive !important;
    font-size: 2.8rem !important;
    color: var(--text-primary) !important;
    opacity: 0.75;
    line-height: 2 !important;
    font-weight: 400 !important;
    display: block;
    letter-spacing: 0.02em;
    text-indent: 0.4em;
    padding: 0.15em 0 0.3em 0 !important;
    margin-bottom: -0.3em;
    overflow: visible !important;
}
