/* ==========================================================================
   CODENAME: ARYA // ATELIER DARK MODE ARCHITECTURE
   Color Palette: Rich Mocha, Eggshell White, Polished Bronze
   ========================================================================== */

/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Core Palette */
    --bg-base: #1A1412;         /* Rich Mocha Brown */
    --bg-panel: #241C19;        /* Elevated Panel Mocha */
    --accent-main: #CD7F32;     /* Polished Bronze Accent */
    
    /* Typography Colors */
    --text-main: #F0EAD6;       /* Crisp Eggshell White */
    --text-muted: #A69F88;      /* Elegant Muted Tan */
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Animation Physics */
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. GLOBAL RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    font-family: var(--font-body);
    color: var(--text-main);
}

body {
    overflow-x: hidden;
    line-height: 1.8;
    font-weight: 300;
}

/* --- 3. SCROLL REVEAL ANIMATIONS --- */
.fade-up-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up-active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 4. SYSTEM PRELOADER --- */
#preloader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-base);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.preloader-brand {
    font-family: var(--font-heading);
    color: var(--accent-main);
    font-size: 2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 1rem;
}

.intro-console {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- 5. PERSISTENT NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

/* Glass effect triggered by Javascript on scroll */
.navbar.scrolled {
    background: rgba(26, 20, 18, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(240, 234, 214, 0.05);
    padding: 1rem 3rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-brand img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.5rem 0;
    opacity: 0.7;
}

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

/* --- 6. HERO MASTERPIECE --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 10%;
    background: linear-gradient(180deg, rgba(26,20,18,0.3) 0%, var(--bg-base) 100%), 
                url('images/wallpaper.webp') center/cover no-repeat;
}

/* Hero dark gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-tag {
    font-family: var(--font-body);
    color: var(--accent-main);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    font-weight: 500;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    font-style: italic;
    color: var(--accent-main);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Elegant Primary Button */
.btn-elegant {
    display: inline-flex;
    align-items: center;
    padding: 1rem 3rem;
    border: 1px solid var(--accent-main);
    background: transparent;
    color: var(--accent-main);
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-elegant:hover {
    background: var(--accent-main);
    color: var(--bg-base);
}

/* --- 7. ABOUT ATELIER & INTERACTION --- */
.about-section {
    padding: 120px 10%;
    background-color: var(--bg-base);
    position: relative;
    border-top: 1px solid rgba(240, 234, 214, 0.03);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--bg-panel);
    border: 1px solid rgba(205, 127, 50, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    aspect-ratio: 1 / 1;
    border-radius: 2px;
}

/* B&W to Color Hover Reveal */
.true-identity {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    transform: scale(1.02);
    transition: var(--transition-smooth);
    z-index: 1;
}

.about-image-wrapper:hover .true-identity {
    filter: grayscale(0%) contrast(1);
    transform: scale(1);
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.about-text h2 span {
    color: var(--accent-main);
}

/* Zero-Shift Typing Engine Layout */
.typing-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.layout-text {
    visibility: hidden;
    opacity: 0;
    font-size: 1rem;
    line-height: 1.8;
    pointer-events: none;
}

.typing-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 300;
}

.typing-text::after {
    content: '|';
    color: var(--accent-main);
    animation: blink 1s step-end infinite;
}

.typing-complete::after {
    display: none;
}

@keyframes blink {
    50% { color: transparent }
}

/* --- 8. PORTFOLIO & ARCHIVES --- */
.portfolio-section {
    padding: 120px 10%;
    background-color: var(--bg-panel);
    border-top: 1px solid rgba(240, 234, 214, 0.03);
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-main);
}

.section-header h2 span {
    color: var(--accent-main);
    font-style: italic;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-base);
    border: 1px solid rgba(240, 234, 214, 0.03);
    border-radius: 2px;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: block;
    text-decoration: none;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(205, 127, 50, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.project-image-wrapper {
    height: 300px;
    background: #241C19; 
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(240, 234, 214, 0.03);
}

.project-image-wrapper i {
    font-size: 3.5rem;
    color: rgba(240, 234, 214, 0.05);
    transition: var(--transition-smooth);
}

.project-card:hover .project-image-wrapper i {
    color: var(--accent-main);
    transform: scale(1.05);
}

.project-info {
    padding: 2.5rem;
}

.project-tag {
    font-family: var(--font-body);
    color: var(--accent-main);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.project-title {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dedicated Inner Page Header */
.page-header {
    padding: 180px 10% 80px;
    background: linear-gradient(180deg, rgba(26,20,18,0.3) 0%, var(--bg-base) 100%);
    text-align: center;
    border-bottom: 1px solid rgba(240, 234, 214, 0.03);
}

/* --- 9. FORMS & CONSULTATION --- */
.content-wrapper {
    padding: 120px 10%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.form-panel {
    background: var(--bg-panel);
    border: 1px solid rgba(240, 234, 214, 0.03);
    padding: 4rem;
    border-radius: 2px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group { 
    margin-bottom: 2rem; 
}

.form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(240, 234, 214, 0.1);
    padding: 0.8rem 0;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--accent-main);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A69F88' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0 center;
    cursor: pointer;
}

select.form-control option {
    background-color: var(--bg-panel);
    color: var(--text-main);
}

/* --- 10. FAQ DATABASE --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.faq-card {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(240, 234, 214, 0.05);
}

.faq-q {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 400;
}

.faq-a {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.faq-a strong {
    color: var(--text-main);
    font-weight: 500;
}

/* --- 11. PERSISTENT FOOTER --- */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid rgba(240, 234, 214, 0.03);
    padding: 3rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.footer-brand img {
    height: 24px;
    width: auto;
}

.footer-brand:hover {
    color: var(--accent-main);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.footer-socials {
    display: flex;
    gap: 2rem;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    color: var(--accent-main);
}

/* ==========================================================================
   12. RESPONSIVE ATELIER MATRIX & MOBILE MENU
   ========================================================================== */

/* Base Hamburger Styles (Hidden on Desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 2px; /* Set to 2px for clean mobile visibility */
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

@media(max-width: 968px) {
    /* 1. Show Hamburger, Adjust Navbar Padding */
    .hamburger { display: flex; }
    .navbar { padding: 1.5rem 5%; }
    .navbar.scrolled { padding: 1.5rem 5%; }
    
    /* 2. Convert Desktop Nav into Full-Screen Glass Menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen by default */
        width: 100%;
        height: 100vh;
        background: rgba(26, 20, 18, 0.98); /* Rich Mocha Glass */
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0; /* Slides in when hamburger is clicked */
    }

    .nav-links a {
        font-size: 1.25rem;
        letter-spacing: 3px;
    }

    /* 3. Hamburger to 'X' Morph Animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--accent-main);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--accent-main);
    }
    
    /* 4. Global Mobile Layout Adjustments */
    .hero h1 { font-size: 3rem; }
    
    .hero, .about-section, .portfolio-section, .content-wrapper, .page-header, .faq-section {
        padding-left: 5%;
        padding-right: 5%;
    }
    
    .about-grid, .content-wrapper, .form-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .form-panel { padding: 2.5rem; }
    
    .footer { flex-direction: column; gap: 2rem; text-align: center; }
}