/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-main: hsl(222, 24%, 6%);
    --bg-card: hsla(222, 20%, 10%, 0.55);
    --border-color: hsla(222, 20%, 90%, 0.08);
    --border-hover: hsla(222, 20%, 90%, 0.18);
    --text-primary: hsl(0, 0%, 96%);
    --text-secondary: hsl(220, 12%, 75%);
    --text-muted: hsl(220, 10%, 55%);
    
    /* Branding Accent Colors */
    --accent-oros: hsl(42, 92%, 58%); /* Gold */
    --accent-oros-glow: hsla(42, 92%, 58%, 0.15);
    
    --accent-casa: hsl(152, 70%, 50%); /* Emerald Teal */
    --accent-casa-glow: hsla(152, 70%, 50%, 0.15);
    
    --accent-atlas: hsl(265, 88%, 64%); /* Purple */
    --accent-atlas-glow: hsla(265, 88%, 64%, 0.15);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-slow: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-medium: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: 0.15s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   BACKGROUND VISUAL EFFECTS (ORBS)
   ========================================================================== */
.bg-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    transform: translate(-50%, -50%) scale(0.8);
}

.orb-gold {
    background: radial-gradient(circle, var(--accent-oros-glow) 0%, transparent 70%);
    top: 35%;
    left: 30%;
}

.orb-green {
    background: radial-gradient(circle, var(--accent-casa-glow) 0%, transparent 70%);
    top: 40%;
    left: 70%;
}

.orb-purple {
    background: radial-gradient(circle, var(--accent-atlas-glow) 0%, transparent 70%);
    top: 55%;
    left: 50%;
}

/* Orb visibility tied to active tab states in body */
body.state-oros .orb-gold {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.1);
}

body.state-casa .orb-green {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.1);
}

body.state-atlas .orb-purple {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.1);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 24px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 650px;
    animation: fadeInDown var(--transition-slow) both;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.6;
    font-weight: 300;
}

/* ==========================================================================
   NAVIGATION (BUTTONS)
   ========================================================================== */
.navigation {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInUp var(--transition-slow) both 0.1s;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-medium);
    outline: none;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.btn-icon {
    font-size: 1.15rem;
    transition: transform var(--transition-medium);
}

.nav-btn:hover .btn-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Active State Styles for Buttons depending on target */
#btn-oros.active {
    background: rgba(245, 166, 35, 0.08);
    border-color: rgba(245, 166, 35, 0.3);
    color: var(--accent-oros);
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.1);
}

#btn-casa.active {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-casa);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

#btn-atlas.active {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--accent-atlas);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

/* ==========================================================================
   SHOWCASE (CARDS)
   ========================================================================== */
.showcase {
    position: relative;
    width: 100%;
    min-height: 480px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: start;
    animation: fadeInUp var(--transition-slow) both 0.2s;
}

.business-card {
    grid-column: 1;
    grid-row: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 48px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.97);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    position: relative;
    overflow: hidden;
}

/* Ambient glow container inside the card */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    transition: background var(--transition-slow);
}

.business-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    z-index: 5;
}

/* Specific glows per active card */
#card-oros.active {
    border-color: rgba(245, 166, 35, 0.15);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.4),
                0 0 50px -10px rgba(245, 166, 35, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
#card-oros.active .card-glow {
    background: radial-gradient(circle at 20% 10%, rgba(245, 166, 35, 0.08) 0%, transparent 60%);
}

#card-casa.active {
    border-color: rgba(16, 185, 129, 0.15);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.4),
                0 0 50px -10px rgba(16, 185, 129, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
#card-casa.active .card-glow {
    background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

#card-atlas.active {
    border-color: rgba(139, 92, 246, 0.15);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.4),
                0 0 50px -10px rgba(139, 92, 246, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
#card-atlas.active .card-glow {
    background: radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
}

/* ==========================================================================
   CARD CONTENT ELEMENTS
   ========================================================================== */
.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.business-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.badge-oros {
    background: rgba(245, 166, 35, 0.1);
    color: var(--accent-oros);
    border-color: rgba(245, 166, 35, 0.15);
}

.badge-casa {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-casa);
    border-color: rgba(16, 185, 129, 0.15);
}

.badge-atlas {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-atlas);
    border-color: rgba(139, 92, 246, 0.15);
}

.business-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.business-slogan {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-style: italic;
}

.business-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

/* SERVICES SECTION */
.services-section h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.services-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

.services-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

.service-check {
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}
#card-oros .service-check { color: var(--accent-oros); }
#card-casa .service-check { color: var(--accent-casa); }
#card-atlas .service-check { color: var(--accent-atlas); }

/* STATS / FOOTER */
.card-footer {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 28px;
    margin-top: 8px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

#card-oros .stat-num { color: var(--accent-oros); }
#card-casa .stat-num { color: var(--accent-casa); }
#card-atlas .stat-num { color: var(--accent-atlas); }

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* CTA BUTTONS */
.cta-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-medium);
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Consultora Oros Button */
#card-oros .action-btn {
    background: linear-gradient(135deg, var(--accent-oros) 0%, hsl(36, 90%, 48%) 100%);
    color: hsl(222, 24%, 6%);
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.25);
}
#card-oros .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.4);
    background: linear-gradient(135deg, hsl(42, 92%, 63%) 0%, var(--accent-oros) 100%);
}

/* La Tua Bella Casa Button */
#card-casa .action-btn {
    background: linear-gradient(135deg, var(--accent-casa) 0%, hsl(142, 70%, 40%) 100%);
    color: hsl(222, 24%, 6%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}
#card-casa .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, hsl(152, 70%, 55%) 0%, var(--accent-casa) 100%);
}

/* Nova Atlas Button */
#card-atlas .action-btn {
    background: linear-gradient(135deg, var(--accent-atlas) 0%, hsl(255, 88%, 56%) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}
#card-atlas .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, hsl(265, 88%, 69%) 0%, var(--accent-atlas) 100%);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.footer-bottom {
    text-align: center;
    padding: 30px 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding-top: 40px;
    }

    .navigation {
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
        max-width: 320px;
        gap: 8px;
        padding: 12px;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .business-card {
        padding: 32px 24px;
    }

    .business-title {
        font-size: 1.8rem;
    }

    .card-footer {
        flex-direction: column;
        gap: 20px;
    }

    .cta-section {
        justify-content: center;
        width: 100%;
    }

    .action-btn {
        width: 100%;
    }
    
    .bg-orb {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }
}
