/* ============================================
   GRANITE REAL ESTATE WEBSITE - CUSTOM CSS
   ============================================ */

:root {
    --color-black: #0C0C0C;
    --color-dark: #191919;
    --color-steel: #2C2C2C;
    --color-arctic: #B8C4C8;
    --color-concrete: #E4E8EA;
    --metal-light: #DCE0E2;
    --metal-mid: #C0C4C6;
    --metal-dark: #8C9196;
    --metal-shadow: #555A5F;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Metal gradient for brand elements */
.metal-gradient {
    background: linear-gradient(180deg, var(--metal-light) 0%, var(--metal-mid) 50%, var(--metal-dark) 100%);
}

.metal-text {
    background: linear-gradient(180deg, var(--metal-light) 0%, var(--metal-mid) 50%, var(--metal-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-black);
}

::-webkit-scrollbar-thumb {
    background: var(--color-steel);
    border-radius: 5px;
}

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

/* ============================================
   SMOOTH SCROLLING
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: 0.02em;
    font-weight: 700;
}

a {
    transition: var(--transition-smooth);
}

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

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide in animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations to elements with intersection observer */
.animate-fade-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fade-down {
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-fade {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-slide-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-slide-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-scale {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */

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

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero-slide {
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: absolute;
    inset: 0;
    opacity: 0;
}

.hero-slide.active {
    opacity: 1;
}

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

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

.card-hover {
    transition: var(--transition-smooth);
}

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

/* Mobile touch-active mimics hover for project cards */
.project-card.touch-active > div:last-child {
    opacity: 1 !important;
}
.project-card.touch-active > div:nth-last-child(2) {
    opacity: 0 !important;
}

.card-image-wrapper {
    overflow: hidden;
    border-radius: 0.5rem;
    position: relative;
}

.card-image-wrapper img {
    transition: var(--transition-smooth);
    width: 100%;
    height: 100%;
}

.card-hover:hover .card-image-wrapper img {
    transform: scale(1.05);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 0.375rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(180deg, var(--metal-light) 0%, var(--metal-mid) 100%);
    color: var(--color-black);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--metal-light) 0%, var(--metal-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(192, 196, 198, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-arctic);
    border: 2px solid var(--color-arctic);
}

.btn-secondary:hover {
    background-color: var(--color-arctic);
    color: var(--color-black);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-status {
    background-color: rgba(140, 145, 150, 0.15);
    color: var(--metal-mid);
    border: 1px solid var(--metal-dark);
}

.badge-status.active {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: #2ecc71;
}

.badge-status.sold {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: #e74c3c;
}

.badge-category {
    background-color: var(--color-steel);
    color: var(--color-arctic);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-link {
    position: relative;
    padding: 4px 8px;
    transition: var(--transition-smooth);
}

.lang-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-arctic);
    transition: var(--transition-smooth);
}

.lang-link.active::after {
    width: 100%;
}

.lang-link:not(.active):hover::after {
    width: 100%;
}

/* ============================================
   MOBILE MENU ANIMATION
   ============================================ */

.mobile-menu-line {
    transform-origin: center;
}

/* ============================================
   SECTION SPACING
   ============================================ */

.section-py {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (max-width: 768px) {
    .section-py {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ============================================
   GLASS-MORPHISM EFFECT
   ============================================ */

.glass {
    background: rgba(184, 196, 200, 0.05);
    border: 1px solid rgba(184, 196, 200, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   GRADIENT OVERLAYS
   ============================================ */

.gradient-overlay {
    background: linear-gradient(135deg, rgba(12, 12, 12, 0.5) 0%, rgba(41, 41, 41, 0.5) 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-arctic) 0%, var(--color-concrete) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="phone"],
input[type="number"],
textarea,
select {
    background-color: var(--color-dark);
    border: 1px solid var(--color-steel);
    color: var(--color-concrete);
    padding: 12px 16px;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-arctic);
    background-color: var(--color-steel);
    box-shadow: 0 0 0 3px rgba(184, 196, 200, 0.1);
}

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

/* ============================================
   LOADING SPINNER
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero-slider {
        min-height: 400px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background-color: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    .no-print {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.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;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-arctic);
    outline-offset: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.no-scroll {
    overflow: hidden;
}

.transition-all {
    transition: var(--transition-smooth);
}
