/* =========================================================
   RELY Occidente · Home refresh (auditoría UI/UX LemonLabs)
   assets/css/home-refresh.css · solo se carga en el home.
   No modifica el hero con paisajes, el recorrido del carro
   (scrolly) ni el video: esas secciones quedan intactas.
   ========================================================= */

/* 1 · Oscuro matizado: grafito cálido en lugar de negro puro */
:root {
    --bg-color: #0f1115;
    --bg-elevated: #15181e;
    --bg-card: rgba(255, 255, 255, 0.035);
    --text-main: #f3f4f6;
    --text-dim: #a3a8b3;              /* antes #86868B: contraste 4.6:1 → 7.4:1 */
    --glass-bg: rgba(21, 24, 30, 0.78);
    --glass-border: rgba(255, 255, 255, 0.09);
    --shadow-heavy: rgba(0, 0, 0, 0.45);
    --rr-surface-a: #0f1115;
    --rr-surface-b: #13161c;
    --rr-line: rgba(255, 255, 255, 0.08);
}
html, body { background-color: var(--bg-color); }

/* Ritmo de secciones: superficies alternas y separación sutil (sin tocar hero/scrolly/video) */
.specs-bento,
.interior-visor,
.versions-section,
.faq-area,
.test-drive-area {
    position: relative;
    background-color: var(--rr-surface-a) !important;
}
.interior-visor,
.faq-area { background-color: var(--rr-surface-b) !important; }
.specs-bento::before,
.interior-visor::before,
.versions-section::before,
.faq-area::before,
.test-drive-area::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: min(1100px, 90%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--rr-line), transparent);
}
.r8-esencial { background: linear-gradient(180deg, var(--rr-surface-b), var(--rr-surface-a)) !important; }

/* 2 · Menos espacio muerto entre secciones */
.specs-bento,
.interior-visor,
.versions-section { padding-top: clamp(64px, 8vw, 110px) !important; padding-bottom: clamp(64px, 8vw, 110px) !important; }
.faq-area .container { padding-top: clamp(56px, 7vw, 96px) !important; padding-bottom: clamp(56px, 7vw, 96px) !important; }
.test-drive-area { padding-top: clamp(56px, 7vw, 100px) !important; padding-bottom: clamp(56px, 7vw, 100px) !important; }

/* 3 · Legibilidad */
header .nav-links a,
header nav a { font-size: 0.8rem !important; letter-spacing: 0.06em; }
.bento-header p,
.td-info p,
.faq-item p,
.versions-section p { color: var(--text-dim); line-height: 1.65; }
.hero-tags span { font-size: 0.72rem; }

/* Tarjetas: bordes y fondo un poco más visibles sobre grafito */
.bento-item,
.td-form-box,
.fleet-card-wrapper {
    border-color: var(--rr-line) !important;
    background-color: rgba(255, 255, 255, 0.03);
}

