/* ═══════════════════════════════════════════════════════════════
   SILENT ART WORLD — Custom Styles
   Artist Portfolio for Kanupriya
   Theme: Dark Luxury Gallery with Warm Gold Accents & High Legibility
   ═══════════════════════════════════════════════════════════════ */

/* ─── FONT FACES ─── */
@font-face {
    font-family: 'Inter';
    src: url('../libs/fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../libs/fonts/playfair-display-var.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

/* ─── CUSTOM PROPERTIES ─── */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #131313;
    --bg-tertiary: #1c1c1c;
    --bg-card: rgba(22, 22, 22, 0.7);

    --gold-luminous: #faecd0;
    --gold-light: #e6cb99;
    --gold: #c9a96e;
    --gold-rich: #b38e4c;
    --gold-dark: #826330;
    --gold-glow: rgba(201, 169, 110, 0.22);

    --text-primary: #f8f5ee;
    --text-secondary: #ded6c5;
    --text-muted: #9e9482;

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── BASE RESET ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-rich); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--gold-luminous); }

::selection {
    background: var(--gold);
    color: var(--bg-primary);
}

/* ─── PRELOADER ─── */
#preloader {
    transition: opacity 0.8s var(--ease-smooth), visibility 0.8s;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-brush {
    width: 60px;
    height: 60px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    border-top-color: transparent;
    animation: preloaderSpin 1s linear infinite;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--bg-tertiary);
    border-radius: 1px;
    overflow: hidden;
    margin: 0 auto;
}

.preloader-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-luminous));
    border-radius: 1px;
    animation: preloaderFill 2s var(--ease-smooth) forwards;
}

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

@keyframes preloaderFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* ─── CUSTOM CURSOR ─── */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 7px;
    height: 7px;
    background: var(--gold-luminous);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    box-shadow: 0 0 10px rgba(201, 169, 110, 0.8);
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(201, 169, 110, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-smooth), height 0.4s var(--ease-smooth),
                border-color 0.3s, opacity 0.3s;
    opacity: 0.6;
}

body:hover .custom-cursor,
body:hover .cursor-follower {
    opacity: 1;
}

.custom-cursor.hovering {
    width: 14px;
    height: 14px;
    background: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.cursor-follower.hovering {
    width: 52px;
    height: 52px;
    border-color: var(--gold-luminous);
    background: rgba(201, 169, 110, 0.08);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .custom-cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
}

/* ─── NAVIGATION DOTS ─── */
#nav-dots {
    background: rgba(10, 10, 10, 0.5);
    padding: 12px 8px;
    border-radius: 24px;
    border: 1px solid rgba(201, 169, 110, 0.15);
    backdrop-filter: blur(8px);
}

.nav-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid var(--gold-rich);
    background: rgba(10, 10, 10, 0.8);
    cursor: none;
    position: relative;
    transition: all 0.4s var(--ease-smooth);
    padding: 0;
}

.nav-dot::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--gold-light);
    transform: scale(0);
    transition: transform 0.4s var(--ease-bounce);
}

.nav-dot.active {
    border-color: var(--gold-luminous);
    box-shadow: 0 0 12px rgba(201, 169, 110, 0.6);
}

.nav-dot.active::before {
    transform: scale(1);
}

.nav-dot-label {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--gold-luminous);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    background: rgba(16, 16, 16, 0.92);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(201, 169, 110, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.nav-dot:hover .nav-dot-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ─── HERO SECTION ─── */
.hero-section {
    background: #080808;
    position: relative;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(8, 8, 8, 0.2) 0%, rgba(8, 8, 8, 0.65) 60%, rgba(8, 8, 8, 0.95) 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-overlay {
    position: relative;
    z-index: 5;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    margin: 0;
    line-height: 1.05;
}

.hero-title .title-line {
    opacity: 0;
    transform: translateY(40px);
    display: block;
    text-shadow:
        0 4px 25px rgba(0, 0, 0, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(201, 169, 110, 0.25);
}

.hero-title .title-line-1 {
    color: var(--gold-luminous);
    background: linear-gradient(180deg, #ffffff 10%, #e2caa0 60%, #b88d4c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title .title-line-2 {
    color: var(--gold-light);
    background: linear-gradient(180deg, #f5ebd7 0%, #d4b47d 50%, #9c7739 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    opacity: 0;
    transform: scaleX(0);
    box-shadow: 0 0 10px rgba(201, 169, 110, 0.5);
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    color: var(--gold-light);
    letter-spacing: 0.3em;
    font-weight: 500;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.95);
}

.hero-artist {
    opacity: 0;
    transform: translateY(20px);
    color: var(--gold-luminous);
    font-size: 2rem;
    letter-spacing: 0.1em;
    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.95),
        0 0 25px rgba(201, 169, 110, 0.4);
}

.scroll-indicator {
    opacity: 0;
    animation: fadeInUp 1s 2.5s forwards;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold-light), transparent);
    margin: 8px auto 0;
    position: relative;
    overflow: hidden;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #ffffff, transparent);
    animation: scrollArrowMove 2s ease-in-out infinite;
}

@keyframes scrollArrowMove {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ─── STORY SECTIONS ─── */
.story-section {
    position: relative;
    border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.story-section:nth-child(even) {
    background: #111111;
}

.story-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gold-rich), transparent);
    opacity: 0.4;
}

.section-label {
    position: relative;
    display: inline-block;
    color: var(--gold-light) !important;
    font-weight: 600;
    letter-spacing: 0.45em;
    text-shadow: 0 0 10px rgba(201, 169, 110, 0.3);
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--gold-rich);
    box-shadow: 0 0 8px rgba(201, 169, 110, 0.4);
}

