/*
Theme Name: VRT
Author: 9AM
Author URI: https://9amlabs.com
Description: Custom theme for VRT - Victoria Tsalkani Interior Design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: vrt
*/

/* Work Sans, self-hosted (variable: weight 100–900). The normal latin file is preloaded in header.php. */
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/work-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/work-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Work Sans';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/work-sans-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Work Sans';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/work-sans-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --body-color: #F6F6EE;
    --dark-color: #000000;
}
body{
    font-family: "Work Sans", sans-serif;
}

/* Hover fill (header nav + .hover-fill): bg slides in from the left, out to the right */
.header nav a,
.hover-fill {
    position: relative;
    isolation: isolate;
    transition: color 0.4s ease;
}
.header nav a {
    display: inline-block;
}
.header nav a::before,
.hover-fill::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--dark-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.header nav a:hover,
.hover-fill:hover {
    color: #fff;
}
.header nav a:hover::before,
.hover-fill:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero slider: the clip-path crops the 4:3 box to 16:9; the active slide opens up to full height */
.hero-slide {
    clip-path: inset(12.5% 0);
    transition: clip-path 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-slider .splide__slide.is-active .hero-slide {
    clip-path: inset(0 0);
}

/* Projects slider: images zoom in a little on hover */
.project-slide img {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-slide:hover img {
    transform: scale(1.05);
}

/* Drag cursor: frosted circle that follows the mouse over the projects slider (main.js; mouse only).
   GSAP moves the outer element; the bubble inside scales in/out (GSAP would fold a CSS scale on the
   element it moves into its own transform and keep it at 0) */
.drag-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 45;
    width: 96px;
    height: 96px;
    margin: -72px 0 0 -72px; /* off center: the bubble sits up-left of the mouse pointer */
    pointer-events: none;
}
.drag-cursor__bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: var(--dark-color);
    font-size: 0.875rem;
    background-color: color-mix(in srgb, #ffffff 50%, transparent);
    border: 1px solid color-mix(in srgb, #ffffff 60%, transparent);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: scale(0);
    transform-origin: 75% 75%; /* grows out of the mouse pointer */
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.drag-cursor__bubble i {
    font-size: 1.5rem;
}
.drag-cursor.is-visible .drag-cursor__bubble {
    opacity: 1;
    transform: scale(1);
}
.drag-cursor.is-visible.is-pressed .drag-cursor__bubble {
    transform: scale(0.85);
}

/* Hover fill, light variant: white bg, dark text */
.hover-fill--light::before {
    background-color: #fff;
}
.hover-fill--light:hover {
    color: var(--dark-color);
}

/* Header: frosted + compact on scroll (.is-scrolled, set in main.js) */
.header {
    transition: padding 0.6s cubic-bezier(0.65, 0, 0.35, 1), background-color 0.6s ease, backdrop-filter 0.6s ease, color 0.4s ease;
}
.header.is-scrolled {
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: color-mix(in srgb, #ffffff 60%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Over the video hero (single project with custom_video): white text + white logo until the header turns frosted on scroll.
   The logo is turned white with a filter, so it works whatever fills the svg uses. */
.has-video-hero .header:not(.is-scrolled) {
    color: #fff;
}
/* Black-to-transparent gradient behind the header; fades out on scroll / when the menu opens */
.has-video-hero .header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, #000, transparent);
    pointer-events: none;
    transition: opacity 0.6s ease;
}
.has-video-hero .header.is-scrolled::before,
.menu-open .header::before {
    opacity: 0;
}
.has-video-hero .header:not(.is-scrolled) .logo-svg {
    filter: brightness(0) invert(1);
}
.has-video-hero .header:not(.is-scrolled) nav a::before {
    background-color: #fff;
}
.has-video-hero .header:not(.is-scrolled) nav a:hover {
    color: var(--dark-color);
}

/* < sm the breadcrumb sits below the video on the light bg: back to the dark hover fill */
@media (max-width: 639px) {
    .project-hero .hover-fill--light::before {
        background-color: var(--dark-color);
    }
    .project-hero .hover-fill--light:hover {
        color: #fff;
    }
}

/* Logo: on scroll keep only the line mark, smaller. The wrapper crops the svg to the mark. */
.logo {
    display: block;
    width: 220px;
    height: 94px;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1), height 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.logo-svg {
    display: block;
    width: 220px;
    height: auto;
    transform-origin: 0 0;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1), filter 0.4s ease;
}
.logo-text {
    transition: opacity 0.3s ease;
}
.header.is-scrolled .logo {
    width: 38px;
    height: 62px;
}
.header.is-scrolled .logo-svg {
    transform: scale(0.65);
}
.header.is-scrolled .logo-text {
    opacity: 0;
}
/* < lg: smaller logo on the left; on scroll the mark is already the right size, so no scaling */
@media (max-width: 1023px) {
    .logo {
        width: 140px;
        height: 60px;
    }
    .logo-svg {
        width: 140px;
    }
    .header.is-scrolled .logo {
        width: 37px;
        height: 60px;
    }
    .header.is-scrolled .logo-svg {
        transform: none;
    }
}

/* Navs fade out on scroll / when the menu is open */
.header-fade {
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}
.header.is-scrolled .header-fade,
.menu-open .header-fade {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

/* Menu button: shows on scroll (desktop) or always (< lg) */
.menu-toggle {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.header.is-scrolled .menu-toggle,
.menu-open .menu-toggle {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease 0.2s, visibility 0s linear 0s;
}
@media (max-width: 1023px) {
    .header-fade {
        display: none;
    }
    .menu-toggle {
        opacity: 1;
        visibility: visible;
    }
}
.menu-toggle__lines {
    position: relative;
    display: block;
    width: 28px;
    height: 8px;
}
.menu-toggle__lines span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.menu-toggle__lines span:first-child {
    top: 0;
}
.menu-toggle__lines span:last-child {
    bottom: 0;
}
.menu-open .menu-toggle__lines span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}
.menu-open .menu-toggle__lines span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Header over the open menu */
.menu-open .header {
    color: #fff;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Menu overlay: dark container scales down from the top, then the items come in */
.mobile-menu {
    background-color: var(--dark-color);
    transform: scaleY(0);
    transform-origin: top;
    visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.3s, visibility 0s linear 1s;
}
.menu-open .mobile-menu {
    transform: scaleY(1);
    visibility: visible;
    transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s linear 0s;
}
.mobile-menu__list li {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}
.menu-open .mobile-menu__list li {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    transition: opacity 0.6s ease var(--d), filter 0.6s ease var(--d), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--d);
}
.mobile-menu__list li:nth-child(1) { --d: 0.55s; }
.mobile-menu__list li:nth-child(2) { --d: 0.65s; }
.mobile-menu__list li:nth-child(3) { --d: 0.75s; }

/* Contact info at the bottom: comes in after the menu items */
.mobile-menu__info {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.menu-open .mobile-menu__info {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.9s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.9s;
}

/* Hover: the hovered item goes full white, the others blur */
.mobile-menu__list a {
    display: inline-block;
    color: rgb(255 255 255 / 0.5);
    transition: color 0.4s ease, filter 0.4s ease;
}
.mobile-menu__list a:hover {
    color: #fff;
}
.mobile-menu__list:has(a:hover) a:not(:hover) {
    filter: blur(4px);
}

/* Footer: logo fills its container (the header rule fixes it at 220px) */
.site-footer .logo-svg {
    width: 100%;
}

/* Preloader (animated in main.js with GSAP). Start states live here so nothing flashes before the JS runs. */
.preloader .logo-svg {
    width: 260px;
    overflow: visible; /* let the lettering's blur spill past the viewBox */
}
.preloader .logo-mark {
    opacity: 0;
}
.preloader .logo-text {
    opacity: 0;
}

/* Single project masonry: on hover the photo zooms in a little under a dark overlay with a magnifier
   (pointer cursor, like any link); click opens the lightbox */
.project-gallery__item {
    position: relative;
}
.project-gallery__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgb(0 0 0 / 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.project-gallery__overlay i {
    font-size: 2.5rem;
    transform: scale(0.6);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-gallery__item:hover .project-gallery__overlay,
.project-gallery__item:focus-visible .project-gallery__overlay {
    opacity: 1;
}
.project-gallery__item:hover .project-gallery__overlay i,
.project-gallery__item:focus-visible .project-gallery__overlay i {
    transform: scale(1);
}
.project-gallery__item img,
.project-gallery__item video {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-gallery__item:hover img,
.project-gallery__item:hover video {
    transform: scale(1.05);
}
/* Video item: frame of the video with a round play button on top */
.project-gallery__item--video {
    aspect-ratio: 16 / 9;
}
.project-gallery__item--video video {
    height: 100%;
    object-fit: cover;
}
.project-gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    background-color: #fff;
    color: #000;
    font-size: 1.5rem;
    transform: translate(-50%, -50%);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.project-gallery__item--video:hover .project-gallery__play,
.project-gallery__item--video:focus-visible .project-gallery__play {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Logged in: the fixed header sits under the WP admin bar */
.admin-bar .header {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .header {
        top: 46px;
    }
}

/* Contact page map: greyscale Google Maps embed */
.contact-map iframe {
    filter: grayscale(1);
}
