/* Task 6: Trimmed to exact weights used — 3 families, no unused variants */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;1,300&family=Inter:wght@300;400;700;900&family=Space+Mono&display=swap');

:root {
    --bg: #0b0b0b;
    --text: #f5f5f5;
    --accent: #a0a0a0;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-serif); -webkit-font-smoothing: antialiased; }
.shell { width: 90%; max-width: 1600px; margin: 0 auto; }
.section { padding: 120px 0; border-bottom: 1px solid #1a1a1a; }
.kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 15px; }

/* Navigation */
.site-nav { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 30px 0; background: rgba(11,11,11,0.95); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-row { display: flex; justify-content: space-between; align-items: center; }
.brand { font-family: var(--font-sans); font-weight: 700; letter-spacing: 5px; text-decoration: none; color: #fff; }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-menu a { text-decoration: none; color: #fff; font-family: var(--font-mono); font-size: 10px; opacity: 0.7; transition: opacity 0.3s; }
.nav-menu a:hover { opacity: 1; }

/* Hero */
.hero { height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; background-color: #000; }
.hero-bg-image { position: absolute; inset: 0; z-index: 1; }
.hero-bg-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.1); opacity: 0.35; }
.hero-overlay { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; width: 100%; }
.hero-left-content { max-width: 900px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; }
.docu-title.stylistic-serif { font-family: var(--font-serif); font-weight: 300; font-size: clamp(2.2rem, 5.8vw, 4.8rem); line-height: 1.15; color: #ffffff; margin-bottom: 30px; letter-spacing: -0.01em; }
.kicker.white { color: #ffffff; opacity: 0.8; }
.hero-statement { margin-top: 30px; font-family: var(--font-mono); font-size: 0.75rem; color: #ffffff; opacity: 0.5; letter-spacing: 3px; }
.hero-action-group { display: flex; gap: 15px; margin: 35px 0; }
.hero-btn { display: inline-block; padding: 15px 35px; background: #fff; color: #000; font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; text-decoration: none; font-weight: 700; border: 1px solid #fff; transition: all 0.4s ease; }
.hero-btn:hover { background: transparent; color: #fff; border: 1px solid #fff; }
.hero-btn.alt-btn { background: transparent; color: #fff; border: 1px solid #fff; }
.hero-btn.alt-btn:hover { background: #fff; color: #000; }

/* IDENTITY SECTION — CHANGE 2: no frame, CHANGE 4: artist name */
.med-title-serif { font-family: var(--font-serif); font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 25px; line-height: 1.2; }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.about-text-artistic { padding-right: 40px; }
.ethos-manifesto .manifesto-lead { font-family: var(--font-serif); font-style: italic; font-size: 1.4rem; color: #fff; margin-bottom: 16px; line-height: 1.5; opacity: 0.95; }

/* CHANGE 4: Artist name display */
.artist-name-display {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.6;
    margin-bottom: 20px;
}

.ethos-manifesto .intro-para { font-family: var(--font-sans); font-weight: 300; font-size: 0.95rem; line-height: 1.7; color: var(--accent); margin-bottom: 35px; }
.technical-meta { border-top: 1px solid #222; padding-top: 25px; }
.meta-item { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; margin-bottom: 12px; letter-spacing: 1px; }
.meta-item strong { color: #fff; font-weight: normal; }
.meta-item span { color: var(--accent); }
.about-visual-artistic { display: flex; justify-content: center; }

/* CHANGE 2: Frame removed — no-frame class strips the decorative border */
.artistic-image-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #000;
    padding: 25px;
    border: 1px solid #222;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
/* Task 4: Portrait always full color — grayscale and hover effect removed. Size reduced slightly. */
.artistic-image-wrap.no-frame {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    max-width: 360px; /* reduced from 480px for better balance */
}
/* Original frame-matte-border no longer rendered in HTML, kept in CSS for safety */
.frame-matte-border { position: absolute; inset: 15px; border: 1px solid rgba(255,255,255,0.1); pointer-events: none; }
.bio-img { width: 100%; height: auto; display: block; filter: none; } /* always color, no transition */

/* Gallery */
.main-gallery-grid.modular-three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Gallery subsection divider + kicker-style label */
.gallery-subsection { margin-top: 60px; }
.gallery-subsection:first-child { margin-top: 0; }
.gallery-sub-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1a1a1a;
}

/* Panoramic / wide gallery grid — one per row, cinematic ratio */
.wide-gallery-grid { display: flex; flex-direction: column; gap: 20px; }
.wide-art-card {
    aspect-ratio: 16 / 7 !important; /* override the square 4/5 from .art-card */
    width: 100%;
}
.wide-art-card img { object-fit: cover; }

/* CHANGE 5: Art card with noticeable VIEW IN ROOM badge */
.art-card {
    cursor: pointer;
    overflow: hidden;
    background: #121212;
    aspect-ratio: 4/5;
    border: 1px solid #1a1a1a;
    transition: border-color 0.4s;
    position: relative;
}
.art-card:hover { border-color: #444; }
.art-card img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.art-card:hover img { transform: scale(1.03); filter: grayscale(0%); }

/* VIEW IN ROOM badge — revealed on hover (desktop) or touch-focused (mobile) */
.view-in-room-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 7px 16px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
    pointer-events: none;
}
/* Desktop hover */
.art-card:hover .view-in-room-badge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
/* Task 1: First tap on mobile reveals badge */
.art-card.touch-focused .view-in-room-badge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
/* Task 1: Subtle image activation on touch-focused (matches hover feel) */
.art-card.touch-focused img {
    transform: scale(1.03);
    filter: grayscale(0%);
}
.art-card.touch-focused { border-color: #444; }

/* Exhibition art card — keep full-width image layout */
.exhibition-art-card {
    aspect-ratio: unset !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
}
.exhibition-art-card img {
    width: 100%;
    height: auto;
    object-fit: unset !important;
    display: block;
}

/* Library Archives Shelf */
.shelf-outer-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.shelf-container.full-width-shelf { width: 100%; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.shelf-container.full-width-shelf::-webkit-scrollbar { display: none; }
.shelf-track { display: flex; gap: 20px; padding: 40px 10px; }

/* Task 2: Archive shelf color states — single active winner + immediate adjacent near */
.shelf-item { flex: 0 0 280px; height: 380px; transition: transform 0.4s ease; border: 1px solid #1f1f1f; }
.shelf-item img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: filter 0.4s ease, opacity 0.4s ease;
}
.shelf-item.shelf-near img   { filter: grayscale(55%); opacity: 0.72; }
.shelf-item.shelf-active img { filter: grayscale(0%);  opacity: 1; }
.shelf-item:hover img        { filter: grayscale(0%);  opacity: 1; }
.shelf-item:hover            { transform: translateY(-10px); border-color: #555; }

/* Mobile close button — fixed overlay-level, hidden on desktop */
.close-shop-mobile {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3100;
    width: 44px;
    height: 44px;
    background: rgba(15,15,15,0.92);
    border: 1px solid #333;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.shelf-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(11,11,11,0.85); border: 1px solid #333; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: all 0.3s ease; }
.shelf-arrow:hover { background: #fff; color: #000; border-color: #fff; }
.shelf-arrow svg { width: 24px; height: 24px; fill: currentColor; }
.left-arrow { left: -25px; }
.right-arrow { right: -25px; }

/* Base Shop Structure */
.shop-overlay { position: fixed; inset: 0; background: rgba(11,11,11,0.98); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(20px); }
.shop-overlay.active { display: flex; }
.shop-container { width: 90%; max-width: 1200px; max-height: 90vh; background: #0f0f0f; padding: 50px; position: relative; border: 1px solid #222; overflow-y: auto; }
.close-shop { position: absolute; top: 25px; right: 25px; background: none; border: none; font-size: 24px; cursor: pointer; color: #fff; transition: opacity 0.3s; }
.close-shop:hover { opacity: 0.6; }
.shop-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; }

.shop-image-wrapper {
    position: relative;
    width: 100%;
    height: 530px;
    background: #e5e5e5;
    border: 1px solid #1c1c1c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.shop-image-wrapper.maximized {
    position: fixed;
    inset: 40px;
    width: calc(100% - 80px);
    height: calc(100vh - 80px);
    z-index: 2500;
    box-shadow: 0 50px 100px rgba(0,0,0,0.9);
}

.standalone-view-container { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; padding: 40px; background: #090909; }
.standalone-view-container.active-view { display: flex; }

.preview-frame-border {
    border: 0px solid #000;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: border-color 0.3s ease, border-width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-frame-matte {
    background: #ffffff;
    padding: 0px;
    transition: padding 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-frame-matte img { max-height: 55vh; width: auto; object-fit: contain; display: block; }

/* Task 1: Mobile modal — natural aspect ratio, no cropping, full piece visible */
@media (max-width: 768px) {
    .shop-image-wrapper { height: auto; min-height: 300px; }
    .standalone-view-container { padding: 20px; height: auto; min-height: 300px; }
    .preview-frame-matte img {
        max-height: 45vh;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* DYNAMIC CANVAS FLUID MANIPULATION & AR MOTOR */
.room-visualizer-container {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0;
    background: #fdfdfd;
    transition: opacity 0.4s ease;
}
.room-visualizer-container.active { display: flex; flex-direction: column; opacity: 1; }
.room-canvas-container { position: relative; width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; }

#arVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none;
    background: #f4f4f4;
}

.room-bg {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-image 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}
.room-bg[data-room-active="camera"] {
    background-image: none !important;
    background: transparent !important;
}

.wall-frame-shadow {
    position: absolute;
    left: 50%;
    top: 45%;
    width: 25%;
    transform: translate(-50%, -50%);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.25);
    z-index: 5;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.wall-frame-shadow:active { cursor: grabbing; }

.wall-frame-border { border-style: solid; background: #0a0a0a; width: 100%; display: flex; align-items: center; justify-content: center; transition: border-color 0.3s ease, border-width 0.3s ease; }
.wall-frame-matte { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transition: padding 0.3s ease, background-color 0.3s ease; }
.wall-frame-matte img { width: 100%; height: auto; object-fit: contain; display: block; pointer-events: none; }

/* Floating Controls — CHANGE 6: only maximize, no download */
.visualizer-actions { position: absolute; top: 20px; right: 20px; display: flex; gap: 10px; z-index: 50; }
.action-circle-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(0, 0, 0, 0.1); color: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(8px); transition: all 0.3s ease; }
.action-circle-btn:hover { background: #000; color: #fff; border-color: #000; transform: translateY(-2px); }
.action-circle-btn svg { width: 18px; height: 18px; }

.shop-controls { display: flex; flex-direction: column; justify-content: center; }
.bold-text { font-family: var(--font-serif); font-weight: 300; text-transform: uppercase; letter-spacing: 1px; font-size: 2.2rem; margin-bottom: 25px; color: #fff; border-bottom: 1px solid #222; padding-bottom: 15px; }
.control-row { margin-bottom: 18px; }
.control-row label { display: block; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; margin-bottom: 8px; color: var(--accent); letter-spacing: 2px; }
.control-row select { width: 100%; padding: 14px; background: #151515; border: 1px solid #2a2a2a; color: #fff; font-family: var(--font-sans); font-size: 13px; outline: none; transition: border-color 0.3s; }
.control-row select:focus { border-color: #666; }

.manipulation-hud {
    position: absolute;
    bottom: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 30;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 85%;
    max-width: 500px;
}
.manipulation-hud label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; color: #333; letter-spacing: 1px; white-space: nowrap; }
.manipulation-hud input[type="range"] { flex: 1; accent-color: #000; cursor: pointer; }
.hud-capture-btn { display: none; background: #000; color: #fff; border: none; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 14px; border-radius: 20px; cursor: pointer; transition: background 0.3s; }
.hud-capture-btn:hover { background: #333; }

.room-selector-menu { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(255,255,255,0.95); padding: 5px 10px; border-radius: 30px; backdrop-filter: blur(8px); border: 1px solid #e0e0e0; z-index: 30; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.room-tab { background: none; border: none; color: #666; font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; padding: 6px 12px; cursor: pointer; border-radius: 20px; text-transform: uppercase; transition: all 0.3s ease; }
.room-tab.active, .room-tab:hover { background: #000; color: #fff; }
.room-tab.ar-camera-tab { border: 1px dashed #000; }

.ar-btn { width: 100%; padding: 16px; background: #222; color: #fff; border: 1px solid #333; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; cursor: pointer; transition: 0.3s; margin-top: 15px; display: flex; align-items: center; justify-content: center; }
.ar-btn:hover { background: #fff; color: #000; border-color: #fff; }
.checkout-btn { width: 100%; padding: 18px; background: #fff; color: #000; border: none; font-family: var(--font-sans); font-weight: 700; font-size: 12px; letter-spacing: 2px; cursor: pointer; transition: 0.3s; margin-top: 12px; text-transform: uppercase; }
.checkout-btn:hover { background: #ccc; }

/* FOOTER — CHANGE 8-10: right-aligned block, left side empty */
.footer { border-top: 1px solid #1a1a1a; padding: 100px 0; }
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.footer-left-empty {
    /* intentionally empty */
    flex: 1;
}
.footer-right-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}
.big-ms { font-family: var(--font-sans); font-weight: 900; font-size: clamp(4rem, 11vw, 11rem); line-height: 0.8; letter-spacing: -0.08em; color: #fff; }
.bold-footer { font-family: var(--font-mono); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-top: 15px; font-size: 10px; color: var(--accent); }

/* Task 5: Footer — email & instagram visually secondary to MS; same size, mono, compact */
.instagram-link {
    display: inline-block;
    margin-top: 14px;
    color: #fff;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}
.instagram-link:hover { opacity: 1; }
.instagram-username {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1.1vw, 0.75rem);
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-email { margin-top: 8px; }
.main-email {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1.1vw, 0.75rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}
.main-email:hover { opacity: 1; }

/* Responsiveness Media Gates */
@media (max-width: 1024px) {
    .main-gallery-grid.modular-three-col { grid-template-columns: repeat(2, 1fr); }
    /* .wide-gallery-grid already flex column — no change needed */
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .shop-layout { grid-template-columns: 1fr; gap: 30px; }
    .exhibitions-container { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
    .main-gallery-grid.modular-three-col { grid-template-columns: 1fr; }
    /* Wide cards stay full-width single column naturally; reduce ratio slightly for phone */
    .wide-art-card { aspect-ratio: 16 / 9 !important; }
    .footer-row { flex-direction: column; align-items: flex-end; gap: 40px; }
    .footer-left-empty { display: none; }
    .shelf-arrow { display: none; }
    .shop-container { padding: 30px 20px; }
    .shop-image-wrapper.maximized { inset: 10px; width: calc(100% - 20px); height: calc(100vh - 20px); }
    .manipulation-hud { width: 92%; padding: 8px 12px; bottom: 60px; gap: 8px; }
    .room-selector-menu { width: 92%; overflow-x: auto; white-space: nowrap; justify-content: flex-start; }

    /* Task 1 (mobile): show mobile close button, hide desktop one */
    .close-shop { display: none; }
    .close-shop-mobile { display: flex; }
    /* Note: badge visibility on mobile handled by .art-card.touch-focused via JS */

    /* Task 7: Hero — tighter mobile scaling */
    .hero { align-items: flex-end; padding-bottom: 60px; }
    .hero-left-content { padding: 0 4px; max-width: 100%; }
    .docu-title.stylistic-serif { font-size: clamp(1.7rem, 8.5vw, 2.6rem) !important; margin-bottom: 20px; line-height: 1.2; }
    .hero-statement { font-size: 0.6rem; letter-spacing: 2px; margin-top: 20px; }
    .hero-action-group { flex-direction: column; width: 100%; gap: 10px; margin: 22px 0; }
    .hero-btn { text-align: center; width: 100%; padding: 13px 20px; font-size: 10px; }

    /* Task 8: Nav — tighter mobile layout */
    .site-nav { padding: 14px 0; }
    .brand { font-size: 12px; letter-spacing: 3px; }
    .nav-menu { gap: 14px; }
    .nav-menu a { font-size: 8.5px; letter-spacing: 1.5px; }
}

/* Task 8: Nav — extra small screens, prevent crowding */
@media (max-width: 400px) {
    .nav-menu { gap: 10px; }
    .nav-menu li:nth-child(3) { display: none; } /* hide Archives on very small, least critical link */
    .nav-menu a { font-size: 8px; letter-spacing: 1px; }
}