/* =========================================================
   Rhino Performance — Estilos globales
   1. Tokens (tema oscuro / claro)
   2. Base
   3. Componentes reutilizables (botones, badges, cards, inputs)
   4. Layout público (navbar, footer)
   5. Landing page
   6. Responsive
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
    /* Paleta de marca (no cambia entre temas) */
    --rhino-orange: #F37B29;
    --rhino-yellow: #F8DA64;
    --rhino-cyan: #84CBD5;
    --rhino-purple: #7F27CD;
    --rhino-white: #FFFFFF;
    --rhino-gray: #777777;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --container: 1200px;
    --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --transition: .2s ease;
}

/* Tema oscuro (por defecto) */
:root,
[data-theme="dark"] {
    --bg: #0B0B0D;
    --surface: #151517;
    --surface-2: #1E1E21;
    --surface-3: #26262A;
    --border: #2A2A2F;
    --text: #F4F4F2;
    --muted: #9C9CA3;
    --faint: #5F5F66;
    --primary: var(--rhino-orange);
    --primary-ink: #141414; /* texto sobre botón naranja */
    --primary-text: #F68B42; /* naranja para texto */
    --primary-soft: rgba(243, 123, 41, .14);
    --yellow-soft: rgba(248, 218, 100, .14);
    --yellow-text: #F8DA64;
    --cyan-soft: rgba(132, 203, 213, .14);
    --cyan-text: #84CBD5;
    --purple-soft: rgba(127, 39, 205, .22);
    --purple-text: #B07BEA;
    --green: #3DDC84;
    --green-soft: rgba(61, 220, 132, .14);
    --green-text: #3DDC84;
    --red: #F25C5C;
    --red-soft: rgba(242, 92, 92, .14);
    --red-text: #F57A7A;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

/* Tema claro */
[data-theme="light"] {
    --bg: #F5F4F1;
    --surface: #FFFFFF;
    --surface-2: #F3F2EF;
    --surface-3: #E9E8E4;
    --border: #E2E0DA;
    --text: #16161A;
    --muted: #66666E;
    --faint: #A3A3AA;
    --primary-text: #C75A12; /* naranja oscurecido para contraste */
    --primary-soft: rgba(243, 123, 41, .13);
    --yellow-soft: rgba(248, 218, 100, .35);
    --yellow-text: #8A6A00;
    --cyan-soft: rgba(132, 203, 213, .30);
    --cyan-text: #1F6F7B;
    --purple-soft: rgba(127, 39, 205, .12);
    --purple-text: #7F27CD;
    --green: #22B567;
    --green-soft: rgba(34, 181, 103, .14);
    --green-text: #15804A;
    --red: #E04545;
    --red-soft: rgba(224, 69, 69, .12);
    --red-text: #C23030;
    --shadow: 0 10px 30px rgba(20, 20, 30, .10);
    color-scheme: light;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition), color var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.15;
    font-weight: 700;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.text-muted {
    color: var(--muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Logo: se muestra la versión correcta según el tema */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

/* ---------- 3. COMPONENTES ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    background: var(--primary);
    color: var(--primary-ink);
    transition: transform var(--transition), filter var(--transition), background var(--transition);
}

    .btn:hover {
        filter: brightness(1.08);
    }

    .btn:active {
        transform: translateY(1px);
    }

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
    font-weight: 500;
}

    .btn-ghost:hover {
        background: var(--surface-2);
        filter: none;
    }

.btn-lg {
    font-size: 15px;
    padding: 14px 28px;
}

.btn-sm {
    font-size: 12px;
    padding: 7px 14px;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: color var(--transition);
}

    .icon-btn:hover {
        color: var(--text);
    }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--muted);
}

.badge-orange {
    background: var(--primary-soft);
    color: var(--primary-text);
}

.badge-yellow {
    background: var(--yellow-soft);
    color: var(--yellow-text);
}

.badge-cyan {
    background: var(--cyan-soft);
    color: var(--cyan-text);
}

.badge-purple {
    background: var(--purple-soft);
    color: var(--purple-text);
}

.badge-green {
    background: var(--green-soft);
    color: var(--green-text);
}

.badge-red {
    background: var(--red-soft);
    color: var(--red-text);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    transition: border-color var(--transition);
}

    .form-control::placeholder {
        color: var(--faint);
    }

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
    }

.field-validation-error, .text-danger {
    color: var(--red-text);
    font-size: 12px;
}

.svg-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ---------- 4. LAYOUT PÚBLICO ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        gap: 20px;
    }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .brand img {
        height: 34px;
        width: auto;
    }

    .brand span {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .14em;
        color: var(--primary-text);
    }

.main-nav {
    display: flex;
    gap: 28px;
}

    .main-nav a {
        font-size: 14px;
        font-weight: 500;
        color: var(--muted);
        transition: color var(--transition);
    }

        .main-nav a:hover, .main-nav a.active {
            color: var(--text);
        }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
}

/* Ícono del botón de tema: muestra sol en oscuro y luna en claro */
/* Interruptor claro / oscuro */
.theme-switch {
    position: relative;
    width: 66px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-2);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 9px;
    color: var(--muted);
}

    .theme-switch .svg-icon {
        width: 15px;
        height: 15px;
        position: relative;
        z-index: 1;
        transition: color var(--transition);
    }

    .theme-switch .knob {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: var(--primary);
        box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
        transition: transform .25s ease;
    }
/* Oscuro: la perilla va a la derecha, sobre la luna */
[data-theme="dark"] .theme-switch .knob,
:root:not([data-theme="light"]) .theme-switch .knob {
    transform: translateX(32px);
}

[data-theme="light"] .theme-switch .knob {
    transform: translateX(0);
}

[data-theme="dark"] .theme-switch .icon-moon,
[data-theme="light"] .theme-switch .icon-sun {
    color: var(--primary-ink);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 22px 0;
    margin-top: 40px;
}

    .site-footer .container {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        font-size: 13px;
        color: var(--muted);
    }

/* ---------- 5. LANDING ---------- */
.section {
    padding: 80px 0;
}

.section-head {
    max-width: 620px;
    margin-bottom: 36px;
}

    .section-head h2 {
        font-size: 34px;
        margin: 8px 0 10px;
    }

    .section-head p {
        color: var(--muted);
    }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 60px;
}

    .hero::before, .hero::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        z-index: -1;
    }

    .hero::before {
        width: 520px;
        height: 520px;
        right: -140px;
        top: -120px;
        background: var(--primary-soft);
    }

    .hero::after {
        width: 160px;
        height: 160px;
        right: 34%;
        bottom: 40px;
        background: var(--purple-soft);
    }

    .hero .container {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 40px;
        align-items: center;
    }

    .hero h1 {
        font-size: clamp(38px, 5.4vw, 62px);
        letter-spacing: -.01em;
        margin: 18px 0;
    }

        .hero h1 .accent {
            color: var(--primary-text);
        }