/* 4 · Preguntas frecuentes en acordeón (details/summary: funciona sin JavaScript y Google lee todo) */
.faq-container { display: grid; gap: 10px; }
.faq-item {
    padding: 0 !important;
    border: 1px solid var(--rr-line) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    overflow: hidden;
    transition: border-color .25s ease, background-color .25s ease;
}
.faq-item:hover { border-color: rgba(255, 90, 26, .35) !important; transform: none !important; }
.faq-item[open] { border-color: rgba(255, 90, 26, .45) !important; background: rgba(255, 90, 26, .05) !important; }
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid #ff5a1a; outline-offset: -2px; border-radius: 16px; }
.faq-item summary h4 {
    margin: 0 !important;
    font-size: 1.02rem !important;
    line-height: 1.4;
    color: var(--text-main) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.faq-icon {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--rr-line);
    transition: transform .3s ease, background-color .3s ease;
}
.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 1.6px;
    background: currentColor;
    color: var(--text-main);
    transform: translate(-50%, -50%);
    transition: transform .3s ease;
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: #ff5a1a; border-color: #ff5a1a; }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-answer { padding: 0 22px 20px; }
.faq-answer p { margin: 0 !important; font-size: 0.98rem; }
.faq-item[open] .faq-answer { animation: rrFaq .3s ease; }
@keyframes rrFaq { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 5 · Formulario: más contraste y campos más claros */
.field input,
.field select {
    background-color: rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-main) !important;
}
.field label { color: #b6bbc5 !important; }
.field input:focus,
.field select:focus {
    border-color: #ff5a1a !important;
    box-shadow: 0 0 0 3px rgba(255, 90, 26, 0.18) !important;
}

/* 6 · Accesibilidad */
a:focus-visible,
button:focus-visible { outline: 2px solid #ff5a1a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .glitch-text::before,
    .glitch-text::after { animation: none !important; display: none; }
    .faq-item[open] .faq-answer { animation: none; }
}

@media (max-width: 760px) {
    .faq-item summary { padding: 16px 16px; }
    .faq-answer { padding: 0 16px 16px; }
}

/* =========================================================
   7 · Secciones claras (v1.7.4)
   Lo inmersivo (hero, recorrido, video, ingeniería, interior) sigue oscuro;
   lo informativo (versiones, lo esencial, preguntas, compra) pasa a claro cálido,
   con el mismo tono del showroom de Valeria.
   ========================================================= */
.rr-light {
    --text-main: #15171c;
    --text-dim: #5c616b;
    --bg-card: #ffffff;
    --glass-bg: rgba(255, 255, 255, .9);
    --glass-border: rgba(16, 18, 24, .09);
    --rr-line: rgba(16, 18, 24, .09);
    background: #f6f5f2 !important;
    color: #15171c;
}
.rr-light::before { background: linear-gradient(90deg, transparent, rgba(16,18,24,.08), transparent) !important; }
.rr-light h2, .rr-light h3, .rr-light h4, .rr-light .bento-header h2 { color: #15171c !important; }
.rr-light p, .rr-light .bento-header p { color: #5c616b; }
.versions-section.rr-light { background: linear-gradient(180deg, #f6f5f2 0%, #efede8 100%) !important; }

/* Elige tu R8 */
.rr-light .tab-link { color: #8a8f99 !important; }
.rr-light .tab-link.active { color: #15171c !important; }
.rr-light .showroom-specs h3 { color: #15171c !important; }
.rr-light .showroom-desc { color: #5c616b !important; }
.rr-light .spec-row { border-color: rgba(16,18,24,.09) !important; }
.rr-light .spec-row span:first-child { color: #6b707a !important; }
.rr-light .spec-row span:last-child { color: #15171c !important; }
.rr-light .showroom-img-container img { filter: drop-shadow(0 28px 26px rgba(0,0,0,.18)); }
.rr-light .color-selector { background: #ffffff !important; border: 1px solid rgba(16,18,24,.08) !important; box-shadow: 0 10px 30px rgba(16,18,24,.06); }
.rr-light .color-selector p { color: #6b707a !important; }
.rr-light .color-dot[style*="#FFFFFF"], .rr-light .color-dot[style*="#ffffff"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }

/* Lo esencial */
.r8-esencial.rr-light { background: #ffffff !important; color: #15171c; }
.rr-light.r8-esencial .lead { color: #5c616b; }
.rr-light.r8-esencial .card { background: #f6f5f2; border-color: rgba(16,18,24,.07); }
.rr-light.r8-esencial .card p { color: #5c616b; }
.rr-light.r8-esencial .card ul { color: #2b2f36; }
.rr-light.r8-esencial .card img { filter: drop-shadow(0 18px 16px rgba(0,0,0,.16)); }
.rr-light.r8-esencial .price { border-color: rgba(16,18,24,.08); }
.rr-light.r8-esencial .price span, .rr-light.r8-esencial .price small { color: #6b707a; }
.rr-light.r8-esencial .fact { background: #fff4ee; border-color: rgba(255,90,26,.18); }
.rr-light.r8-esencial .fact span { color: #5c616b; }
.rr-light.r8-esencial .ctas .a2 { border-color: rgba(16,18,24,.16); color: #15171c; }

/* Preguntas frecuentes */
.faq-area.rr-light { background: #f6f5f2 !important; }
.rr-light .faq-item { background: #ffffff !important; border-color: rgba(16,18,24,.08) !important; box-shadow: 0 1px 2px rgba(16,18,24,.04); }
.rr-light .faq-item[open] { background: #ffffff !important; border-color: rgba(255,90,26,.4) !important; box-shadow: 0 14px 34px rgba(16,18,24,.07); }
.rr-light .faq-item summary h4 { color: #15171c !important; }
.rr-light .faq-icon { border-color: rgba(16,18,24,.14); }
.rr-light .faq-icon::before, .rr-light .faq-icon::after { color: #15171c; }
.rr-light .faq-item[open] .faq-icon::before, .rr-light .faq-item[open] .faq-icon::after { color: #ffffff; }
.rr-light .faq-answer p { color: #4b5059 !important; }

/* =========================================================
   8 · Cierre: tarjeta clara de producto con CTA que abre a Valeria
   (reemplaza el formulario, que no tenía envío programado)
   ========================================================= */
.rr-cta { background: #f6f5f2 !important; padding: clamp(40px, 6vw, 90px) 5% clamp(64px, 8vw, 120px) !important; }
.rr-cta::before { display: none; }
.rr-cta-card {
    max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
    border-radius: 32px; overflow: hidden; background: #ffffff; color: #15171c;
    border: 1px solid rgba(16,18,24,.06); box-shadow: 0 30px 80px rgba(16,18,24,.10);
}
.rr-cta-copy { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.rr-cta-kick { display: inline-block; margin-bottom: 12px; color: #e2410a; font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.rr-cta-copy h2 { margin: 0 0 14px !important; color: #15171c !important; font-size: clamp(28px, 3.4vw, 46px) !important; line-height: 1.05 !important; letter-spacing: -1.2px; text-transform: none !important; }
.rr-cta-copy > p { margin: 0 0 20px; color: #5c616b !important; font-size: 17px; line-height: 1.6; max-width: 520px; }
.rr-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; }
.rr-points li { padding: 7px 12px; border-radius: 999px; background: #f6f5f2; color: #2b2f36; font-size: 13px; font-weight: 700; }
.rr-points li::before { content: "✓ "; color: #e2410a; }
.rr-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.rr-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.rr-btn:hover { transform: translateY(-2px); }
.rr-btn-primary { background: linear-gradient(135deg, #ff5a1a, #e2410a); color: #fff !important; box-shadow: 0 14px 30px rgba(255,90,26,.28); }
.rr-btn-ghost { border: 1px solid rgba(16,18,24,.16); color: #15171c !important; background: #fff; }
.rr-btn-ghost:hover { background: #f6f5f2; }
.rr-btn-link { display: inline-block; margin-top: 16px; color: #5c616b !important; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.rr-cta-visual { position: relative; min-height: 420px; display: grid; place-items: center; overflow: hidden;
    background: radial-gradient(80% 70% at 50% 100%, #e7e2da 0%, #f3f1ec 55%, #faf9f7 100%); }
.rr-cta-visual img { width: 112%; max-width: none; margin-right: -12%; height: auto; filter: drop-shadow(0 34px 30px rgba(0,0,0,.22)); }
.rr-chip { position: absolute; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(16,18,24,.12); font-weight: 800; font-size: 15px; color: #15171c; }
.rr-chip small { display: block; font-size: 11px; font-weight: 700; color: #6b707a; text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; }
.rr-chip-price { top: 26px; left: 26px; }
.rr-chip-live { right: 26px; bottom: 26px; font-size: 13px; }
.rr-chip-live i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
@media (max-width: 900px) {
    .rr-cta-card { grid-template-columns: 1fr; border-radius: 24px; }
    .rr-cta-visual { min-height: 230px; order: -1; }
    .rr-cta-visual img { width: 100%; margin: 0; }
    .rr-chip-price { top: 14px; left: 14px; padding: 8px 12px; font-size: 14px; }
    .rr-chip-live { right: 14px; bottom: 14px; }
    .rr-btn { flex: 1 1 100%; }
}

/* 9 · Botones del hero siempre visibles (la animación de entrada los dejaba ocultos
   mientras cargaba el video). No toca paisajes ni carros. */
.home-r8-hero .hero-btns,
.home-r8-hero .hero-btns a { opacity: 1 !important; visibility: visible !important; transform: none !important; }
@media (max-width: 760px) {
    .rr-light .showroom-price { font-size: 1.5rem !important; line-height: 1.2 !important; }
}

/* 10 · Teléfono: fondo del hero visible y tipografías proporcionadas */
@media (max-width: 760px) {
    .home-r8-hero { align-items: flex-start !important; padding-bottom: 28vh !important; }
    .home-r8-hero .main-car-img { object-position: 62% bottom !important; }
    /* Velo más liviano: se ven el cielo y las dunas arriba y los carros abajo */
    .home-r8-hero::before {
        background: linear-gradient(180deg, rgba(5,6,9,.62) 0%, rgba(5,6,9,.5) 30%, rgba(5,6,9,.42) 55%, rgba(5,6,9,.12) 78%, rgba(5,6,9,.6) 100%) !important;
    }
    .home-r8-hero h1, .home-r8-hero h2, .home-r8-hero .hero-lead { text-shadow: 0 2px 18px rgba(0,0,0,.55); }
    .home-r8-hero .video-overlay { background: none !important; }

    section:not(.home-r8-hero):not(.scrolly-section):not(.video-break) h2 {
        font-size: clamp(1.65rem, 7.4vw, 2.15rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.02em;
    }
    section:not(.home-r8-hero):not(.scrolly-section):not(.video-break) h3 {
        font-size: clamp(1.15rem, 5.2vw, 1.45rem) !important;
        line-height: 1.2 !important;
    }
    section:not(.home-r8-hero):not(.scrolly-section):not(.video-break) p {
        font-size: 0.98rem !important;
        line-height: 1.6 !important;
    }
    .r8-esencial .card h3, .rr-light .showroom-specs h3 { font-size: 1.35rem !important; }
    .rr-light .showroom-price { font-size: 1.35rem !important; }
    .faq-item summary h4 { font-size: 0.98rem !important; }
}
