/* ==========================================================================
   ARCHITECT - Architecture & Design Studio Template
   Minimalist, sophisticated design for architecture firms
   ========================================================================== */

/* ==========================================================================
   BASE & RESET
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--color-charcoal);
    background: var(--color-off-white);
    overflow-x: hidden;
}

/* ==========================================================================
   CSS VARIABLES - Color System
   ========================================================================== */

:root {
    /* Primary Colors */
    --color-charcoal: #1C1C1C;
    --color-beige: #C4A77D;
    --color-slate: #64748B;
    --color-off-white: #F8F7F4;

    /* Neutral Scale */
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F5F5;
    --neutral-200: #E5E5E5;
    --neutral-300: #D4D4D4;
    --neutral-400: #A3A3A3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    /* Typography Scale */
    --text-hero: clamp(3rem, 8vw, 6rem);
    --text-display: clamp(2.5rem, 5vw, 4rem);
    --text-h1: clamp(2rem, 4vw, 3rem);
    --text-h2: clamp(1.5rem, 3vw, 2.25rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-body: 1rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
}

/* Dark Mode Variables */
[data-theme="dark"],
html.dark {
    --color-charcoal: #F8F7F4;
    --color-off-white: #0A0A0A;
    --neutral-50: #171717;
    --neutral-100: #262626;
    --neutral-200: #404040;
    --neutral-300: #525252;
    --neutral-400: #737373;
    --neutral-500: #A3A3A3;
    --neutral-600: #D4D4D4;
    --neutral-700: #E5E5E5;
    --neutral-800: #F5F5F5;
    --neutral-900: #FAFAFA;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER ANIMATIONS
   ========================================================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Image overlay on hover */
.hover-overlay {
    position: relative;
}

.hover-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(28, 28, 28, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hover-overlay:hover::after {
    opacity: 1;
}

.dark .hover-overlay::after {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: subtle-bounce 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* ==========================================================================
   COMPONENT: PROJECT CARDS
   ========================================================================== */

.project-card {
    position: relative;
    background: white;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
}

.dark .project-card {
    background: var(--neutral-100);
}

.project-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(28, 28, 28, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-8);
    color: white;
    z-index: 2;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-content {
    padding: var(--space-6);
    border-top: 1px solid var(--neutral-200);
}

.dark .project-card-content {
    border-color: var(--neutral-200);
}

.project-card-category {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-beige);
    margin-bottom: var(--space-2);
}

.project-card-title {
    font-size: var(--text-h3);
    margin-bottom: var(--space-3);
    color: var(--color-charcoal);
}

.project-card-meta {
    font-size: var(--text-small);
    color: var(--neutral-500);
    display: flex;
    gap: var(--space-4);
}

/* ==========================================================================
   COMPONENT: GALLERY / LIGHTBOX
   ========================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: var(--space-8);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: var(--space-8);
    right: var(--space-8);
    background: white;
    color: var(--color-charcoal);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   COMPONENT: NAVIGATION
   ========================================================================== */

.nav-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(248, 247, 244, 0.8);
    border-bottom: 1px solid var(--neutral-200);
}

.dark .nav-blur {
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--neutral-200);
}

/* Mobile menu */
#mobile-menu {
    transition: transform 0.3s ease;
}

#mobile-menu.active {
    transform: translateX(0) !important;
}

/* ==========================================================================
   COMPONENT: BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-8);
    border-radius: 0;
    font-size: var(--text-body);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-charcoal);
    color: var(--color-off-white);
}

.btn-primary:hover {
    background: var(--color-beige);
    color: var(--color-charcoal);
}

.btn-outline {
    background: transparent;
    color: var(--color-charcoal);
    border: 1px solid var(--color-charcoal);
}

.btn-outline:hover {
    background: var(--color-charcoal);
    color: var(--color-off-white);
}

.dark .btn-outline {
    color: var(--color-off-white);
    border-color: var(--color-off-white);
}

.dark .btn-outline:hover {
    background: var(--color-off-white);
    color: var(--color-charcoal);
}

/* ==========================================================================
   COMPONENT: FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
    color: var(--neutral-600);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--color-charcoal);
    font-size: var(--text-body);
    font-family: inherit;
    transition: all 0.3s ease;
}

.dark .form-input,
.dark .form-textarea {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
    color: var(--color-off-white);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-beige);
}

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

/* ==========================================================================
   COMPONENT: AWARDS BADGE
   ========================================================================== */

.award-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: white;
    border: 1px solid var(--neutral-200);
}

.dark .award-badge {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
}

.award-icon {
    width: 32px;
    height: 32px;
    color: var(--color-beige);
}

.award-text {
    font-size: var(--text-small);
    line-height: 1.4;
}

.award-title {
    font-weight: 600;
    color: var(--color-charcoal);
}

.award-year {
    color: var(--neutral-500);
    font-size: var(--text-xs);
}

/* ==========================================================================
   COMPONENT: TEAM MEMBER CARD
   ========================================================================== */

.team-card {
    text-align: center;
}

.team-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    margin-bottom: var(--space-4);
    background: var(--neutral-200);
}

.team-name {
    font-size: var(--text-h3);
    margin-bottom: var(--space-2);
    color: var(--color-charcoal);
}

.team-role {
    font-size: var(--text-small);
    color: var(--color-beige);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
}

.team-bio {
    font-size: var(--text-small);
    color: var(--neutral-500);
    line-height: 1.6;
}

/* ==========================================================================
   LAYOUT: HERO
   ========================================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-image-large {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(28, 28, 28, 0.7) 100%);
    z-index: 1;
}

.dark .hero-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

/* ==========================================================================
   LAYOUT: GRID PATTERNS
   ========================================================================== */

.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(28, 28, 28, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 28, 28, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid-pattern {
    background-image:
        linear-gradient(rgba(248, 247, 244, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 247, 244, 0.03) 1px, transparent 1px);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ==========================================================================
   REDUCED MOTION (ACCESSIBILITY - REQUIRED)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --space-20: 3rem;
        --space-24: 4rem;
        --space-32: 5rem;
    }
}
