/* ==========================================================================
   Inicio (index.php) — hero, cifras y trayectoria.
   Usa los tokens de custom.css (--brand-*, --ink-*, --surface, --radius-*).
   ========================================================================== */

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.home-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 5.5rem 0 8.5rem;
    color: #fff;
    background: linear-gradient(135deg, #021a3f 0%, #033a87 48%, var(--brand-primary) 100%);
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 82% 18%, rgba(242, 101, 34, .30), transparent 38%),
        radial-gradient(circle at 10% 90%, rgba(110, 168, 255, .22), transparent 42%),
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: auto, auto, 56px 56px, 56px 56px;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.home-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem .95rem .4rem .45rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .08);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.home-hero-kicker b {
    padding: .2rem .65rem;
    border-radius: var(--radius-pill);
    background: var(--brand-accent);
    color: #fff;
    font-weight: 700;
}

.home-hero h1 {
    margin: 1.4rem 0 1.2rem;
    color: #fff;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
}

.home-hero h1 em {
    font-style: normal;
    color: #ff8a4c;
}

.home-hero-lead {
    max-width: 34rem;
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
}

.home-hero-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.4rem;
    margin: 1.8rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .9rem;
    color: rgba(255, 255, 255, .8);
}

.home-hero-checks i {
    margin-right: .4rem;
    color: #5eead4;
}

/* Composición: panel web + teléfono */
.home-visual {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
    padding: 0 0 3rem 3rem;
}

.home-visual-browser {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 40px 80px rgba(2, 16, 48, .55);
}

.home-visual-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem .9rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.home-visual-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.home-visual-bar small {
    flex: 1;
    margin-left: .6rem;
    padding: .18rem .7rem;
    border-radius: 6px;
    background: #fff;
    font-size: .68rem;
    color: #64748b;
}

.home-visual-browser img {
    display: block;
    width: 100%;
    height: auto;
}

.home-visual-phone {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30%;
    padding: 6px;
    border-radius: 22px;
    background: #0b1220;
    box-shadow: 0 26px 50px rgba(2, 16, 48, .6);
}

.home-visual-phone img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 18;
    object-fit: cover;
    object-position: top;
    border-radius: 17px;
}

.home-visual-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .95rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 16px 34px rgba(2, 16, 48, .35);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.home-visual-chip i {
    font-size: 1.1rem;
    color: var(--brand-accent);
}

.home-visual-chip small {
    display: block;
    font-weight: 500;
    color: #64748b;
}

.home-visual-chip.is-top {
    top: -22px;
    right: -14px;
}

.home-visual-chip.is-bottom {
    right: 6%;
    bottom: 10px;
}

/* -------------------------------------------------------------------------
   Cifras (tarjeta que monta sobre el hero)
   ------------------------------------------------------------------------- */
.home-stats {
    position: relative;
    z-index: 2;
    margin-top: -4.5rem;
}

.home-stats-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.home-stat {
    padding: 1.7rem 1.5rem;
    text-align: center;
}

.home-stat + .home-stat {
    border-left: 1px solid var(--ink-100);
}

.home-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--brand-primary);
}

.home-stat-num sup {
    top: -.55em;
    font-size: .5em;
    color: var(--brand-accent);
}

.home-stat-label {
    display: block;
    margin-top: .55rem;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-900);
}

.home-stat-note {
    display: block;
    font-size: .78rem;
    color: var(--ink-500);
}

/* -------------------------------------------------------------------------
   Trayectoria
   ------------------------------------------------------------------------- */
.home-story h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    letter-spacing: -.015em;
}

.home-story-facts {
    margin: 1.6rem 0 2rem;
    padding: 0;
    list-style: none;
}

.home-story-facts li {
    display: flex;
    gap: .8rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--ink-100);
    color: var(--ink-700);
}

.home-story-facts li:last-child {
    border-bottom: 0;
}

.home-story-facts i {
    margin-top: .2rem;
    color: #16a34a;
}

.home-story-facts strong {
    color: var(--ink-900);
}

.home-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 2.4rem;
    list-style: none;
}

.home-timeline::before {
    content: '';
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: .55rem;
    width: 2px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
    opacity: .35;
}

.home-timeline li {
    position: relative;
    padding: 1.15rem 1.35rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.home-timeline li + li {
    margin-top: 1rem;
}

.home-timeline li::before {
    content: '';
    position: absolute;
    top: 1.45rem;
    left: -2.4rem;
    width: 1.15rem;
    height: 1.15rem;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary);
}