.hero-lead {
    font-size: 17px;
    color: var(--muted);
    max-width: 500px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 36px;
    flex-wrap: wrap;
}

    .hero-stats strong {
        display: block;
        font-size: 28px;
        line-height: 1.2;
    }

    .hero-stats span {
        font-size: 13px;
        color: var(--muted);
    }

.stat-orange {
    color: var(--primary-text);
}

.stat-cyan {
    color: var(--cyan-text);
}

.stat-purple {
    color: var(--purple-text);
}

/* Mockup del teléfono (siempre oscuro, como la app) */
.phone {
    width: 270px;
    margin: 0 auto;
    border-radius: 38px;
    padding: 18px 16px 22px;
    background: #0B0B0D;
    border: 8px solid #232327;
    color: #F4F4F2;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.phone-notch {
    width: 84px;
    height: 18px;
    border-radius: 99px;
    background: #232327;
    margin: -8px auto 14px;
}

.phone small {
    color: #9C9CA3;
    font-size: 11px;
}

.phone h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

.phone-card {
    background: #151517;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
}

    .phone-card.today {
        border-left: 4px solid var(--rhino-orange);
    }

    .phone-card .tag {
        font-size: 10px;
        font-weight: 700;
        color: #F68B42;
    }

    .phone-card b {
        display: block;
        font-size: 14px;
        margin: 2px 0;
    }

.phone-btn {
    margin-top: 10px;
    background: var(--rhino-orange);
    color: #141414;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 8px;
}

.segbar {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

    .segbar i {
        flex: 1;
        height: 5px;
        border-radius: 99px;
        background: var(--surface-3);
    }

        .segbar i.done {
            background: var(--green);
        }

        .segbar i.current {
            background: var(--rhino-orange);
        }

.phone .segbar i {
    background: #26262A;
}
    /* el teléfono siempre es oscuro */
    .phone .segbar i.done {
        background: #3DDC84;
    }

    .phone .segbar i.current {
        background: var(--rhino-orange);
    }

/* Beneficios */
.benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.benefit {
    padding: 22px;
}

.benefit-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.benefit h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.benefit p {
    font-size: 14px;
    color: var(--muted);
}

/* Sección de la app */
.app-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

    .app-section .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        align-items: center;
    }

.app-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
}

    .app-steps li {
        display: flex;
        gap: 14px;
    }

    .app-steps .step-num {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--primary);
        color: var(--primary-ink);
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .app-steps b {
        display: block;
    }

    .app-steps p {
        color: var(--muted);
        font-size: 14px;
    }

/* Planes */
.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.plan {
    padding: 26px;
    position: relative;
    display: flex;
    flex-direction: column;
}

    .plan.featured {
        border: 2px solid var(--primary);
    }

    .plan .popular {
        position: absolute;
        top: 22px;
        right: 22px;
    }

