/* ==========================================================================
   CSS Design System for Cormay Climatización (Simplified & Brand-Correct)
   ========================================================================== */

:root {
    /* Brand Theme Colors */
    --color-primary: #0072C6;                /* Official Cormay Blue */
    --color-primary-dark: #005494;
    --color-primary-glow: rgba(0, 114, 198, 0.12);
    
    --color-bg-light: hsl(210, 20%, 98%);    /* Slate 50 */
    --color-bg-white: #FFFFFF;
    --color-bg-dark: #0F172A;                /* Slate 900 */
    
    --color-text-dark: #0F172A;              /* Slate 900 */
    --color-text-muted: #64748B;             /* Slate 500 */
    --color-text-light: #F8FAFC;
    
    --color-border: #E2E8F0;                 /* Slate 200 */
    --color-success: #10B981;
    --color-success-bg: #F0FDF4;
    --color-error: #EF4444;
    --color-error-bg: #FEF2F2;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Layout & Animation Tokens */
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ==========================================================================
   1. Reset & Global Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility Focus States */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 9999;
    transition: top 0.2s ease;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 20px;
}

/* Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* ==========================================================================
   2. Site Header (Navbar)
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

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

.logo-svg {
    width: 200px;
    height: auto;
}

/* WhatsApp Nav Button */
.btn-whatsapp-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 50px;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-nav:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   3. Main Section (Split Hero & Form Layout)
   ========================================================================== */

.main-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Background visual circles */
.background-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.circle-primary {
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background-color: var(--color-primary-glow);
}

.circle-light {
    bottom: 10%;
    left: -5%;
    width: 350px;
    height: 350px;
    background-color: rgba(56, 189, 248, 0.15);
}

.main-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

/* Left Column */
.info-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.status-badge {
    display: inline-block;
    background-color: rgba(0, 114, 198, 0.08);
    border: 1px solid rgba(0, 114, 198, 0.18);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.main-title {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--color-text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.main-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Pills (Trayectory & Details) */
.pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-dark);
    box-shadow: var(--shadow-md);
}

.pill-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
}

/* Direct Contact Details list */
.contact-details {
    width: 100%;
    border-top: 1.5px solid var(--color-border);
    padding-top: 32px;
}

.contact-title {
    font-size: 1.25rem;
    color: var(--color-text-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-link {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 1rem;
}

.contact-link:hover {
    color: var(--color-primary);
}

.contact-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Right Column (Form Card) */
.form-column {
    display: flex;
    justify-content: center;
}

.form-card {
    width: 100%;
    max-width: 520px;
    background-color: var(--color-bg-white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.form-card .form-title {
    font-size: 1.6rem;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}

.form-card .form-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* Form inputs & floating labels */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.honeypot {
    display: none;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: transparent;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-dark);
    transition: all var(--transition-smooth);
}

.input-wrapper textarea {
    resize: vertical;
}

.input-wrapper label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-bg-white);
    padding: 0 6px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all var(--transition-smooth);
}

.input-wrapper textarea ~ label {
    top: 24px;
    transform: none;
}

/* Focused / Populated states */
.input-wrapper input:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.input-wrapper input:focus ~ label,
.input-wrapper input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-primary);
}

.input-wrapper textarea:focus ~ label,
.input-wrapper textarea:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Error UI states */
.form-group.has-error .input-wrapper input,
.form-group.has-error .input-wrapper textarea {
    border-color: var(--color-error);
}

.form-group.has-error .input-wrapper input:focus,
.form-group.has-error .input-wrapper textarea:focus {
    box-shadow: 0 0 0 4px var(--color-error-bg);
}

.form-group.has-error label {
    color: var(--color-error);
}

.error-message {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-error);
    margin-top: 6px;
    padding-left: 4px;
}

/* Submit Button */
.btn-submit-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn-submit-main:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--color-primary-glow);
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Alert Box */
.form-status-box {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: fadeIn 0.4s ease forwards;
}

.form-status-box.success {
    background-color: var(--color-success-bg);
    border: 1.5px solid var(--color-success);
    color: var(--color-success);
}

.form-status-box.error {
    background-color: var(--color-error-bg);
    border: 1.5px solid var(--color-error);
    color: var(--color-error);
}

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

/* ==========================================================================
   4. Site Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.footer-brand {
    max-width: 500px;
}

.footer-logo {
    margin-bottom: 18px;
    display: inline-block;
}

.footer-logo-svg {
    width: 200px;
    height: auto;
}

.footer-desc {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
}

.social-icons a:hover {
    color: var(--color-text-light);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.social-icons svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   5. Scroll Animation Reveals
   ========================================================================= */

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

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

/* ==========================================================================
   6. Responsive Layouts (Desktop viewports)
   ========================================================================== */

@media (min-width: 768px) {
    .main-title {
        font-size: 3.5rem;
    }
    
    .contact-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 64px;
    }
    
    .contact-list {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}
