/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* === THEME TOGGLE === */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.theme-toggle:hover {
    background: #2566ca;
    color: #fff;
    border-color: #2566ca;
    transform: scale(1.1);
}

/* === HERO === */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: url('../images/edificios_2.webp') center center / cover no-repeat;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);
}
.min-vh-75 { min-height: 75vh; }
.hero-content { position: relative; z-index: 2; }
.hero-section .container { position: relative; z-index: 2; }

.badge-brand {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 20px;
}
.text-gradient {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.btn-hero-primary {
    background: linear-gradient(135deg, #2566ca, #1d4ed8);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-hero-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 102, 202, 0.4);
}

.btn-hero-secondary {
    background: transparent;
    color: #e2e8f0;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.hero-stats {
    display: flex;
    gap: 40px;
}
.stat-item { text-align: center; }
.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #38bdf8;
}
.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* === SECTIONS === */
section { padding: 80px 0; }

.section-tag {
    display: inline-block;
    background: rgba(37, 102, 202, 0.1);
    color: #2566ca;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.section-text {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
}

/* === WHAT IS SECTION === */
.section-what { background: #fff; }
.what-cards { display: flex; flex-direction: column; gap: 16px; }
.what-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.what-card:hover {
    border-color: #2566ca;
    box-shadow: 0 4px 12px rgba(37, 102, 202, 0.1);
}
.what-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2566ca, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.what-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #0f172a;
}
.what-card p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* === FEATURES === */
.section-features { background: #f8fafc; }

.feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 0;
    border: 1px solid #e2e8f0;
    height: 100%;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: transparent;
}
.feature-card:hover::before { opacity: 1; }

.feature-card-body { padding: 28px 28px 24px; }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 18px;
    position: relative;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.feature-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1;
    pointer-events: none;
    transition: color 0.3s ease;
}
.feature-card:hover .feature-number { color: #e2e8f0; }

.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    position: relative;
}

.feature-card > .feature-card-body > p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 18px;
    position: relative;
}

.feature-list {
    list-style: none;
    padding: 12px 0 0 0;
    margin: 0;
    border-top: 1px solid #f1f5f9;
    position: relative;
}
.feature-list li {
    font-size: 0.83rem;
    color: #475569;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: padding-left 0.2s ease;
}
.feature-list li:hover { padding-left: 4px; }
.feature-list li i {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(37, 102, 202, 0.1);
    color: #2566ca;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* === ROLES === */
.section-roles { 
    background: #fff; 
    position: relative;
}

.roles-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.roles-grid .role-card {
    width: 100%;
    max-width: 420px;
}
.section-roles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(37,102,202,0.03), rgba(16,185,129,0.03));
}

.role-card {
    border-radius: 20px;
    padding: 0;
    border: none;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}
.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.12);
}

.role-card-top {
    padding: 32px 32px 0;
}

