/* ------------------------------------------------------------------
   L3V3L Photography — Stage 2 gallery redesign
   Structure: production sidebar + alternating image/description cards.
   Visual language: CodePen PHOTO_CSS typography, contrast, panels,
   spacing, hover states, and 300ms interaction timing, adapted to the
   existing gallery composition. Custom cursor and slide-over panels are
   intentionally not included.
   ------------------------------------------------------------------ */

:root {
    --mainColor: #1f2029;
    --secondaryColor: #262832;
    --borderColor: rgba(179, 154, 120, 0.22);
    --mainText: #f4f1ea;
    --secondaryText: rgba(244, 241, 234, 0.68);
    --buttonColor: #B39A78;

    --l3v3l-bronze: #B39A78;
    --l3v3l-bronze-bright: #d8c3a5;
    --l3v3l-bg: #1f2029;
    --l3v3l-panel: rgba(31, 32, 41, 0.72);
    --l3v3l-line: rgba(179, 154, 120, 0.22);
    --l3v3l-text: #f4f1ea;
    --l3v3l-muted: rgba(244, 241, 234, 0.68);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--l3v3l-text);
    background-color: var(--l3v3l-bg);
    background-image:
        linear-gradient(180deg, rgba(12, 13, 18, 0.82) 0%, rgba(18, 19, 26, 0.92) 42%, rgba(12, 13, 18, 0.98) 100%),
        url('../img/photo.jpg');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    transition: none;
}

body * {
    transition: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 72% 8%, rgba(179, 154, 120, 0.1), transparent 38%);
}

body p,
body li,
body span,
body label,
body input,
body textarea {
    font-family: 'Poppins', sans-serif;
}

body a {
    color: var(--l3v3l-bronze);
    cursor: pointer;
    text-decoration: none;
}

body a:hover {
    color: var(--l3v3l-bronze-bright);
    text-decoration: none;
}

::selection {
    color: var(--l3v3l-bg);
    background: var(--l3v3l-bronze);
}

/* --- Brand ------------------------------------------------------- */

