/* Base Styles */
:root {
    --bg-color: #FFFFFF;
    --text-main: #0B1121; /* Very dark slate, almost black */
    --text-muted: #475569; /* Slate gray */
    --bg-light-gray: #F8FAFC;
    --border-color: #E2E8F0;
    
    --accent-orange: #C0362C; /* Golden Gate Bridge (International Orange) */
    --accent-light: #FEF2F2; /* Very light red-orange for backgrounds */
    --accent-primary: #C0362C; 
    --accent-hover: #A02D25; 
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--text-main);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 54, 44, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: var(--accent-light);
}

.section-padding {
    padding: 6rem 0;
}

.bg-light-gray {
    background-color: transparent; /* Letting the grid show through */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.highlight {
    color: var(--accent-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.04em;
    color: var(--accent-orange);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px auto;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Matched to new navbar height */
    position: relative;
    overflow: hidden;
    background-color: transparent; 
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, var(--accent-light) 0%, white 50%);
    z-index: -5; /* Above the grid, but below content */
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(11, 17, 33, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 17, 33, 0.08) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -10; /* The absolute bottom layer */
}

/* Content layers must be above the grid */
/* Content layers must be above the grid */
main, section, footer {
    position: relative;
    z-index: 1; /* Above the grid and hero background layer */
    background: transparent;
}



.hero {
    min-height: 80vh; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero .badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-light);
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(192, 54, 44, 0.1);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 2rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-muted);
}

.hero-btns {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-outline {
    margin-left: 0; /* Reset for flex gap */
}

/* Logo Carousel */
.logo-carousel {
    width: 100%;
    padding: 2rem 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.logo-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.logo-track a {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    opacity: 0.6;
    transition: var(--transition);
}

.logo-track a:hover {
    color: var(--accent-primary);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 2.5rem)); }
}

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #FFFFFF; 
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(var(--accent-orange) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

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

.service-card * {
    position: relative;
    z-index: 1;
}

.service-card:hover {
    box-shadow: 0 40px 80px rgba(11, 17, 33, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-8px);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: var(--text-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
    background: var(--accent-primary);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.service-card:hover .icon-wrapper {
    background: var(--text-main);
    color: white;
    transform: rotate(-10deg) scale(1.1);
}

.service-list {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.service-list li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
}

.service-link {
    display: inline-block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    transition: var(--transition);
}

.service-card:hover .service-link {
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* Cases Section */
.bg-dark {
    background-color: #111827 !important; /* Slightly lighter than absolute black/deep slate */
    color: white;
}

.text-white { color: white; }
.text-light { color: #94A3B8; }

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.case-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(192, 54, 44, 0.2);
    color: var(--accent-orange);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.case-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.case-card p {
    color: #94A3B8;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.case-metrics {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.metric {
    font-size: 0.85rem;
    color: #CBD5E1;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.metric span {
    opacity: 0.7;
}

.metric strong {
    color: white;
}

/* Consultation Form */

.consultation {
    background: var(--bg-light-gray);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.consult-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.consult-info h2 {
    margin-bottom: 2rem;
}

.consult-points {
    margin-top: 3rem;
}

.point {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.point-icon {
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.consult-form-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.03);
}

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

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light-gray);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(192, 54, 44, 0.05);
}

.btn-block {
    width: 100%;
}

.form-note {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Page animations... */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.tech-graphic {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle {
    position: absolute;
    border: 1px dashed var(--text-muted);
    border-radius: 50%;
    opacity: 0.2;
}

.circle.c1 { width: 300px; height: 300px; animation: spin 20s linear infinite; }
.circle.c2 { width: 450px; height: 450px; animation: spin-reverse 30s linear infinite; }
.circle.c3 { width: 200px; height: 200px; border: 2px solid var(--accent-primary); border-radius: 8px; animation: pulse 4s ease-in-out infinite; opacity: 0.1;}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1) rotate(45deg); opacity: 0.1; } 50% { transform: scale(1.1) rotate(45deg); opacity: 0.3; } }


/* Footer */
.footer {
    background-color: var(--text-main);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo .logo-text {
    color: #FFFFFF;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
  /* Logo adjustments in footer if needed depending on bg color */
}

.company-desc {
    color: #94A3B8;
    max-width: 300px;
}

.footer-contact h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #CBD5E1;
}

.contact-list a {
    color: #CBD5E1;
}

.contact-list a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #64748B;
    font-size: 0.875rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.slide-in-bottom {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .consult-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .about-content {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 33, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: #1E293B; /* Dark slate matching cases bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    color: white;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.modal-header {
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 2rem;
}

.modal-body {
    padding: 2.5rem;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-text h3 {
    color: white;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.modal-text p {
    color: #94A3B8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.modal-metric-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.modal-metric-card h4 {
    color: var(--accent-orange);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-metric-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #CBD5E1;
}

@media (max-width: 768px) {
    .modal-metrics {
        grid-template-columns: 1fr;
    }
    .modal-header, .modal-body {
        padding: 1.5rem;
    }
}