.plan-price {
    font-size: 34px;
    font-weight: 700;
    margin: 12px 0 16px;
}

    .plan-price small {
        font-size: 14px;
        font-weight: 400;
        color: var(--muted);
    }

.plan ul {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: grid;
    gap: 9px;
    flex: 1;
}

.plan li {
    display: flex;
    gap: 9px;
    font-size: 14px;
    color: var(--muted);
}

    .plan li .svg-icon {
        color: var(--green-text);
        margin-top: 3px;
    }

/* Galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 14px;
}

    .gallery figure {
        margin: 0;
        border-radius: var(--radius);
        overflow: hidden;
        position: relative;
        background: var(--surface-2);
    }

        .gallery figure.wide {
            grid-column: span 2;
            grid-row: span 2;
        }

    .gallery img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery figcaption {
        position: absolute;
        left: 12px;
        bottom: 12px;
    }

/* Ubicación y contacto */
.contact {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.map {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 340px;
    border: 1px solid var(--border);
}

    .map iframe {
        width: 100%;
        height: 100%;
        min-height: 340px;
        border: 0;
    }

.contact-info {
    padding: 26px;
    display: grid;
    gap: 20px;
    align-content: start;
}

.contact-item {
    display: flex;
    gap: 14px;
}

    .contact-item .svg-icon {
        color: var(--primary-text);
        margin-top: 3px;
    }

    .contact-item b {
        display: block;
    }

    .contact-item span {
        color: var(--muted);
        font-size: 14px;
    }

/* ---------- LOGIN ---------- */
.auth-page {
    padding: 48px 0 20px;
}

.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
    min-height: 520px;
    box-shadow: var(--shadow);
}

.auth-aside {
    position: relative;
    overflow: hidden;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
}

    .auth-aside::before, .auth-aside::after {
        content: "";
        position: absolute;
        border-radius: 50%;
    }

    .auth-aside::before {
        width: 240px;
        height: 240px;
        left: -90px;
        top: -90px;
        background: var(--primary-soft);
    }

    .auth-aside::after {
        width: 200px;
        height: 200px;
        right: -60px;
        bottom: -70px;
        background: var(--purple-soft);
    }

    .auth-aside > * {
        position: relative;
        z-index: 1;
    }

    .auth-aside img {
        width: 86px;
        height: auto;
        margin-bottom: 22px;
    }

    .auth-aside h1 {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .auth-aside p {
        color: var(--muted);
        max-width: 320px;
    }

.auth-roles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.auth-form {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .auth-form h2 {
        font-size: 26px;
    }

    .auth-form .subtitle {
        color: var(--muted);
        font-size: 14px;
        margin: 4px 0 26px;
    }

.form-group {
    margin-bottom: 16px;
}

.input-icon {
    position: relative;
}

    .input-icon .svg-icon {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--faint);
        width: 16px;
        height: 16px;
    }

    .input-icon .form-control {
        padding-left: 40px;
    }

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 4px 0 22px;
}

    .auth-row label {
        display: flex;
        gap: 8px;
        align-items: center;
        color: var(--muted);
        cursor: pointer;
    }

    .auth-row input[type="checkbox"] {
        accent-color: var(--primary);
        width: 16px;
        height: 16px;
    }

    .auth-row a {
        color: var(--primary-text);
        font-weight: 500;
    }

.auth-note {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 18px;
}

    .auth-note .svg-icon {
        width: 15px;
        height: 15px;
        color: var(--cyan-text);
        margin-top: 2px;
    }

.alert-info {
    background: var(--cyan-soft);
    color: var(--cyan-text);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
}

/* ---------- 6. RESPONSIVE ---------- */
@media (max-width: 960px) {
    .hero .container, .app-section .container, .contact {
        grid-template-columns: 1fr;
    }

    .benefits {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        padding: 32px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .auth-form {
        padding: 32px;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 8px 24px 16px;
    }

        .main-nav.open {
            display: flex;
        }

        .main-nav a {
            padding: 12px 0;
            border-bottom: 1px solid var(--border);
        }

    .header-actions .btn {
        display: none;
    }

    .section {
        padding: 56px 0;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .gallery figure.wide {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- REDES SOCIALES ---------- */
.social {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .social a {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--surface-2);
        border: 1px solid var(--border);
        color: var(--muted);
        transition: background var(--transition), color var(--transition), transform var(--transition);
    }

        .social a:hover {
            transform: translateY(-2px);
            color: #fff;
        }

        .social a.ig:hover {
            background: #E1306C;
            border-color: #E1306C;
        }

        .social a.fb:hover {
            background: #1877F2;
            border-color: #1877F2;
        }

        .social a.wa:hover {
            background: #25D366;
            border-color: #25D366;
        }

    .social svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }

.site-footer .container {
    align-items: center;
}