.brand {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    animation: l3v3l-brand-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

.brand__wordmark {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand__sub {
    color: var(--l3v3l-bronze);
    font-family: 'Dancing Script', cursive;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

/* --- Left navigation --------------------------------------------- */

.vertical-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: 180px;
    height: 100%;
    padding-top: 110px;
    background: rgba(15, 16, 22, 0.86);
    border-right: 1px solid var(--l3v3l-line);
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    animation: l3v3l-nav-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vertical-nav::before {
    content: 'Menu';
    position: absolute;
    top: 42px;
    left: 24px;
    color: rgba(244, 241, 234, 0.38);
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.vertical-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vertical-nav li {
    position: relative;
}

.vertical-nav a {
    position: relative;
    display: block;
    padding: 13px 24px 13px 30px;
    color: rgba(244, 241, 234, 0.68);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-left: 1px solid transparent;
    transition: color 300ms ease, background 300ms ease, border-color 300ms ease, transform 300ms ease;
}

.vertical-nav a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 14px;
    width: 0;
    height: 1px;
    background: var(--l3v3l-bronze);
    transform: translateY(-50%);
    transition: width 300ms ease;
}

.vertical-nav a:hover,
.vertical-nav a:focus-visible {
    color: #fff;
    background: linear-gradient(90deg, rgba(179, 154, 120, 0.12), transparent);
    border-left-color: var(--l3v3l-bronze);
    transform: translateX(4px);
}

.vertical-nav a:hover::before,
.vertical-nav a:focus-visible::before {
    width: 12px;
}

.vertical-nav a[aria-disabled="true"] {
    pointer-events: none;
}

.nav-utility {
    margin-top: 8px;
}

.nav-divider {
    padding-top: 8px;
    border-top: 1px solid rgba(179, 154, 120, 0.16);
}

.nav-utility a {
    color: rgba(244, 241, 234, 0.52);
    font-size: 11px;
    letter-spacing: 0.14em;
}

.nav-utility a:hover,
.nav-utility a:focus-visible {
    color: #fff;
}

/* --- Main content ------------------------------------------------ */

.main-content {
    position: relative;
    z-index: 1;
    margin-left: 180px;
    max-width: 1280px;
    padding: 110px 6% 100px;
    animation: l3v3l-content-in 800ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.page-title {
    margin: 0 0 12px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(3.2rem, 6vw, 5.6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.92;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.page-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 1px;
    margin-top: 22px;
    background: var(--l3v3l-bronze);
}

.page-sub {
    margin: 0 0 64px;
    color: var(--l3v3l-bronze);
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* --- Alternating gallery cards ----------------------------------- */

.category-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 3.5vw, 3rem);
    align-items: center;
    margin: 0;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    border-top: 1px solid rgba(179, 154, 120, 0.12);
}

.category-grid:first-of-type {
    padding-top: 0;
    border-top: none;
}

.category-grid.is-reveal-ready {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

.category-grid.is-reveal-ready.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.category {
    min-width: 0;
}

.frame {
    position: relative;
    overflow: hidden;
    background: rgba(31, 32, 41, 0.72);
    border: 1px solid rgba(179, 154, 120, 0.22);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(12, 13, 18, 0.35));
}

.frame a {
    position: relative;
    display: block;
}

.frame img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
}

.category .frame:hover {
    transform: translateY(-8px);
    border-color: rgba(179, 154, 120, 0.55);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(179, 154, 120, 0.18);
}

.category .frame:hover img {
    transform: scale(1.045);
    filter: saturate(1.02) contrast(1.06);
}

.frame .frame-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 340px;
    color: rgba(244, 241, 234, 0.55);
    background: linear-gradient(135deg, rgba(179, 154, 120, 0.06), transparent);
    border: 1px dashed rgba(179, 154, 120, 0.3);
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.category-text {
    position: relative;
    padding: 8px 0;
}

.category-name {
    margin-bottom: 18px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.category-name::after {
    content: '';
    display: block;
    width: 42px;
    height: 1px;
    margin-top: 14px;
    background: var(--l3v3l-bronze);
}

.preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 30px 34px;
    background: linear-gradient(145deg, rgba(31, 32, 41, 0.86), rgba(22, 23, 30, 0.72));
    border: 1px solid rgba(179, 154, 120, 0.22);
    border-radius: 4px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
}

.category-text:hover .preview {
    border-color: rgba(179, 154, 120, 0.45);
    transform: translateY(-3px);
}

.centered-info {
    color: rgba(244, 241, 234, 0.72);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.85;
    text-align: center;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--l3v3l-bg);
    border: 3px solid var(--l3v3l-bronze);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(31, 32, 41, 0.9);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.corner-tl { top: -11px; left: -11px; }
.corner-tr { top: -11px; right: -11px; }
.corner-br { bottom: -11px; right: -11px; }
.corner-bl { bottom: -11px; left: -11px; }

.category-text:hover .corner {
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(31, 32, 41, 0.9), 0 0 18px rgba(179, 154, 120, 0.35);
}

.category-grid.coming-soon {
    opacity: 0.55;
}

.category-grid.coming-soon .frame {
    box-shadow: none;
    transform: none;
}

.soon-badge {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 16px;
    color: var(--l3v3l-bronze);
    background: rgba(179, 154, 120, 0.06);
    border: 1px solid rgba(179, 154, 120, 0.45);
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* --- Motion ------------------------------------------------------ */

@keyframes l3v3l-nav-in {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes l3v3l-brand-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes l3v3l-content-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive -------------------------------------------------- */

@media screen and (max-width: 1200px) {
    .main-content {
        padding-right: 5%;
        padding-left: 5%;
    }
}

@media screen and (max-width: 860px) {
    body {
        background-attachment: scroll;
    }

    .brand {
        position: static;
        padding: 24px 24px 0;
        align-items: flex-end;
    }

    .brand__wordmark {
        font-size: 24px;
    }

    .brand__sub {
        font-size: 20px;
    }

    .vertical-nav {
        position: static;
        width: 100%;
        height: auto;
        padding-top: 0;
        background: rgba(15, 16, 22, 0.9);
        border-right: none;
        border-bottom: 1px solid var(--l3v3l-line);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    }

    .vertical-nav::before {
        display: none;
    }

    .vertical-nav ul {
        display: flex;
        flex-wrap: wrap;
        padding: 8px 16px 12px;
    }

    .vertical-nav li {
        margin: 0;
    }

    .vertical-nav a {
        padding: 10px 14px;
        border-left: none;
        border-bottom: 1px solid transparent;
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .vertical-nav a::before {
        display: none;
    }

    .vertical-nav a:hover,
    .vertical-nav a:focus-visible {
        background: transparent;
        border-left-color: transparent;
        border-bottom-color: var(--l3v3l-bronze);
        transform: none;
    }

    .nav-divider {
        padding-top: 0;
        border-top: none;
    }

    .nav-utility {
        margin-top: 0;
    }

    .nav-utility a {
        font-size: 10px;
    }

    .main-content {
        margin-left: 0;
        padding: 48px 5% 72px;
    }

    .page-title {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }

    .page-sub {
        margin-bottom: 42px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 44px 0;
    }

    .category-grid:first-of-type {
        padding-top: 0;
    }

    .category-grid .category {
        order: -1;
    }

    .frame img,
    .frame .frame-empty {
        height: 240px;
    }

    .preview {
        min-height: 150px;
    }
}

@media screen and (max-width: 580px) {
    .brand {
        padding: 20px 18px 0;
    }

    .brand__wordmark {
        font-size: 21px;
    }

    .brand__sub {
        font-size: 18px;
    }

    .vertical-nav ul {
        padding: 6px 10px 10px;
    }

    .vertical-nav a {
        padding: 9px 10px;
        font-size: 10px;
    }

    .main-content {
        padding: 36px 6% 60px;
    }

    .page-title {
        font-size: 2.4rem;
    }

    .page-sub {
        margin-bottom: 34px;
        font-size: 1.25rem;
    }

    .category-grid {
        padding: 34px 0;
    }

    .frame img,
    .frame .frame-empty {
        height: 220px;
    }

    .preview {
        padding: 24px 22px;
    }

    .category-name {
        font-size: 1.2rem;
    }

    .centered-info {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body * {
        transition: none !important;
        animation: none !important;
    }

    .category-grid.is-reveal-ready {
        opacity: 1;
        transform: none;
    }

    .vertical-nav a:hover,
    .vertical-nav a:focus-visible,
    .category .frame:hover,
    .category .frame:hover img,
    .category-text:hover .preview,
    .category-text:hover .corner {
        transform: none;
    }
}

/* --- Back to top ------------------------------------------------- */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: var(--l3v3l-bronze);
    background: rgba(15, 16, 22, 0.86);
    border: 1px solid var(--l3v3l-line);
    border-radius: 50%;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 300ms ease, transform 300ms ease, visibility 300ms ease,
                color 300ms ease, border-color 300ms ease, background 300ms ease;
}

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

.back-to-top:hover,
.back-to-top:focus-visible {
    color: #fff;
    border-color: rgba(179, 154, 120, 0.55);
    background: rgba(31, 32, 41, 0.92);
    transform: translateY(-3px);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--l3v3l-bronze);
    outline-offset: 3px;
}

.back-to-top svg {
    display: block;
    transition: transform 300ms ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

@media screen and (max-width: 860px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}
