/*
Theme Name: SØN
Theme URI: https://sonarchicon.com
Author: 9AM
Author URI: https://9amlabs.com
Description: Custom theme for SØN Architectural Construction.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: son
*/

/* Fraunces, self-hosted (variable: weight 100–900 + optical size).
   The normal latin file is preloaded in header.php. */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/fraunces-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: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/fraunces-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: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/fraunces-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: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/fraunces-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;
}

html {
    overflow-y: scroll;
}

body{
    font-family: "Fraunces", serif;
    background: #F2F0EF;
}

/* Greek text: Fraunces has no Greek glyphs */
.font-gr {
    font-family: "Inter", sans-serif;
}

body,html{
    scroll-behavior: smooth;
}




.preloader-layer {
    width: 100%;
    height: 100%;
    will-change: transform;
}

.preloader-layer-bg {
    background: #F2F0EF;
    z-index: 20;
}

.preloader-layer-black {
    background: #000;
    z-index: 10;
}

.preloader-logo {
    z-index: 30;
}

.preloader-logo .shape,
.preloader-logo .glyph,
.preloader-tagline {
    opacity: 0;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.hero-slider .splide__track,
.hero-slider .splide__list {
    width: 100%;
    height: 100%;
}

.hero-slider .splide__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
}

.hero-slider .splide__slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-slider .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slider img {
  object-position: center bottom;
}

/* Contact page slider: stacked slides, revealed by the clip-path transition */
.contact-slider .splide__track,
.contact-slider .splide__list {
    width: 100%;
    height: 100%;
}

.contact-slider .splide__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
}

.contact-slider .splide__slide.is-active {
    opacity: 1;
    z-index: 1;
}

.contact-slider .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contact form fields */
.contact-input {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    padding: 8px 0;
    font-size: 1.125rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-input:focus {
    border-bottom-color: #000;
}

/* Contact Form 7 states */
.contact-form .wpcf7-form-control-wrap {
    display: block;
}

.contact-form .contact-input.wpcf7-not-valid {
    border-bottom-color: #b91c1c;
}

.contact-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #b91c1c;
}

.contact-form .wpcf7-response-output {
    margin: 32px 0 0 !important;
    padding: 16px !important;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(255, 255, 255, 0.6);
}

.contact-form .wpcf7-form.invalid .wpcf7-response-output,
.contact-form .wpcf7-form.unaccepted .wpcf7-response-output,
.contact-form .wpcf7-form.failed .wpcf7-response-output,
.contact-form .wpcf7-form.aborted .wpcf7-response-output,
.contact-form .wpcf7-form.spam .wpcf7-response-output {
    border-color: #fca5a5 !important;
    background: #fef2f2;
    color: #b91c1c;
}

.contact-form .wpcf7-form.submitting .wpcf7-submit {
    opacity: 0.5;
    pointer-events: none;
}

.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.project{
    img{
        transition: all 0.3s ease-out;
    }
    &:hover{
        img{
            opacity: 0.8;
        }
    }
}

.projects-slider .splide__track {
    overflow: visible;
}

.projects-slider .splide__list {
    align-items: stretch;
}

.drag-bubble {
    top: 0;
    left: 0;
    width: 92px;
    height: 92px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    color: #fff;
    will-change: transform, opacity;
}

