/* ==========================================================================
   AERIE GLOBAL | COMMON CORE | PREMIUM DESIGN SYSTEM
   ========================================================================== */

:root {
    /* --- COLOR PALETTE --- */
    --bg-prime: #050505;
    --bg-sec: #0a0a0a;
    --bg-tertiary: #0f0f0f;

    --accent: #d4af37;
    --accent-dim: rgba(212, 175, 55, 0.15);
    --accent-glow: rgba(212, 175, 55, 0.4);

    --text-prime: #ffffff;
    --text-sec: #cccccc;
    --text-dim: #777777;

    --border-light: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(212, 175, 55, 0.3);

    /* --- TYPOGRAPHY --- */
    --font-heading: 'Italiana', serif;
    --font-editorial: 'Lora', serif;
    --font-main: 'Montserrat', sans-serif;

    /* --- SPACING & ANIMATION --- */
    --spacing-page: clamp(1.5rem, 6vw, 6rem);
    --ease-vincent: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    font-size: clamp(12px, 0.9vw + 4px, 18px);
}

@import url('https://fonts.googleapis.com/css2?family=Italiana&family=Lora:ital,wght@0,400;1,400&family=Montserrat:wght@200;300;400;500&display=swap');

/* ==========================================================================
   RESET & GLOBAL BASICS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-prime);
    color: var(--text-prime);
    font-family: var(--font-main);
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    transition: opacity 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-prime);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY UTILITIES
   ========================================================================== */
.section-label {
    font-family: var(--font-main);
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2rem;
    font-weight: 500;
}

.editorial {
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
    opacity: 0.8;
}

.editorial-gold {
    font-family: var(--font-editorial);
    font-style: italic;
    color: var(--accent);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-prime);
}

.section-text {
    font-family: var(--font-editorial);
    font-size: 1.25rem;
    color: var(--text-sec);
    line-height: 1.8;
}

/* Buttons */
.btn-gold,
.btn-outline,
.btn-gold-minimal {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-prime) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

.btn-gold:hover,
.btn-outline:hover,
.btn-gold-minimal:hover {
    background: var(--accent) !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
    border-color: var(--accent) !important;
}

/* ==========================================================================
   SHARED UI COMPONENTS
   ========================================================================== */

/* Cinematic Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem var(--spacing-page);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1010;
    /* Boosted z-index so 'close menu' burger stays on top of overlay (1001) */
    transition: all 0.5s var(--ease-vincent);
    background: rgba(5, 5, 5, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #fff;
}

nav.scrolled {
    padding: 1rem var(--spacing-page);
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1;
    /* Ensures optical vertical centering */
    letter-spacing: 5px;
    color: var(--text-prime);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    /* ensures links vertically center with each other */
    gap: 4rem;
}

.nav-links a {
    font-family: var(--font-main);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
    position: relative;
    padding-bottom: 5px;
    transition: opacity 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: all 0.4s var(--ease-vincent);
    transform: translateX(-50%);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

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

.nav-links a:last-child {
    border: 1px solid var(--accent);
    padding: 0.6rem 1.5rem;
    margin-left: 2rem;
    transition: all 0.3s;
}

.nav-links a:last-child:hover {
    background: var(--accent);
    color: #000;
}

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

/* Mobile Menu Toggle (Burger) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    /* Better distribution */
    width: 44px;
    /* Standards-compliant touch target */
    height: 44px;
    /* Standards-compliant touch target */
    padding: 12px 7px;
    /* Internal hit area padding */
    cursor: pointer;
    z-index: 1005;
}

.burger-line {
    width: 100%;
    height: 2px;
    /* Slightly thicker for visibility */
    background: #fff;
    transition: all 0.3s ease;
}

.burger-menu.open .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.open .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.open .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .burger-menu {
        display: flex;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-prime);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 2rem;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-item {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease-vincent);
}

.mobile-menu-overlay.active .mobile-nav-item {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-item:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-item:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav-item:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu-overlay.active .mobile-nav-item:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu-overlay.active .mobile-nav-item:nth-child(5) {
    transition-delay: 0.5s;
}

/* Animated Cursor */
body {
    cursor: none;
}

#cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 0.2s var(--ease-smooth);
}

#cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.5s var(--ease-vincent), height 0.5s var(--ease-vincent), background 0.5s var(--ease-vincent), border-color 0.5s var(--ease-vincent), opacity 0.5s var(--ease-vincent);
    background: transparent;
}

.cursor-active {
    width: 80px !important;
    height: 80px !important;
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent) !important;
    border-width: 1px !important;
}

/* Page Transitions */
.page-transition-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition-curtain.active {
    transform: scaleY(1);
    transform-origin: bottom;
}

.page-transition-curtain.exit {
    transform: scaleY(0);
    transform-origin: top;
}

.transition-container {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    pointer-events: none;
    justify-content: center;
    align-items: center;
}

.trans-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 33.4%;
    background: #000;
    transform-origin: bottom;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.trans-panel.p1 {
    left: 0;
    transition-delay: 0s;
}

.trans-panel.p2 {
    left: 33.3%;
    transition-delay: 0.1s;
    border-left: 1px solid #141414;
    border-right: 1px solid #141414;
}

.trans-panel.p3 {
    right: 0;
    transition-delay: 0.2s;
}

.trans-logo {
    position: absolute;
    z-index: 20001;
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent);
    letter-spacing: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.transition-container.reveal-page .trans-panel {
    transform: scaleY(0);
    transform-origin: top;
}