.home-timeline li.is-now {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #033a87 100%);
    color: rgba(255, 255, 255, .88);
}

.home-timeline li.is-now::before {
    background: var(--brand-accent);
    box-shadow: 0 0 0 2px var(--brand-accent);
}

.home-timeline-year {
    display: inline-block;
    margin-bottom: .25rem;
    font-family: var(--font-heading);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-accent);
}

.home-timeline h3 {
    margin: 0 0 .25rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink-900);
}

.home-timeline p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--ink-500);
}

.home-timeline li.is-now h3 {
    color: #fff;
}

.home-timeline li.is-now p {
    color: rgba(255, 255, 255, .82);
}

.home-timeline li.is-now .home-timeline-year {
    color: #ffb48a;
}

.home-stores {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .8rem;
}

.home-stores span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .7rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .1);
    font-size: .76rem;
    font-weight: 600;
    color: #fff;
}

/* -------------------------------------------------------------------------
   Tema oscuro
   ------------------------------------------------------------------------- */
[data-theme="dark"] .home-stats-card,
[data-theme="dark"] .home-timeline li:not(.is-now) {
    border-color: rgba(255, 255, 255, .08);
}

[data-theme="dark"] .home-stat + .home-stat,
[data-theme="dark"] .home-story-facts li {
    border-color: rgba(255, 255, 255, .08);
}

[data-theme="dark"] .home-stat-num {
    color: #8ab4ff;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .home-hero {
        padding: 3.5rem 0 7rem;
    }

    .home-visual {
        margin-top: 3.5rem;
    }
}

@media (max-width: 767.98px) {
    .home-stats-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-stat {
        padding: 1.3rem .8rem;
    }

    .home-stat + .home-stat {
        border-left: 0;
    }

    .home-stat:nth-child(even) {
        border-left: 1px solid var(--ink-100);
    }

    .home-stat:nth-child(n+3) {
        border-top: 1px solid var(--ink-100);
    }

    .home-stat-num {
        font-size: 1.9rem;
    }

    .home-visual {
        padding: 0 0 2.5rem 1.5rem;
    }

    .home-visual-chip.is-top {
        right: -4px;
    }

    .home-visual-chip.is-bottom {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .home-visual-chip {
        animation: floatY 5s ease-in-out infinite;
    }

    .home-visual-chip.is-bottom {
        animation-delay: 1.4s;
    }
}

/* -------------------------------------------------------------------------
   Por qué elegirnos
   ------------------------------------------------------------------------- */
.home-why {
    background: var(--surface-alt);
}

.home-why h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    letter-spacing: -.015em;
}

@media (min-width: 992px) {
    .home-why-intro {
        position: sticky;
        top: 110px;
    }
}

.home-why-highlight {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #021a3f 0%, var(--brand-primary) 100%);
    color: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-md);
}

.home-why-highlight-num {
    flex: 0 0 auto;
    padding-right: 1.1rem;
    border-right: 1px solid rgba(255, 255, 255, .22);
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    color: #ff8a4c;
}

.home-why-highlight-text {
    font-size: .9rem;
    line-height: 1.45;
}

.home-why-highlight-text strong {
    display: block;
    font-size: 1rem;
    color: #fff;
}

.home-why-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}

.home-why-link i {
    transition: transform .2s ease;
}

.home-why-link:hover i {
    transform: translateX(4px);
}

.home-why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.home-why-card {
    position: relative;
    overflow: hidden;
    padding: 1.8rem 1.6rem 1.6rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.home-why-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.home-why-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.home-why-card:hover::after {
    transform: scaleX(1);
}

.home-why-n {
    position: absolute;
    top: 1.1rem;
    right: 1.3rem;
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-primary);
    opacity: .1;
}

.home-why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: var(--brand-primary-light);
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.home-why-card:nth-child(even) .home-why-icon {
    background: var(--brand-accent-light);
    color: var(--brand-accent-dark);
}

.home-why-card h3 {
    margin: 0 0 .45rem;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink-900);
}

.home-why-card p {
    margin: 0;
    font-size: .93rem;
    line-height: 1.6;
    color: var(--ink-500);
}

[data-theme="dark"] .home-why-card {
    border-color: rgba(255, 255, 255, .08);
}

[data-theme="dark"] .home-why-n,
[data-theme="dark"] .home-why-link {
    color: #8ab4ff;
}

[data-theme="dark"] .home-why-n {
    opacity: .18;
}

@media (max-width: 575.98px) {
    .home-why-grid {
        grid-template-columns: 1fr;
    }
}
