/* ==========================================================================
   KAMBIZ KHOSRAVI CORE STYLESHEET
   File: css/core.css
   ========================================================================== */

/* ==========================================================================
   [SECTION 1] VARIABLES & CONFIGURATION
   ========================================================================== */
:root {
    /* Brand Palette — Luxe Real Estate */
    --bg-color: #0a0a0f;
    --bg-secondary: #111118;
    --text-main: #ffffff;
    --text-muted: #8a8a9a;
    --accent: #ceb776;
    --accent-light: #e6c86e;
    --accent-dark: #a08030;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Layout & Spacing */
    --header-height: 75px;
    --container-width: 1400px;
    --radius-card: 0px;
    --gutter-x: 40px;

    /* Effects */
    --glass-bg: rgba(10, 10, 15, 0.88);
    --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   [SECTION 2] RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto !important;
    width: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    letter-spacing: -0.01em;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter-x);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--gutter-x);
}

.section-padding {
    padding: 160px 0;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   [SECTION 3] TYPOGRAPHY UTILITIES
   ========================================================================== */
.text-hero {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.95;
    font-weight: 700;
    color: #fff;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
    font-family: var(--font-heading);
}

@media (max-width: 768px) {
    .text-hero {
        font-size: 3rem;
    }
}

.text-sub {
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-top: 20px;
    border-left: 2px solid rgba(201, 168, 76, 0.3);
    padding-left: 20px;
}

.text-sub-light {
    font-size: clamp(1.6rem, 2.5vw, 2.5rem);
    color: #cccccc;
    font-weight: 400;
    line-height: 1.3;
    max-width: 1100px;
    margin: 0 auto;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
}

/* ==========================================================================
   [SECTION 4] ANIMATION UTILITIES
   ========================================================================== */
.reveal-wrap {
    overflow: hidden;
    display: block;
    line-height: 1.1;
    padding-bottom: 5px;
}

.reveal-content {
    display: block;
    transform: translateY(110%);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.is-visible .reveal-content {
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   [SECTION 5] NAVIGATION (DESKTOP)
   ========================================================================== */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: auto;
}

.navbar {
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
    display: flex;
    align-items: center;
    width: 100%;
    transition: var(--transition-slow);
}

.navbar.scrolled {
    background-color: rgba(10, 10, 15, 0.97);
    border-bottom: 1px solid var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    padding-left: var(--gutter-x);
    padding-right: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.logo-title {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* --- Desktop Navigation Defaults --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
    height: 100%;
    margin-left: auto;
    margin-right: 35px;
    list-style: none;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
    font-family: var(--font-body);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* --- Mobile-Specific Defaults (Hidden on Desktop) --- */
.mobile-only,
.mobile-menu-footer {
    display: none;
}

.nav-action {
    display: flex;
    align-items: center;
    height: 100%;
}

.cta-box {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.05em;
    font-family: var(--font-body);
}

.cta-box:hover {
    background: #fff;
    color: var(--bg-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--text-main);
    z-index: 2000;
    transition: all 0.3s ease;
}

/* ==========================================================================
   NAVIGATION MOBILE LOGIC (Max-Width 1024px)
   ========================================================================== */
@media (max-width: 1024px) {

    #header-placeholder {
        position: relative !important;
        height: var(--header-height);
        width: 100%;
        z-index: 4000 !important;
        background: transparent;
        display: block;
    }

    #header-placeholder .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        transform: translateZ(0);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        will-change: transform;
    }

    #header-placeholder.layer-boost {
        z-index: 6000 !important;
    }

    .navbar .container-fluid {
        padding-left: 20px !important;
        padding-right: 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 40px 40px 40px;
        gap: 10px;
        box-sizing: border-box;
        margin: 0;
        z-index: 4001;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links .nav-item {
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        margin-bottom: 0px;
    }

    .nav-links a {
        font-family: var(--font-heading);
        font-size: clamp(2rem, 7vw, 3.5rem);
        font-weight: 700;
        color: transparent;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
        line-height: 1.1;
        display: block;
        transition: all 0.3s ease;
        padding: 8px 0;
        text-transform: none;
        letter-spacing: -0.02em;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff;
        -webkit-text-stroke: 0;
        transform: translateX(20px);
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .highlight-link {
        color: var(--accent) !important;
        -webkit-text-stroke: 0 !important;
        margin-top: 10px;
        font-size: clamp(2rem, 7vw, 3.5rem) !important;
    }

    .cta-box {
        display: none;
    }

    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--accent), var(--accent-dark));
        color: var(--bg-color);
        height: 100%;
        width: 85px;
        padding: 0;
        margin: 0;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        z-index: 4002 !important;
    }

    .hamburger i {
        font-size: 1.6rem;
    }

    .hamburger.is-active {
        background: var(--bg-color);
        color: var(--accent);
    }

    .mobile-menu-footer {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-top: auto;
        width: 100%;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        opacity: 0;
        transform: translateY(20px);
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    }

    .nav-links.active .mobile-menu-footer {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.4s;
    }

    .menu-label {
        font-family: 'Courier New', monospace;
        color: var(--accent);
        font-size: 0.7rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        margin-bottom: 20px;
        opacity: 0.8;
    }

    .menu-socials {
        display: flex;
        gap: 5px;
        margin-bottom: 10px;
        align-items: center;
        flex-wrap: wrap;
    }

    .menu-socials a {
        font-size: 1.2rem !important;
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        color: #fff !important;
        -webkit-text-stroke: 0 !important;
        background: rgba(255, 255, 255, 0.03);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        text-decoration: none;
    }

    .menu-socials a:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--bg-color) !important;
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(201, 168, 76, 0.4);
    }

    /* Animation Sequencing */
    .nav-links.active .nav-item:nth-child(1) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.1s;
    }

    .nav-links.active .nav-item:nth-child(2) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
    }

    .nav-links.active .nav-item:nth-child(3) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
    }

    .nav-links.active .nav-item:nth-child(4) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s;
    }

    .nav-links.active .nav-item:nth-child(5) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
    }

    .nav-links.active .nav-item:nth-child(6) {
        animation: menuReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.35s;
    }
}

