/* Google Fonts: Outfit (modern, geometric, high-end feel) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0077ff; /* Vibrant blue based on logo */
    --primary-light: #4dabf7;
    --dark: #121212; /* Deep graphite */
    --gray-dark: #1e1e1e;
    --gray: #888888;
    --light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Snap */
html {
    scroll-behavior: smooth;
}

/* Animations Variables */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

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

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    height: 50px;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.nav-cta {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 119, 255, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.5);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    background: radial-gradient(circle at center, rgba(0, 119, 255, 0.1) 0%, rgba(18, 18, 18, 1) 70%);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
}

.hero h1 span {
    display: block;
    color: var(--primary);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #ccc;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 18px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: scale(1.05);
    background: var(--primary-light);
}

/* --- About & Why Us --- */
section {
    padding: 100px 10%;
}

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: block;
}

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

.obras-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
}

@media (max-width: 1024px) {
    .obras-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .obras-grid {
        grid-template-columns: repeat(2, 1fr); /* Stay in 2 columns even on mobile as per user preference for layout style */
        gap: 10px;
    }
}

.why-card {
    background: var(--gray-dark);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.why-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.why-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

/* --- Obras Grid --- */
.obras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.obras-grid img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: pointer;
}

.obras-grid img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 119, 255, 0.2);
}

@media (max-width: 600px) {
    .obras-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Carousel --- */
.carousel-container {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 40px 0;
    cursor: grab;
    position: relative;
}

/* Peek Animation */
.peek-animate {
    animation: carouselPeek 1.5s ease-in-out forwards;
}

@keyframes carouselPeek {
    0% { scroll-behavior: auto; transform: translateX(0); }
    30% { transform: translateX(-50px); }
    50% { transform: translateX(0); }
    70% { transform: translateX(-20px); }
    100% { transform: translateX(0); }
}

.scroll-hint {
    text-align: right;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: -20px;
    margin-right: 5%;
    font-weight: 600;
    animation: bounceX 2s infinite;
    opacity: 0.7;
}

@keyframes bounceX {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 30px;
    padding: 0 5%;
    width: max-content;
}

.step-card {
    width: 350px;
    flex-shrink: 0;
    background: var(--gray-dark);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.step-card span {
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    margin-bottom: -30px;
    display: block;
}

/* --- Quiz Section Extensions --- */
.animate-msg {
    animation: msgIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.typing-msg span {
    animation: typing 1s infinite;
    font-size: 1.5rem;
    line-height: 0;
}

.typing-msg span:nth-child(2) { animation-delay: 0.2s; }
.typing-msg span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.animate-options {
    animation: fadeIn 0.8s ease forwards;
}

.final-btn-animate {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 255, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(0, 119, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 255, 0); }
}

/* --- Quiz Section --- */
.quiz-section {
    background: #000;
    border-radius: 32px;
    padding: 40px 5%;
    margin: 30px 5%;
    border: 1px solid var(--glass-border);
}

.whatsapp-chat {
    max-width: 420px;
    margin: 0 auto;
    background: #1e1e1e;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.chat-header {
    background: #075e54;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.chat-body {
    padding: 15px;
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.msg.bot {
    background: #262d31;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg.user {
    background: #056162;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input {
    padding: 15px;
    background: #1e1e1e;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.opt-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.opt-btn:hover {
    background: var(--primary-light);
}

/* --- Footer --- */
footer {
    padding: 60px 5%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
}

.final-cta-btn {
    display: inline-block;
    background: #25d366;
    color: white;
    padding: 20px 45px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 30px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.final-cta-btn:hover {
    background: #128c7e;
    transform: translateY(-5px);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-cta { flex-direction: column; width: 100%; }
    .btn-primary { display: block; width: 100%; text-align: center; }
    section { padding: 60px 5%; }
}