.transition-container.exit-page .trans-logo {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.transition-container.exit-page .trans-panel {
    transform: scaleY(1);
    transform-origin: bottom;
}

/* Inquire Overlay V2 (Side Drawer / Non-Blocking) */
.inquire-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Full screen */
    z-index: 15000;
    pointer-events: none;
    /* Let clicks pass through empty space */
}

/* Remove Backdrop to allow viewing content */
.inquire-backdrop {
    display: none;
}

.inquire-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 550px;
    max-width: 90vw;
    height: 100vh;
    background: #080808;
    /* Solid dark color for better contrast/readability */
    border-left: 1px solid var(--accent);
    transform: translateX(101%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    /* MUST be auto to capture clicks */
    cursor: auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
    z-index: 15001;
    /* Ensure above overlay */
}

.inquire-overlay.open .inquire-container {
    transform: translateX(0);
}

.inquire-header {
    padding: clamp(3rem, 10vw, 5rem) clamp(2rem, 5vw, 4rem) 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    /* Clean gradient - no tacky colors */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
    flex-shrink: 0;
}

.inquire-close {
    position: absolute;
    top: 4rem;
    right: 4rem;
    cursor: pointer;
    width: 44px;
    /* Larger hit area */
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dim);
    transition: all 0.4s var(--ease-vincent);
    font-size: 0.8rem;
    z-index: 100;
    /* Ensure on top of header content */
    background: rgba(0, 0, 0, 0.2);
    /* Slight fill for hit detection */
}

.inquire-close:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.inquire-header h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--text-prime);
    margin-top: 1rem;
    line-height: 1;
    letter-spacing: -1px;
}

.section-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.inquire-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: auto;
}

/* Minimalist Form Inputs */
.inquire-form {
    padding: 4rem;
    flex-grow: 1;
}

.form-group {
    position: relative;
    margin-bottom: 3rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    /* Subtle background for hit area */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Explicit border */
    border-radius: 4px;
    /* Slight rounding */
    padding: 1rem 1.2rem;
    color: #fff;
    /* Max contrast */
    font-family: var(--font-main);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: 2px solid var(--accent);
    /* Clear focus ring for accessibility */
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    /* Higher contrast placeholder */
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Ensure modal buttons span correctly */
.inquire-form .btn-gold {
    display: block;
    width: 100%;
    margin-top: 2rem;
    text-align: center;
}

.inquire-footer {
    padding: 3rem 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.contact-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.contact-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.contact-value {
    font-size: 0.9rem;
    color: var(--text-sec);
    font-family: var(--font-editorial);
}

.inquire-sidebar {
    padding: 4rem;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.sidebar-block h4 {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.sidebar-block p {
    font-family: var(--font-editorial);
    color: var(--text-sec);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Service Pillars V2 */
.service-pillars-section {
    padding: 10rem var(--spacing-page);
    background: var(--bg-sec);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pillar-card {
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    transition: all 0.5s var(--ease-vincent);
    text-align: center;
}

.pillar-card:hover {
    background: rgba(212, 175, 55, 0.03);
    border-color: var(--accent);
    transform: translateY(-10px);
}

.pillar-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 2.5rem;
}

.icon-svg {
    width: 100%;
    height: 100%;
    fill: var(--accent);
    opacity: 0.8;
}

.pillar-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.pillar-card p {
    font-size: 0.95rem;
    color: var(--text-sec);
    line-height: 1.6;
}

/* Footer (Unified) */
/* Minimal button style removed - unified into global button styles */

footer {
    position: relative;
    overflow: hidden;
    padding: 8rem var(--spacing-page) 4rem;
    background: #050505;
    border-top: 1px solid var(--border-light);
    color: var(--text-dim);
    font-size: 0.9rem;
}

footer::before {
    content: 'A E R I E';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 30vw;
    color: #ffffff;
    opacity: 0.02;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
}

.footer-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 8rem;
    margin-bottom: 6rem;
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: #fff;
    margin-bottom: 2.5rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-col a {
    position: relative;
    color: var(--text-sec);
    font-size: 1rem;
    transition: 0.4s var(--ease-vincent);
    display: inline-block;
    padding-bottom: 4px;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-vincent);
}

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

.footer-col a:hover::after {
    width: 100%;
}

.footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Global Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 1.2s var(--ease-vincent), opacity 1.2s var(--ease-vincent);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 10001;
    width: 0%;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.1s linear;
}

/* Stats System */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    border-top: 1px solid var(--border-light);
    padding-top: 3rem;
}

.stat-item {
    text-align: left;
}

.stat-item .stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ==========================================================================
   GLOBAL RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 5rem var(--spacing-page) 3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: left;
    }

    .footer-brand p {
        margin-inline: 0;
    }

    .footer-col ul {
        align-items: flex-start;
        gap: 2rem;
    }

    .footer-col a {
        font-family: var(--font-heading);
        font-size: 1.7rem;
        color: #fff;
        line-height: 1.1;
        letter-spacing: 0;
    }

    .footer-col a::after {
        display: none;
        /* remove hover line on touch devices */
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

/* ==========================================================================
   PARALLAX UTILITIES (Hardware Accelerated)
   ========================================================================== */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -10%;
    /* Buffer for nudging the start lower */
    left: 0;
    width: 100%;
    height: 150%;
    /* Increased height for more movement room */
    background-size: cover;
    background-position: top center;
    /* Aligns top of image to top of container */
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

.bg-noise {
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.3;
}

.bg-texture {
    background-image: url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&q=80&w=2000');
    opacity: 0.1;
    mix-blend-mode: soft-light;
}