/* Burger button (hidden by default) */
.mobile-burger {
    display: flex;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 60;
    transition: all 0.3s ease-out;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.mobile-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #231f20;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Full-screen mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #F2F0EF;
    padding: 80px 28px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    transition: all 0.3s ease-out;
    pointer-events: none;
}
.mobile-menu-overlay.is-open { opacity: 1; pointer-events: all; }
.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.mobile-menu-nav a {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    color: #000;
    line-height: 1;
    text-decoration: none;
    display: inline-block;
}
.mobile-menu-close {
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #231f20;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Inner pages: smaller logo, vertically centered with the menu */
body:not(.home) .header {
    align-items: center;
}
body:not(.home) .header .logo img {
    height: 8rem;
}

/* Inner pages: no dark hero behind the header, so show it dark */
body:not(.home) .header .logo img {
    filter: none;
}
body:not(.home) .main-menu,
body:not(.home) .header .logo-tagline {
    color: #000;
}


/* Project with video hero: white logo + menu over the video (until sticky).
   Below 640px the video sits under the title, so the header stays as on other pages. */
@media (min-width: 640px) {
    body.has-video-hero:not(.sticky-header) .header .logo img {
        filter: invert(1);
    }
    body.has-video-hero:not(.sticky-header) .main-menu,
    body.has-video-hero:not(.sticky-header) .header .logo-tagline {
        color: #fff;
    }
}

/* ------------------------------------------------------------------
   Mobile (< 768px) — responsive overrides
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
    /* Header */
    .header {
        padding: 20px !important;
        align-items: center !important;
    }
    .header .logo img {
        height: 90px !important;
    }
    .header .logo-tagline {
        font-size: 0.55rem !important;
        margin-top: 6px;
    }
    .main-menu {
        padding: 10px 14px !important;
        background: rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(8px);
    }
    .main-menu ul {
        gap: 12px !important;
        font-size: 0.875rem !important;
    }

    /* Burger from the start: hide the inline menu */
    .main-menu {
        display: none !important;
    }
    .mobile-burger {
        opacity: 1;
        pointer-events: all;
    }
    body.sticky-header .header {
        padding: 12px 16px !important;
    }

    /* Hero */
    .hero-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 18px !important;
        bottom: 30px !important;
    }
    .hero-content h1 {
        font-size: 2.75rem !important;
        line-height: 1 !important;
        max-width: 100%;
    }
    .hero-content a {
        font-size: 0.9rem !important;
    }

    /* Projects */
    #projects {
        padding: 40px 20px 60px !important;
    }
    .project-list {
        grid-template-columns: 1fr !important;
        gap: 40px 0 !important;
    }
    .project.translate-y-14 {
        transform: none !important;
        padding-top: 0 !important;
    }
    .project h3 {
        font-size: 1.25rem !important;
    }
    /* Hide "View project" link on mobile */
    .project a.link-underline.opacity-0 {
        display: none !important;
    }

    /* Projects slider variant — keep wrap clipping to prevent page-level x-scroll */
    #projects .projects-slider-wrap {
        margin-bottom: 0 !important;
        overflow: hidden !important;
    }
    .projects-slider .splide__slide {
        touch-action: pan-y;
    }
    .drag-bubble { display: none !important; }

    /* Guard against horizontal scroll on the page */
    html, body { overflow-x: hidden !important; max-width: 100vw; }

    /* Inner pages */
    body:not(.home) #projects {
        padding-top: 160px !important;
    }
    .projects-page-title {
        font-size: 2.75rem !important;
        margin-bottom: 40px !important;
    }
    body:not(.home) .main-menu {
        background: rgba(242, 240, 239, 0.8);
    }
    body:not(.home) .header .logo img {
        height: 70px !important;
    }
    .project-single,
    .contact-page {
        padding: 160px 20px 60px !important;
    }
    .contact-content h1 {
        font-size: 2.75rem !important;
        margin-bottom: 40px !important;
    }
    .project-single-head h1,
    .project-single-head h2 {
        font-size: 2.75rem !important;
    }
    .project-single-head span {
        font-size: 1.125rem !important;
    }

    /* Project with video hero */
    @media (min-width: 640px) {
        body.has-video-hero:not(.sticky-header) .main-menu {
            background: rgba(0, 0, 0, 0.35);
        }
        
    }
    body.has-video-hero .project-single {
        padding-top: 60px !important;
    }
    .project-hero h1 {
        font-size: 2.75rem !important;
    }
    .project-hero span {
        font-size: 1.125rem !important;
    }
}

@media(max-width:620px){
    .projects-page-title{
            margin-bottom:20px !important;
        }
        .project-hero h1,.contact-content h1{
            font-size:1.875rem !important;
        }

        body.has-video-hero .project-single{
            padding-top:20px !important;
        }
        .project-single-head h1, .project-single-head h2{
            font-size:1.875rem !important;
        }
}
/* Contact page (< 640px): projects slider moves to the very top */
@media (max-width: 639px) {
    .contact-projects {
        order: -1;
        padding-top: 160px;
    }
    .contact-page {
        padding-top: 40px !important;
    }
}
