/* ===== Age Verification Modal ===== */
.age-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: backdrop-filter 0.6s ease-out, -webkit-backdrop-filter 0.6s ease-out, background 0.6s ease-out;
}

.age-modal.fade-out {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: rgba(10, 10, 15, 0);
}

.age-modal.fade-out .age-modal-content {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
}

.age-modal.hidden {
    display: none;
}

.age-modal-content {
    background: linear-gradient(160deg, #0e1626 0%, #0a111e 100%);
    border-radius: 20px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(151, 187, 223, 0.18);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(124, 196, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: modalAppear 0.5s ease;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.age-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--ice-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a1626;
    box-shadow: 0 0 30px rgba(124, 196, 255, 0.3);
}

.age-modal-content h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    background: var(--chrome-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.age-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.age-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.age-modal-buttons .btn {
    min-width: 140px;
}

@media (max-width: 480px) {
    .age-modal-content {
        padding: 2rem;
    }

    .age-modal-buttons {
        flex-direction: column;
        align-items: center;
    }

    .age-modal-buttons .btn {
        width: 100%;
    }
}

/* ===== CSS Variables ===== */
:root {
    /* Deep winter night blues */
    --bg-primary: #070b14;
    --bg-secondary: #0a101d;
    --bg-tertiary: #131c2e;
    --bg-card: #0d1524;

    --text-primary: #eef4fb;
    --text-secondary: #9db0c7;
    --text-muted: #5f7089;

    /* Frost blue accent + chrome highlights (matches the logo) */
    --accent-primary: #7cc4ff;
    --accent-secondary: #4a90d9;
    --accent-gradient: linear-gradient(135deg, #a8d8ff 0%, #4a90d9 100%);
    --ice-gradient: linear-gradient(165deg, #f2faff 0%, #c3e2f8 45%, #8cc2ea 100%);
    --chrome-gradient: linear-gradient(180deg, #ffffff 0%, #b9c9da 42%, #f4f9ff 55%, #8fa5bc 100%);

    --border-color: rgba(151, 187, 223, 0.13);
    --border-hover: rgba(151, 187, 223, 0.28);

    --shadow-sm: 0 2px 8px rgba(2, 6, 14, 0.3);
    --shadow-md: 0 4px 20px rgba(2, 6, 14, 0.4);
    --shadow-lg: 0 8px 40px rgba(2, 6, 14, 0.5);
    --shadow-glow: 0 0 30px rgba(124, 196, 255, 0.18);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-main: 'Outfit', 'Century Gothic', 'Trebuchet MS', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Film grain — kills the flat, too-clean gradient look */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
    background: rgba(124, 196, 255, 0.35);
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(7, 11, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-logo {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    transition: opacity 0.5s ease;
}

.hero-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.hero-loader-ring {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.hero-loader-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
}

.hero-loader-fill {
    fill: none;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 106.81;
    stroke-dashoffset: 106.81;
    transition: stroke-dashoffset 0.15s ease;
}

.hero-loader-pct {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    pointer-events: none;
}


.hero-logo {
    width: clamp(280px, 50vw, 500px);
    height: auto;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    transition: opacity 1s ease;
}

.hero-logo.hidden {
    opacity: 0;
    pointer-events: none;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-cta {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: ctaFadeInUp 1s ease 0.4s backwards;
}

.hero-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-cta .btn {
    width: 175px;
    white-space: nowrap;
}

/* Commissions open/closed badge in the navbar (state fetched from data/commissions.json) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(13, 21, 36, 0.75);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.status-pill.visible {
    opacity: 1;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-pill.open .status-dot {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.status-pill.closed .status-dot {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

@media (max-width: 480px) {
    .status-pill {
        font-size: 0.6rem;
        padding: 0.3rem 0.7rem;
        letter-spacing: 0.08em;
    }
}


.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: scrollIndicatorIn 1s ease 0.6s backwards;
}

@keyframes scrollIndicatorIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

.scroll-chevron {
    display: none;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    animation: bounceDown 1.8s ease-in-out infinite;
}

.scroll-label-mobile {
    display: none;
}

@media (max-width: 768px) {
    .mouse,
    .scroll-label-desktop {
        display: none;
    }

    .scroll-chevron,
    .scroll-label-mobile {
        display: block;
    }
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}

/* Wardrobe panel (inserted by three-scene.js when clothingConfig has entries) */
.wardrobe {
    position: absolute;
    right: 1.5rem;
    bottom: 2rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    animation: wardrobeFadeIn 1s ease 0.3s backwards;
}

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

.wardrobe-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border-hover);
    background: rgba(13, 21, 36, 0.8);
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.wardrobe-toggle svg {
    width: 15px;
    height: 15px;
}

.wardrobe-toggle:hover,
.wardrobe.open .wardrobe-toggle {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.wardrobe-panel {
    display: none;
    min-width: 180px;
    padding: 0.6rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: rgba(13, 21, 36, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.wardrobe.open .wardrobe-panel {
    display: block;
    animation: wardrobePanelIn 0.25s ease;
}

@keyframes wardrobePanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wardrobe-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.wardrobe-item + .wardrobe-item {
    border-top: 1px solid var(--border-color);
}

.wardrobe-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.wardrobe-item:hover .wardrobe-label {
    color: var(--text-primary);
}

.wardrobe-item input {
    display: none;
}

.wardrobe-switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: background var(--transition-normal), border-color var(--transition-normal);
}

.wardrobe-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: transform var(--transition-normal), background var(--transition-normal);
}

.wardrobe-item input:checked ~ .wardrobe-switch {
    background: var(--ice-gradient);
    border-color: transparent;
}

.wardrobe-item input:checked ~ .wardrobe-switch::after {
    transform: translateX(14px);
    background: #0a1626;
}

.wardrobe-item input:disabled ~ .wardrobe-switch {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .wardrobe {
        right: 0.75rem;
        bottom: 5rem;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--ice-gradient);
    color: #0a1626;
    box-shadow: var(--shadow-md), 0 0 22px rgba(124, 196, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: var(--shadow-lg), 0 0 34px rgba(124, 196, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-secondary {
    background: rgba(124, 196, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    background: rgba(124, 196, 255, 0.1);
    border-color: var(--accent-primary);
}

.btn-full {
    width: 100%;
}

/* ===== Section Styles ===== */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--chrome-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fading hairline with a frost-blue center accent, echoing the logo's rules */
.section-title::after {
    content: '';
    display: block;
    margin: 0.9rem auto 0;
    width: 200px;
    height: 2px;
    background:
        linear-gradient(90deg, rgba(124, 196, 255, 0), rgba(124, 196, 255, 0.9), rgba(124, 196, 255, 0)) center / 44px 2px no-repeat,
        linear-gradient(90deg, transparent, rgba(157, 176, 199, 0.5) 30%, rgba(157, 176, 199, 0.5) 70%, transparent) center / 100% 1px no-repeat;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin: 1rem 0 2.5rem;
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ===== Portfolio Section ===== */
.portfolio {
    background:
        radial-gradient(1100px 480px at 85% -8%, rgba(74, 144, 217, 0.10), transparent 65%),
        var(--bg-secondary);
}

.portfolio-page {
    padding-top: 8rem;
}

.portfolio-back {
    text-align: center;
    margin-top: 3rem;
}

.portfolio-preview-wrapper {
    position: relative;
    overflow: hidden;
}

.portfolio-preview {
    display: grid;
    grid-template-columns: repeat(3, 2fr);
    grid-auto-flow: dense;
    gap: 2rem;
}


.portfolio-preview-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-secondary) 70%);
    pointer-events: none;
}

.portfolio-view-all {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

@media (max-width: 768px) {
    .portfolio-preview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Single column — a two-column span would overflow */
    .portfolio-preview .portfolio-item.wide {
        grid-column: auto;
    }

    .portfolio-preview-fade {
        height: 40%;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-flow: dense;
    gap: 2rem;
}

/* Landscape pieces span two columns so they're barely cropped */
.portfolio-item.wide {
    grid-column: span 2;
}

.portfolio-item.wide .portfolio-thumbnail {
    aspect-ratio: 8/5;
}

.portfolio-item {
    display: block;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.portfolio-hidden {
    display: none;
}

.portfolio-reveal {
    animation: portfolioReveal 0.4s ease backwards;
}

@keyframes portfolioReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-show-more {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    transition: opacity 0.3s ease;
}

.portfolio-show-more.fade-out {
    opacity: 0;
}

.portfolio-thumbnail {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
    border-radius: 16px;
}

.portfolio-thumbnail img,
.portfolio-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-thumbnail img,
.portfolio-item:hover .portfolio-thumbnail video {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.view-icon,
.play-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow);
}

.view-icon svg {
    width: 24px;
    height: 24px;
}

.play-icon {
    font-size: 1.5rem;
    padding-left: 4px;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.lightbox-loader {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.lightbox-loader.active {
    opacity: 1;
}

.loader-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loader-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 3;
}

.loader-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 106.81;
    stroke-dashoffset: 0;
}

.lightbox.closing {
    display: flex;
    animation: lightboxClose 0.3s ease forwards;
}

@keyframes lightboxOpen {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

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

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast), opacity 0.3s ease;
}

.lightbox-prev.nav-hidden,
.lightbox-next.nav-hidden {
    opacity: 0;
    pointer-events: none;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.lightbox-content {
    max-width: 90vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lightbox-content.slide-left {
    opacity: 0;
    transform: translateX(-60px);
}

.lightbox-content.slide-right {
    opacity: 0;
    transform: translateX(60px);
}

.lightbox-content.transitioning {
    opacity: 0;
    transform: scale(0.97);
}

.lightbox-content > img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.lightbox-content img.active {
    display: block;
    animation: contentAppear 0.4s ease;
}

.video-player {
    display: none;
}

.video-player.active {
    display: block;
    position: relative;
    animation: contentAppear 0.4s ease;
}

.video-player video {
    display: block;
    max-width: 90vw;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.video-controls {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 0.75rem);
    transform: translateX(-50%);
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
}

.video-controls.active {
    display: flex;
}

.video-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.video-btn:hover {
    opacity: 1;
}

.video-btn svg {
    width: 20px;
    height: 20px;
}

.video-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.video-progress:hover {
    height: 6px;
}

.video-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-family: monospace;
    white-space: nowrap;
}

#lightbox-image {
    transition: opacity 0.3s ease, transform 0.15s ease;
    position: relative;
    z-index: 2;
    transform-origin: center center;
}

.lightbox.zoomed .lightbox-close,
.lightbox.zoomed .lightbox-prev,
.lightbox.zoomed .lightbox-next,
.lightbox.zoomed .version-switcher {
    opacity: 0;
    pointer-events: none;
}

#lightbox-image.version-fade {
    opacity: 0;
}

#lightbox-image.no-transition {
    transition: none;
}

#lightbox-image-back {
    position: absolute;
    z-index: 1;
    display: block !important;
    animation: none !important;
    opacity: 0;
}

#lightbox-image-back.visible {
    opacity: 1;
}

@keyframes contentAppear {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox.active .lightbox-close {
    animation: controlFadeIn 0.4s ease 0.15s backwards;
}

.lightbox.active .lightbox-prev:not(.nav-hidden) {
    animation: controlSlideRight 0.4s ease 0.2s backwards;
}

.lightbox.active .lightbox-next:not(.nav-hidden) {
    animation: controlSlideLeft 0.4s ease 0.2s backwards;
}

@keyframes controlFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes controlSlideRight {
    from { opacity: 0; transform: translateY(-50%) translateX(-20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes controlSlideLeft {
    from { opacity: 0; transform: translateY(-50%) translateX(20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Version Switcher */
.version-switcher {
    display: none;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    gap: 0.5rem;
}

.version-switcher.active {
    display: flex;
    animation: versionFadeIn 0.3s ease 0.25s backwards;
}

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

.version-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.version-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.version-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.lightbox-caption {
    text-align: center;
    margin-top: 1rem;
    max-width: 600px;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lightbox-caption p {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* ===== Commissions Section ===== */
.commissions {
    background:
        radial-gradient(950px 440px at 90% 30%, rgba(124, 196, 255, 0.06), transparent 60%),
        var(--bg-primary);
}

.pricing-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pricing-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0.35rem;
    border: 1px solid var(--border-color);
}

.character-counter-row {
    display: flex;
    align-items: center;
    position: relative;
}

.character-counter-row .config-price {
    margin-left: auto;
}

.character-counter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.character-counter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.character-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.character-btn:hover {
    background: var(--accent-gradient);
    color: white;
}

.character-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 1.5rem;
    text-align: center;
}

.hint {
    position: relative;
    margin-left: 0.25rem;
    display: inline-flex;
    vertical-align: middle;
}

.hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: default;
    transition: all var(--transition-normal);
}

.hint-icon:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hint-tooltip {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    z-index: 10;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 260px;
    box-shadow: var(--shadow-lg);
}

.hint:hover .hint-tooltip {
    display: block;
}

.pricing-tab {
    flex: 1;
    cursor: pointer;
}

.pricing-tab input {
    display: none;
}

.pricing-tab span {
    display: block;
    text-align: center;
    padding: 0.6rem 1.25rem;
    border-radius: 9px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.pricing-tab input:checked + span {
    background: var(--accent-gradient);
    color: white;
}

/* Configurator Layout */
.configurator {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: flex-start;
}

.config-spacer {
    width: 280px;
    flex-shrink: 0;
}

.config-options {
    width: 480px;
    flex-shrink: 0;
    max-width: 100%;
}

.config-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.config-group h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.config-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.config-option:hover {
    color: var(--accent-primary);
}

.config-option input[type="radio"],
.config-option input[type="checkbox"] {
    display: none;
}

/* Custom radio */
.config-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--transition-normal);
}

.config-option input[type="radio"]:checked ~ .config-radio {
    border-color: var(--accent-primary);
}

.config-option input[type="radio"]:checked ~ .config-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* Custom checkbox */
.config-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-normal);
}

.config-option input[type="checkbox"]:checked ~ .config-check {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
}

.config-option input[type="checkbox"]:checked ~ .config-check::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    font-size: 0.75rem;
    color: white;
    font-weight: 700;
}

.config-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
}

.config-option:hover .config-label {
    color: var(--text-primary);
}

.config-option input:checked ~ .config-label {
    color: var(--text-primary);
}

.config-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

/* Summary sidebar */
.config-summary {
    position: sticky;
    top: 100px;
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.config-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-line-mult {
    color: var(--accent-primary);
    font-style: italic;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.summary-total-price {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-revisions {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.summary-cta {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
    width: 100%;
}

@media (max-width: 900px) {
    .configurator {
        flex-direction: column;
        align-items: center;
    }

    .config-spacer {
        display: none;
    }

    .config-summary {
        position: static;
        width: 100%;
        max-width: 480px;
    }
}

.pricing-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 2rem;
    letter-spacing: 0.02em;
}

/* ===== TOS Section ===== */
.tos {
    background:
        radial-gradient(1000px 460px at 50% 105%, rgba(74, 144, 217, 0.08), transparent 65%),
        var(--bg-secondary);
}

.tos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tos-general {
    grid-column: 1 / -1;
}

.tos-general ul {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tos-general li {
    justify-content: center;
}

.tos-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.tos-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.tos-will h3 {
    color: #4ade80;
}

.tos-wont h3 {
    color: #f87171;
}

.tos-card ul {
    list-style: none;
    padding: 0;
}

.tos-card li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.tos-card li:last-child {
    border-bottom: none;
}

.tos-general li::before {
    content: '•';
    color: var(--accent-primary);
    font-weight: bold;
}

.tos-will li::before {
    content: '✓';
    color: #4ade80;
    font-weight: bold;
}

.tos-wont li::before {
    content: '✗';
    color: #f87171;
    font-weight: bold;
}

/* ===== Character Models Section ===== */
.models {
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(124, 196, 255, 0.07), transparent 60%),
        var(--bg-primary);
}

.models-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1050px;
    margin: 0 auto;
}

.model-card {
    flex: 0 0 calc(33.333% - 1.334rem);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.models-grid .model-card {
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.models-grid .model-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.model-image-placeholder,
.model-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.models-grid .model-card:hover .model-image {
    transform: scale(1.05);
}

.model-card h3 {
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    color: var(--text-primary);
}

.models-note {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.models-note a {
    color: var(--accent-primary);
    text-decoration: none;
}

.models-note a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .models-grid {
        max-width: 300px;
    }

    .model-card {
        flex: 0 0 100%;
    }
}

/* ===== Contact Section ===== */
.contact {
    background:
        radial-gradient(800px 400px at 25% 110%, rgba(124, 196, 255, 0.08), transparent 60%),
        var(--bg-secondary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.contact-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.contact-card svg {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.contact-card:hover svg {
    color: var(--accent-primary);
}

.contact-card h3 {
    font-size: 1.2rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ctaFadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes scroll {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .tos-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    section {
        padding: 4rem 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ===== Loading State ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Frost Polish ===== */
/* Subtle top-edge light catch on cards, like frost on glass */
.tos-card,
.contact-card,
.model-card,
.config-group,
.config-summary {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tos-card h3,
.contact-card h3 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1.05rem;
    font-weight: 600;
}

.model-card h3 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer p {
    letter-spacing: 0.04em;
}

/* Themed scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #1d2a40;
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: #2a3b58;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