@keyframes menuReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   [SECTION 6] FOOTER
   ========================================================================== */
.footer-hybrid {
    background-color: #050508;
    color: #fff;
    position: relative;
    z-index: 100;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    overflow: hidden;
}

/* --- PART A: CTA PANEL --- */
.cta-container {
    padding: 100px var(--gutter-x);
    display: flex;
    justify-content: center;
    background-color: var(--bg-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-page="contact"] .cta-container {
    display: none !important;
}

.smart-panel-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    padding: 60px 80px;
    background: #0c0c12;
    border: 1px solid rgba(201, 168, 76, 0.1);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-text {
    display: flex;
    flex-direction: column;
}

.panel-sub {
    font-family: 'Courier New', monospace;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.panel-heading-mask {
    height: 3.2rem;
    overflow: hidden;
    position: relative;
}

.panel-heading {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-heading.hover-state {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent);
    transform: translateY(100%);
}

.panel-icon {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    transition: all 0.4s ease;
    border: 1px solid rgba(201, 168, 76, 0.2);
}

/* Hover */
.smart-panel-cta:hover {
    background: #111118;
    border-color: rgba(201, 168, 76, 0.3);
    transform: translateY(-5px);
}

.smart-panel-cta:hover .panel-heading.original {
    transform: translateY(-100%);
}

.smart-panel-cta:hover .panel-heading.hover-state {
    transform: translateY(0);
}

.smart-panel-cta:hover .panel-icon {
    background: var(--accent);
    color: var(--bg-color);
    transform: rotate(-45deg);
    border-color: var(--accent);
}


/* --- PART B: SCHEMATIC GRID --- */
.footer-schematic {
    background-color: #060609;
}

.schematic-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.schematic-box {
    padding: 60px 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

.schematic-box:last-child {
    border-right: none;
}

.box-label {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: rgba(201, 168, 76, 0.6);
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
    display: block;
}

/* Box A: Brand */
.schematic-brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.schematic-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    max-width: 280px;
}

/* Box B: Coordinates */
.contact-box address {
    font-style: normal;
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.contact-links a {
    display: block;
    color: #666;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.contact-links a:hover {
    color: var(--accent);
}

/* Box C: Social Matrix */
.social-matrix {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-node i {
    font-size: 1rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.social-node:hover {
    padding-left: 10px;
    border-bottom-color: var(--accent);
    color: var(--accent);
}

/* Box D: Navigation */
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    text-decoration: none;
    color: #777;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color 0.3s;
    font-family: var(--font-body);
}

.footer-nav a:hover {
    color: #fff;
}


/* --- PART C: BASEMENT --- */
.footer-base {
    padding: 20px 40px;
    background: var(--bg-color);
}

.base-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mono-text {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.base-links a {
    color: #333;
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-left: 20px;
    transition: color 0.3s;
}

.base-links a:hover {
    color: #fff;
}


/* --- RESPONSIVE FOOTER --- */
@media (max-width: 1024px) {
    .schematic-grid {
        grid-template-columns: 1fr 1fr;
    }

    .schematic-box {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .schematic-box:nth-child(2) {
        border-right: none;
    }

    .panel-heading {
        font-size: 2.5rem;
    }

    .panel-heading-mask {
        height: 2.5rem;
    }

    .smart-panel-cta {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .cta-container {
        padding: 60px 20px;
    }

    .smart-panel-cta {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 20px;
    }

    .panel-text {
        align-items: center;
    }

    .schematic-grid {
        display: flex;
        flex-direction: column;
    }

    .schematic-box {
        border-right: none;
        padding: 50px 20px;
        align-items: center;
        text-align: center;
    }

    .schematic-desc {
        max-width: 100%;
    }

    .social-matrix {
        width: 100%;
        align-items: center;
    }

    .social-node {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    .footer-nav {
        align-items: center;
    }

    .base-flex {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .base-links a {
        margin: 0 10px;
    }

    .panel-heading-mask {
        height: auto !important;
        overflow: visible !important;
        display: block;
        margin: 0 auto;
        padding: 5px 0;
    }

    .panel-heading {
        white-space: normal !important;
        font-size: clamp(2rem, 9vw, 3rem) !important;
        line-height: 1.1 !important;
        display: block;
        width: 100%;
        text-align: center;
        position: relative;
    }

    .panel-heading.hover-state {
        display: none !important;
    }

    .panel-heading.original {
        transform: none !important;
    }

    .smart-panel-cta:hover .panel-heading.original {
        transform: none !important;
    }
}

/* ==========================================================================
   Z-OVERLAP LAYERING (For scrolling sections)
   ========================================================================== */
.z-overlap {
    position: relative;
    z-index: 10;
    background-color: var(--bg-color);
    box-shadow: 0 -50px 100px rgba(0, 0, 0, 0.5);
}

.section-border-top {
    width: 100%;
    height: 1px;
    background: rgba(201, 168, 76, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
}

.section-border-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.z-overlap.is-visible .section-border-top::after {
    width: 100%;
}

/* ==========================================================================
   MONO LABEL UTILITY
   ========================================================================== */
.mono-label {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.12em;
}