/* ===================================
   UrbanGoCa - Modern CSS Stylesheet
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --bg-color: #050505;
    --bg-darker: #000000;
    --bg-card: #121212;
    --bg-card-hover: #1a1a1a;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --color-green: #22c55e;
    --color-green-light: #4ade80;
    --color-green-dark: #16a34a;
    --color-green-glow: rgba(34, 197, 94, 0.4);
    --color-green-glow-lg: rgba(34, 197, 94, 0.2);
    
    --color-red: #ef4444;
    --color-red-light: #f87171;
    --color-red-dark: #dc2626;
    --color-red-glow: rgba(239, 68, 68, 0.4);
    --color-red-glow-lg: rgba(239, 68, 68, 0.2);
    
    /* Typography */
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Font Sizes - Fluid */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-4xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-padding: clamp(1rem, 5vw, 2rem);
    --section-padding: clamp(4rem, 8vw, 6rem);
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 20px var(--color-green-glow);
    --shadow-glow-red: 0 0 20px var(--color-red-glow);
    
    /* Z-Index */
    --z-navbar: 1000;
    --z-overlay: 1;
    --z-content: 2;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Accessibility --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-green);
    color: var(--bg-color);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: calc(var(--z-navbar) + 10);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}

:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

/* --- Typography Utilities --- */
.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.text-center { text-align: center; }

h1, h2, h3, h4, h5, h6,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
}

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

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.section-padding {
    padding-block: var(--section-padding);
}

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: var(--text-lg);
    max-width: 600px;
    margin-inline: auto;
}

.section-header .section-subtitle {
    margin-inline: auto;
}

.section-header.text-center .section-subtitle {
    margin-inline: auto;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    padding-block: var(--space-md);
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: var(--z-navbar);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.logo {
    font-size: var(--text-xl);
    letter-spacing: 0.05em;
    color: #fff;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.9;
}

.logo span {
    color: var(--color-green);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    font-weight: 500;
    font-size: var(--text-sm);
    padding-block: var(--space-xs);
    transition: color var(--transition-base);
}

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

.nav-link:hover,
.nav-link:focus {
    color: var(--text-main);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-cta {
    margin-left: var(--space-md);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: calc(var(--z-navbar) + 5);
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.burger-menu.is-active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.burger-menu.is-active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--color-green);
    color: var(--bg-color);
    box-shadow: var(--shadow-glow-green);
}

.btn-primary:hover {
    background: var(--color-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--color-green-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--color-red);
    color: var(--color-red);
    background: var(--color-red-glow-lg);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.badge-red {
    background: var(--color-red-glow-lg);
    color: var(--color-red);
    border: 1px solid var(--color-red);
}

.badge-green {
    background: var(--color-green-glow-lg);
    color: var(--color-green);
    border: 1px solid var(--color-green);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: var(--z-overlay);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--bg-color) 0%,
        rgba(5, 5, 5, 0.92) 40%,
        rgba(5, 5, 5, 0.6) 100%
    );
    z-index: calc(var(--z-overlay) + 1);
}

.hero-content {
    position: relative;
    z-index: var(--z-content);
    max-width: 700px;
    margin-top: 5rem;
}

.hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
}

.hero-description {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* --- Services Section --- */
.services {
    background: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-lg);
}

.service-card {
    position: relative;
    background: var(--bg-card);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-green), var(--color-green-light));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
    color: var(--color-green);
    background: var(--color-green-glow-lg);
    border-radius: var(--border-radius);
    transition: transform var(--transition-base);
}

.service-card:hover .icon-box {
    transform: scale(1.1);
}

.icon-red {
    color: var(--color-red);
    background: var(--color-red-glow-lg);
}

.service-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* --- About Section --- */
.about {
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-content .section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-lg);
}

.about-text {
    color: var(--text-muted);
    font-size: var(--text-base);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.about-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.about-features li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-base);
    font-weight: 500;
}

.check-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-green);
}

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

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

/* --- Stats Banner --- */
.stats-banner {
    background: var(--bg-card);
    padding-block: var(--space-3xl);
    border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2xl) var(--space-4xl);
}

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

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Gallery Section --- */
.gallery {
    background: var(--bg-color);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--space-lg);
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-red-glow-lg) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    opacity: 1;
}



/* --- Footer --- */
.footer {
    padding-block: var(--space-4xl) var(--space-2xl);
    background: var(--bg-color);
    border-top: 1px solid var(--color-green-glow-lg);
}

.footer-content {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.footer-header {
    margin-bottom: var(--space-xl);
}

.footer-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.footer-subtitle {
    color: var(--text-muted);
    font-size: var(--text-lg);
    max-width: 500px;
    margin-inline: auto;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    max-width: 600px;
    margin-inline: auto;
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-nav-group h3 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

.footer-nav-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-nav-group a {
    color: var(--text-muted);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-nav-group a:hover {
    color: var(--color-green);
}

.footer-nav-group span {
    color: var(--text-dim);
    font-size: var(--text-sm);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    color: var(--text-dim);
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
}

.footer-credits {
    color: var(--text-dim);
    font-size: var(--text-xs);
    opacity: 0.6;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--delay, 0s);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.tilt-card {
    opacity: 0;
    transform: translateY(20px) perspective(1000px) rotateX(2deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tilt-card.visible {
    opacity: 1;
    transform: translateY(0) perspective(1000px) rotateX(0);
}

/* --- Responsive - Mobile First --- */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(80%, 320px);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xl);
        background: var(--bg-card);
        padding: var(--space-2xl);
        transition: right var(--transition-base);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.is-active {
        right: 0;
    }
    
    .nav-link {
        font-size: var(--text-lg);
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: var(--space-md);
    }
    
    .hero {
        text-align: center;
        background-position: center;
    }
    
    .hero-bg {
        background-position: center;
    }
    
    .hero-overlay {
        background: linear-gradient(
            to bottom,
            var(--bg-color) 0%,
            rgba(5, 5, 5, 0.85) 50%,
            rgba(5, 5, 5, 0.7) 100%
        );
    }
    
    .hero-content {
        margin-top: 4rem;
    }
    
    .hero-description {
        margin-inline: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
    
    .stats-grid {
        gap: var(--space-xl);
    }
    
    .stat-number {
        font-size: var(--text-3xl);
    }
}

@media (min-width: 769px) {
    .about-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        display: grid;
        grid-template-areas:
            "header header"
            "buttons buttons"
            "nav nav"
            "bottom bottom";
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .footer-header {
        grid-area: header;
    }
    
    .footer-buttons {
        grid-area: buttons;
    }
    
    .footer-nav {
        grid-area: nav;
        max-width: 100%;
    }
    
    .footer-bottom {
        grid-area: bottom;
    }
}

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