/* ─── HEADINGS & STORY TEXT ─── */
h2 {
    color: var(--gold-luminous) !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(201, 169, 110, 0.15);
    line-height: 1.2;
}

.story-text p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.85;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.story-lead {
    color: var(--text-primary) !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
}

/* ─── PAINTING FRAMES ─── */
.painting-frame {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #171717;
    border: 1px solid rgba(201, 169, 110, 0.25);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.75),
        0 0 35px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth), border-color 0.5s;
}

.painting-frame:hover {
    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.85),
        0 0 50px var(--gold-glow);
    border-color: rgba(201, 169, 110, 0.6);
    transform: translateY(-5px);
}

.painting-frame img {
    transition: transform 0.9s var(--ease-smooth);
}

.painting-frame:hover img {
    transform: scale(1.035);
}

/* Gold corner decorations */
.frame-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--gold-light);
    border-style: solid;
    opacity: 0.4;
    transition: opacity 0.4s, transform 0.4s var(--ease-smooth);
    z-index: 3;
    pointer-events: none;
}

.painting-frame:hover .frame-corner {
    opacity: 1;
}

.frame-corner-tl { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.frame-corner-tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
.frame-corner-bl { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
.frame-corner-br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

.painting-frame:hover .frame-corner-tl { transform: translate(-2px, -2px); }
.painting-frame:hover .frame-corner-tr { transform: translate(2px, -2px); }
.painting-frame:hover .frame-corner-bl { transform: translate(-2px, 2px); }
.painting-frame:hover .frame-corner-br { transform: translate(2px, 2px); }

.painting-caption {
    color: var(--text-muted);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    transition: color 0.3s;
}

.painting-frame:hover + .painting-caption {
    color: var(--gold-light);
}

.painting-frame-tall {
    max-height: 680px;
}

.painting-frame-featured {
    border: 1px solid rgba(201, 169, 110, 0.4);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.85),
        0 0 60px rgba(201, 169, 110, 0.2);
}

/* ─── WARRIOR SECTION ─── */
.warrior-bg-glow {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.2) 0%, rgba(201, 169, 110, 0.05) 50%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}

.warrior-sanskrit {
    font-family: var(--font-heading);
    color: var(--gold-luminous);
    text-shadow:
        0 4px 30px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(201, 169, 110, 0.4);
}

/* ─── GALLERY ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #161616;
    border: 1px solid rgba(201, 169, 110, 0.15);
    cursor: none;
    aspect-ratio: 3/4;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth), border-color 0.5s;
}

.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-smooth);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.8),
        0 0 40px var(--gold-glow);
    border-color: rgba(201, 169, 110, 0.6);
    z-index: 4;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 8, 0.95) 0%, rgba(8, 8, 8, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

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

.gallery-item-overlay h3 {
    color: var(--gold-luminous) !important;
    font-size: 1.35rem;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.gallery-item-overlay p {
    color: var(--gold-light) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-item-wide {
        grid-column: span 2;
    }
    .gallery-item-tall {
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item-wide {
        grid-column: span 1;
    }
}

/* ─── CONTACT SECTION ─── */
.contact-bg-strokes {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(201, 169, 110, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--gold-luminous);
    background: rgba(18, 18, 18, 0.8);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: all 0.4s var(--ease-smooth);
    cursor: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.contact-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-rich));
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-smooth);
    z-index: 0;
}

.contact-btn:hover {
    color: #0a0a0a !important;
    border-color: var(--gold-luminous);
    box-shadow: 0 15px 35px rgba(201, 169, 110, 0.35);
    transform: translateY(-2px);
}

.contact-btn:hover::before {
    transform: translateY(0);
}

.contact-btn span, .contact-btn svg {
    position: relative;
    z-index: 1;
}

.contact-btn svg {
    transition: transform 0.3s var(--ease-bounce);
}

.contact-btn:hover svg {
    transform: scale(1.15);
}

/* ─── LIGHTBOX ─── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4, 4, 4, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease-smooth), visibility 0.5s;
    backdrop-filter: blur(14px);
    cursor: none;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 40px;
    color: var(--gold-luminous);
    background: none;
    border: none;
    cursor: none;
    transition: transform 0.3s, color 0.3s;
    z-index: 10001;
    font-family: var(--font-body);
    line-height: 1;
    text-shadow: 0 0 15px rgba(201, 169, 110, 0.5);
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.15);
    color: #ffffff;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 88vh;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.5s var(--ease-bounce);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    box-shadow: 0 35px 120px rgba(0, 0, 0, 0.9);
}

.lightbox-info {
    margin-top: 20px;
}

.lightbox-info h3 {
    color: var(--gold-luminous) !important;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.lightbox-info p {
    color: var(--gold-light) !important;
    font-size: 1.05rem;
}

/* ─── FOOTER ─── */
footer {
    background: #080808;
}

/* ─── REVEAL ANIMATIONS (initial states — GSAP handles the rest) ─── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
}

.reveal-gallery {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 992px) {
    .hero-title .title-line {
        font-size: 4rem !important;
    }
    .warrior-bg-glow {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .hero-title .title-line {
        font-size: 3rem !important;
    }
    .story-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }
    .story-section::before {
        height: 40px;
    }
    .painting-frame-tall {
        max-height: 450px;
    }
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title .title-line {
        font-size: 2.2rem !important;
    }
}

/* ─── UTILITY ─── */
.text-balance {
    text-wrap: balance;
}
