/* =========================================
   HOME PAGE — home.html
   Page-specific sections that only appear on
   the marketing homepage. Shared base styles
   (tokens, cursor, navbar, buttons, hero,
   product cards, footer shell) live in style.css.
   ========================================= */


/* =========================================
   GSAP reveal initial state (flash-free)
   Only applied when JS is present (html.js, set
   synchronously in header.php before paint) and
   only on the homepage. front-page.js reveals
   these with gsap.to(); if GSAP fails to load it
   calls showStatic() to reveal them anyway, so
   content is never left hidden.
   ========================================= */
.js body.home .split-text,
.js body.home .review-card {
    opacity: 0;
    transform: translateY(28px);
    will-change: opacity, transform;
}


/* =========================================
   HERO — full-screen background video
   Replaces the old WebGL/text hero. Fills the
   viewport exactly (100vw × 100vh) with the
   video cover-cropped so it never letterboxes.

   Poster crossfade: a static <img> poster paints
   immediately (no decode delay), the <video> fades
   in on top once it reports `canplay`/`playing`
   (see front-page.js `initHeroPoster()`) so the
   clip never "pops in" abruptly after load.

   Shrink-on-scroll: on first scroll intent, a GPU-
   composited `transform: scale()` + border-radius
   settles the video into a slightly inset "card"
   (94% scale, not a drastic resize) before the page
   is allowed to scroll — see the "overture" pattern
   in front-page.js. Deliberately animates `transform`
   only (never width/height/margin), which is
   compositor-driven and stays smooth at 60fps; a
   layout-triggering resize is what caused the janky
   motion in the previous version.
   ========================================= */
.hero-video {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: block;
    background: var(--bg-void, #030407);
    /* body has overflow-x:hidden, so 100vw won't create a scrollbar. */
}

/* Inner frame is what actually scales + rounds. Keeping the outer
   .hero-video at a constant 100vw/100vh means the shrink never triggers
   layout — only this element's transform/border-radius animate. */
.hero-video__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    transform: scale(1);
    transform-origin: center center;
    will-change: transform, border-radius;
}

.hero-video__frame.is-shrunk {
    border-radius: 1.5rem;
    transform: scale(0.94);
}

/* No text scrim needed on the video hero — kill the inherited one. */
.hero-video::before {
    display: none;
}

.hero-video__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.hero-video__poster.is-hidden {
    opacity: 0;
}

.hero-video__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-video__media.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hero-video__frame,
    .hero-video__poster,
    .hero-video__media {
        transition: none;
    }
}

@media (max-width: 768px) {
    .hero-video__frame.is-shrunk {
        border-radius: 1rem;
        transform: scale(0.96);
    }
}

/* =========================================
   SECTIONS
   ========================================= */

/* Category Showcase */
.categories {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.category-card {
    text-decoration: none;
    color: var(--text-bright);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-img-wrapper {
    aspect-ratio: 4/5;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.category-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    z-index: 1;
    transition: transform var(--transition-smooth);
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-card:hover .category-img-wrapper {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
    transform: scale(1.02);
}

.category-tag {
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent-glow);
    position: relative;
    z-index: 2;
    background: rgba(3, 4, 7, 0.65);
    padding: 0.5rem 1rem;
    border-radius: 1px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Archives / Best Sellers */
.archives {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-light);
}

.product-carousel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Craftsmanship / Anatomy */
.craftsmanship {
    padding: 10rem 0;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(3,4,7,0.2) 0%, rgba(3,4,7,0.4) 50%, rgba(3,4,7,0.2) 100%); backdrop-filter: blur(8px);
}

.craft-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.large-placeholder {
    aspect-ratio: 4/5;
}

.craft-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.craft-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.craft-list h3 {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--accent-glow);
    margin-bottom: 1rem;
}

.craft-list p {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Ethos */
.ethos {
    padding: 12rem 0;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-light);
}

.ethos-container {
    display: flex;
    justify-content: center;
}

.ethos-content {
    max-width: 800px;
    text-align: center;
}

.ethos-heading {
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.1;
    margin-bottom: 3rem;
    font-weight: 500;
}

.ethos-body p {
    font-size: 1.25rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 3rem;
}


/* =========================================
   PREMIUM FOOTER
   ========================================= */
.footer--premium {
    padding: 8rem 0 3rem;
    background-color: var(--bg-void);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-centralized {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-hero-text {
    text-align: center;
    max-width: 700px;
}

.footer-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    line-height: 1;
    color: var(--text-bright);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.footer-subtitle {
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.footer-main-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.footer-nav-side {
    display: flex;
    gap: 3rem;
    width: 100%;
}

.footer-nav-left {
    justify-content: flex-end;
    text-align: right;
}

.footer-nav-right {
    justify-content: flex-start;
    text-align: left;
}

.footer-3d-center {
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.lamp-3d-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#footer-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

.lamp-3d-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lamp-3d-spinner {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-top: 1px solid var(--accent-glow);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

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

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.footer-col a {
    display: block;
    color: var(--text-bright);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    opacity: 0.7;
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent-glow);
    opacity: 1;
    transform: translateX(4px);
}

.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
}

.footer-copyright {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.isvrya-credit {
    position: relative;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2em;
    text-decoration: none;
    color: var(--accent-glow);
    transition: filter 0.3s ease;
}

.isvrya-credit:hover {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

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

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-dim);
    transition: var(--transition-fast);
}

.social-icon:hover {
    color: var(--bg-void);
    background-color: var(--accent-glow);
    border-color: var(--accent-glow);
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .footer-split {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .footer-typography {
        margin: 0 auto;
    }
    
    .footer-nav-grid {
        text-align: left;
    }
    
    .footer-col a:hover {
        transform: translateY(-2px);
    }
    
    .footer-bottom-bar {
        justify-content: center;
        text-align: center;
    }
}
/* =========================================
   AI CLOUD CHAT WIDGET
   ========================================= */
#cloud-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: var(--font-body);
}

#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: #000;
    border: none;
    cursor: pointer; /* Override cursor: none for interactivity */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease;
}

#chat-toggle-btn:hover {
    transform: scale(1.1);
}

#cloud-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform-origin: bottom right;
}

.chat-header {
    padding: 15px 20px;
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 0;
    color: var(--accent-glow);
    letter-spacing: 0.05em;
}

#close-chat-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

#close-chat-btn:hover {
    color: var(--text-bright);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
    align-self: flex-start;
    border-left: 2px solid var(--accent-glow);
}

.chat-message.user {
    background: rgba(212, 175, 55, 0.15);
    color: var(--text-bright);
    align-self: flex-end;
    border-right: 2px solid var(--accent-glow);
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 10px 15px;
    color: var(--text-bright);
    font-family: var(--font-body);
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent-glow);
}

#send-chat-btn {
    background: var(--accent-glow);
    color: #000;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

#send-chat-btn:hover {
    background: #FFF;
}