.role-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.role-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.admin-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.owner-icon { background: linear-gradient(135deg, #10b981, #059669); }

.role-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-align: center;
}

.role-badge {
    display: inline-block;
    background: rgba(37, 102, 202, 0.1);
    color: #2566ca;
    padding: 3px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
}
.role-owner .role-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.role-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.role-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    border-radius: 12px;
    background: #f8fafc;
}
.role-stat-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
}
.role-stat-label {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.role-admin .role-stat-num { color: #2566ca; }
.role-owner .role-stat-num { color: #059669; }

.role-card-body {
    padding: 0 32px 32px;
}

.role-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.role-list li {
    font-size: 0.88rem;
    color: #475569;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.role-list li:last-child { border-bottom: none; }
.role-list li:hover { padding-left: 4px; }
.role-list li i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #fff;
    flex-shrink: 0;
}
.role-admin .role-list li i { background: linear-gradient(135deg, #3b82f6, #2563ca); }
.role-owner .role-list li i { background: linear-gradient(135deg, #34d399, #10b981); }

.role-admin-accent { border-top: 4px solid #2566ca; }
.role-owner-accent { border-top: 4px solid #10b981; }

/* === PRICING === */
.section-pricing {
    background: #f8fafc;
}

.pricing-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.12);
    border-color: transparent;
}

.pricing-header {
    text-align: center;
    padding: 40px 32px 32px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    position: relative;
}
.pricing-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 32px;
    background: #fff;
    border-radius: 24px 24px 0 0;
}

.pricing-label {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}
.pricing-currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: #38bdf8;
}
.pricing-number {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.pricing-period {
    font-size: 1.1rem;
    color: #94a3b8;
    font-weight: 500;
}
.pricing-note {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.pricing-body {
    padding: 24px 32px;
}

.pricing-group {
    margin-bottom: 24px;
}
.pricing-group:last-child {
    margin-bottom: 0;
}

.pricing-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pricing-list li {
    font-size: 0.88rem;
    color: #475569;
    padding: 7px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pricing-list li i {
    color: #10b981;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.pricing-list-secondary li i {
    color: #94a3b8;
}

.pricing-footer {
    padding: 0 32px 32px;
}

.btn-pricing {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
}
.btn-pricing:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Pricing dark */
[data-theme="dark"] .section-pricing { background: #0f172a; }
[data-theme="dark"] .pricing-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .pricing-card:hover {
    box-shadow: 0 20px 48px rgba(0,0,0,0.4);
}
[data-theme="dark"] .pricing-header::after { background: #1e293b; }
[data-theme="dark"] .pricing-group-title { color: #e2e8f0; }
[data-theme="dark"] .pricing-group-title { border-bottom-color: #334155; }
[data-theme="dark"] .pricing-list li { color: #cbd5e1; }

/* === CTA === */
.section-cta {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 60px 0;
}
.cta-content h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.cta-content p {
    color: #94a3b8;
    font-size: 1.05rem;
    margin-bottom: 24px;
}
.btn-cta {
    background: linear-gradient(135deg, #2566ca, #1d4ed8);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-cta:hover {
    background: linear-gradient(135deg, #3b82f6, #2563ca);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 102, 202, 0.4);
}

/* === FOOTER === */
.site-footer {
    background: #0f172a;
    padding: 24px 0;
    border-top: 1px solid #1e293b;
}
.footer-brand {
    color: #e2e8f0;
    font-size: 1rem;
}
.footer-text {
    color: #64748b;
    font-size: 0.82rem;
    margin: 4px 0 0 0;
}
.footer-copyright {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0 0 4px 0;
}
.footer-copyright strong { color: #94a3b8; }
.footer-link {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}
.footer-link:hover { color: #7dd3fc; }

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] body {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(30, 41, 59, 0.9);
    border-color: #334155;
    color: #facc15;
}
[data-theme="dark"] .theme-toggle:hover {
    background: #facc15;
    color: #0f172a;
    border-color: #facc15;
}

/* Hero dark */
[data-theme="dark"] .hero-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
}
[data-theme="dark"] .badge-brand {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
}
[data-theme="dark"] .stat-label { color: #64748b; }

/* Section titles dark */
[data-theme="dark"] .section-title { color: #e2e8f0; }
[data-theme="dark"] .section-subtitle { color: #94a3b8; }
[data-theme="dark"] .section-text { color: #94a3b8; }
[data-theme="dark"] .section-tag {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

/* What is section dark */
[data-theme="dark"] .section-what { background: #0f172a; }
[data-theme="dark"] .what-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .what-card:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}
[data-theme="dark"] .what-card h5 { color: #e2e8f0; }
[data-theme="dark"] .what-card p { color: #94a3b8; }

/* Features dark */
[data-theme="dark"] .section-features { background: #0f172a; }
[data-theme="dark"] .feature-card {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .feature-card:hover::before { opacity: 1; }
[data-theme="dark"] .feature-number { color: #334155; }
[data-theme="dark"] .feature-card:hover .feature-number { color: #475569; }
[data-theme="dark"] .feature-card h5 { color: #e2e8f0; }
[data-theme="dark"] .feature-card > .feature-card-body > p { color: #94a3b8; }
[data-theme="dark"] .feature-list { border-top-color: #334155; }
[data-theme="dark"] .feature-list li { color: #cbd5e1; }
[data-theme="dark"] .feature-list li i { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

/* Roles dark */
[data-theme="dark"] .section-roles { background: #0f172a; }
[data-theme="dark"] .section-roles::before { background: linear-gradient(135deg, rgba(56,189,248,0.03), rgba(52,211,153,0.03)); }
[data-theme="dark"] .role-card {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.15);
}
[data-theme="dark"] .role-card:hover {
    box-shadow: 0 20px 48px rgba(0,0,0,0.4);
}
[data-theme="dark"] .role-card-top { background: transparent; }
[data-theme="dark"] .role-header h4 { color: #e2e8f0; }
[data-theme="dark"] .role-stat { background: #0f172a; }
[data-theme="dark"] .role-stat-label { color: #64748b; }
[data-theme="dark"] .role-list li { color: #cbd5e1; border-bottom-color: #334155; }
[data-theme="dark"] .role-admin .role-stat-num { color: #38bdf8; }
[data-theme="dark"] .role-owner .role-stat-num { color: #34d399; }
[data-theme="dark"] .role-admin .role-badge {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}
[data-theme="dark"] .role-owner .role-badge {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

/* CTA dark */
[data-theme="dark"] .section-cta {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* Footer dark */
[data-theme="dark"] .site-footer {
    background: #0b1120;
    border-top-color: #1e293b;
}

/* === RESPONSIVE === */
@media (max-width: 767.98px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 1.4rem; }
    .section-title { font-size: 1.6rem; }
    .hero-buttons { flex-direction: column; }
    .btn-hero-primary, .btn-hero-secondary { text-align: center; }
    .theme-toggle { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 0.95rem; }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 1.7rem; }
    section { padding: 50px 0; }
    .feature-card { padding: 22px; }
    .role-card { padding: 24px; }
    .roles-grid { gap: 16px; }
}
