/* ========================================
   FRANDE ONE · PORTADA DEL ECOSISTEMA Y MOVIMIENTO
   Depende de tokens.css y ecosistema.css.
   ======================================== */

.fo-accent {
    color: var(--fo-primary);
}

[data-theme="dark"] .fo-accent {
    color: var(--fo-accent);
}

/* Franja de marca en las etiquetas (como Frande One Mail) */
.fo-eyebrow::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 6px;
    margin-right: 0.6rem;
    vertical-align: middle;
    background: repeating-linear-gradient(-45deg, var(--fo-brand-blue) 0 4px, transparent 4px 8px, var(--fo-brand-navy) 8px 12px, transparent 12px 16px);
}

[data-theme="dark"] .fo-eyebrow::before {
    background: repeating-linear-gradient(-45deg, var(--fo-brand-blue) 0 4px, transparent 4px 8px, #e8e8f3 8px 12px, transparent 12px 16px);
}

/* ---------- Hero ---------- */
.fo-hero--home {
    position: relative;
    overflow: hidden;
}

.fo-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--fo-space-7);
    align-items: center;
}

.fo-hero--home h1 {
    max-width: 18ch;
    font-size: clamp(2.3rem, 5.4vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.fo-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fo-space-3) var(--fo-space-5);
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--fo-text-sm);
    color: var(--fo-foreground-secondary);
}

.fo-hero-points li {
    display: flex;
    align-items: center;
    gap: var(--fo-space-2);
}

.fo-hero-points li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--fo-accent);
    transform: rotate(45deg);
}

/* Órbita del ecosistema (decorativa, aria-hidden en el HTML) */
.fo-hero-visual {
    display: flex;
    justify-content: center;
    padding: var(--fo-space-5);
}

.fo-orbit {
    position: relative;
    width: min(100%, 24rem);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px dashed var(--fo-border-strong);
}

.fo-orbit::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 1px solid var(--fo-border);
    background: radial-gradient(closest-side, var(--fo-primary-soft), transparent);
}

.fo-orbit-core {
    position: absolute;
    inset: 33%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: var(--fo-space-1);
    border-radius: 50%;
    background: var(--fo-surface);
    border: 1px solid var(--fo-border);
    box-shadow: var(--fo-shadow-lg);
    font-family: var(--fo-font-display);
    font-weight: 700;
    font-size: var(--fo-text-sm);
    color: var(--fo-foreground);
    text-align: center;
}

.fo-orbit-logo {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.45rem;
    border-radius: var(--fo-radius-md);
    background: var(--fo-primary);
    color: #ffffff;
}

.fo-orbit-item {
    position: absolute;
    display: grid;
    gap: 0.1rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--fo-radius-md);
    background: var(--fo-surface);
    border: 1px solid var(--fo-border);
    box-shadow: var(--fo-shadow-md);
    font-size: var(--fo-text-sm);
    white-space: nowrap;
    animation: fo-float 6s var(--fo-ease) infinite;
}

.fo-orbit-item strong {
    font-family: var(--fo-font-display);
    color: var(--fo-foreground);
}

.fo-orbit-item span {
    font-family: var(--fo-font-mono);
    font-size: var(--fo-text-xs);
    color: var(--fo-link);
}

.fo-orbit-item--1 { top: -4%; left: 50%; margin-left: -3.5rem; }
.fo-orbit-item--2 { top: 42%; right: -12%; animation-delay: -1.5s; }
.fo-orbit-item--3 { bottom: -4%; left: 50%; margin-left: -4rem; animation-delay: -3s; }
.fo-orbit-item--4 { top: 42%; left: -14%; animation-delay: -4.5s; }

@keyframes fo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Cifras ---------- */
.fo-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: var(--fo-space-7) 0 0;
    border: 1px solid var(--fo-border);
    border-radius: var(--fo-radius-lg);
    background: var(--fo-surface);
    overflow: hidden;
}

.fo-stats > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: var(--fo-space-1);
    padding: var(--fo-space-5);
    border-right: 1px solid var(--fo-border);
}

.fo-stats > div:last-child {
    border-right: 0;
}

.fo-stats dt {
    font-size: var(--fo-text-sm);
    color: var(--fo-foreground-secondary);
}

.fo-stats dd {
    margin: 0;
    font-family: var(--fo-font-display);
    font-size: var(--fo-text-3xl);
    font-weight: 800;
    color: var(--fo-foreground);
    line-height: 1;
}

.fo-stats small {
    font-size: var(--fo-text-md);
    font-weight: 600;
    color: var(--fo-foreground-secondary);
}

/* ---------- Tarjetas de producto ---------- */
.fo-grid--eco {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}

.fo-card--product {
    transition: transform var(--fo-duration) var(--fo-ease), box-shadow var(--fo-duration) var(--fo-ease), border-color var(--fo-duration) var(--fo-ease);
}

.fo-card--product:hover,
.fo-card--product:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--fo-shadow-md);
    border-color: var(--fo-primary);
}

.fo-card .fo-card-lead {
    font-weight: 600;
    color: var(--fo-foreground);
}

.fo-mini-list {
    list-style: none;
    padding: 0;
    margin: var(--fo-space-2) 0 var(--fo-space-4);
    display: grid;
    gap: var(--fo-space-2);
    font-size: var(--fo-text-sm);
    line-height: 1.5;
    color: var(--fo-foreground-secondary);
}

.fo-mini-list li {
    position: relative;
    padding-left: 1rem;
}

.fo-mini-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--fo-accent);
    transform: rotate(45deg);
}

.fo-card-link {
    margin-top: auto;
    font-weight: 600;
    color: var(--fo-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fo-card-link::after {
    content: " \2192";
}

/* ---------- Módulos ---------- */
.fo-modules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    border-top: 1px solid var(--fo-border);
    border-left: 1px solid var(--fo-border);
}

.fo-module {
    padding: var(--fo-space-5);
    border-right: 1px solid var(--fo-border);
    border-bottom: 1px solid var(--fo-border);
    background: var(--fo-surface);
    transition: background var(--fo-duration) var(--fo-ease);
}

.fo-module:hover {
    background: var(--fo-primary-soft);
}

.fo-module h3 {
    font-size: var(--fo-text-md);
    margin: 0 0 var(--fo-space-1);
}

.fo-module p {
    margin: 0;
    font-size: var(--fo-text-sm);
    line-height: 1.5;
    color: var(--fo-foreground-secondary);
}

.fo-center-actions {
    text-align: center;
    margin: var(--fo-space-6) 0 0;
}

/* ---------- Secciones de producto ---------- */
.fo-split--product {
    align-items: center;
}

.fo-split--product h2 {
    font-size: var(--fo-text-3xl);
    line-height: 1.15;
    margin: 0 0 var(--fo-space-4);
}

.fo-section-lead {
    font-size: var(--fo-text-lg);
    line-height: 1.6;
    color: var(--fo-foreground-secondary);
    margin: 0 0 var(--fo-space-5);
}

/* ---------- Cómo se calcula el precio ---------- */
.fo-price-steps {
    list-style: none;
    counter-reset: fo-price;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: var(--fo-space-4);
    padding: 0;
    margin: var(--fo-space-5) 0 var(--fo-space-6);
}

.fo-price-steps li {
    counter-increment: fo-price;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--fo-radius-md);
    padding: var(--fo-space-4) var(--fo-space-5);
    line-height: 1.55;
    color: var(--text-secondary);
}

.fo-price-steps li::before {
    content: counter(fo-price);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--fo-primary);
    color: #ffffff;
    font-family: var(--fo-font-mono);
    font-weight: 700;
    font-size: var(--fo-text-sm);
}

.fo-price-steps strong {
    color: var(--text-primary);
}

/* ---------- Testimonios ---------- */
.fo-testimonials {
    padding: var(--fo-space-8) 0;
    background: var(--fo-surface-sunken);
    overflow: hidden;
}

.fo-testimonials[hidden] {
    display: none;
}

.fo-testimonials-controls {
    display: flex;
    justify-content: center;
    margin: calc(-1 * var(--fo-space-4)) 0 var(--fo-space-5);
}

.fo-btn--sm {
    min-height: 2.5rem;
    padding: 0.45rem 1rem;
    font-size: var(--fo-text-sm);
}

.fo-testimonials .testimonial-carousel-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.fo-testimonials .testimonial-track {
    display: flex;
    gap: var(--fo-space-5);
    width: max-content;
    animation: scrollTestimonials 40s linear infinite;
}

.fo-testimonials .testimonial-track:hover,
.fo-testimonials .testimonial-track:focus-within,
.fo-testimonials .testimonial-track.is-paused {
    animation-play-state: paused;
}

/* ---------- Selector de servicio (/empezar) ---------- */
.fo-start-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.fo-start-grid .fo-btn {
    margin-top: auto;
    width: 100%;
}

/* ========================================
   MOVIMIENTO
   Entrada escalonada del hero y revelado al hacer scroll.
   El contenido es visible sin JavaScript: el estado oculto solo aplica con .fo-motion (lo pone movimiento.js).
   ======================================== */
.fo-hero-copy > *,
.fo-hero > .fo-container > .fo-badge,
.fo-hero > .fo-container > h1,
.fo-hero > .fo-container > .fo-hero-lead,
.fo-hero > .fo-container > .fo-hero-actions,
.fo-hero > .fo-container > .fo-hero-note {
    animation: fo-copy-in 600ms var(--fo-ease) both;
}

.fo-hero-copy > :nth-child(2),
.fo-hero > .fo-container > h1 { animation-delay: 80ms; }
.fo-hero-copy > :nth-child(3),
.fo-hero > .fo-container > .fo-hero-lead { animation-delay: 160ms; }
.fo-hero-copy > :nth-child(4),
.fo-hero > .fo-container > .fo-hero-actions { animation-delay: 240ms; }
.fo-hero-copy > :nth-child(5),
.fo-hero > .fo-container > .fo-hero-note { animation-delay: 320ms; }

.fo-orbit {
    animation: fo-orbit-in 800ms var(--fo-ease) both;
}

@keyframes fo-copy-in {
    from { opacity: 0; transform: translateY(14px); }
}

@keyframes fo-orbit-in {
    from { opacity: 0; transform: rotate(-8deg) scale(0.94); }
}

.fo-motion .fo-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--fo-ease), transform 600ms var(--fo-ease);
}

.fo-motion .fo-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .fo-hero-copy > *,
    .fo-hero > .fo-container > *,
    .fo-orbit,
    .fo-orbit-item,
    .fo-testimonials .testimonial-track {
        animation: none !important;
    }

    .fo-motion .fo-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .fo-card--product,
    .fo-card--product:hover,
    .fo-card--product:focus-within {
        transform: none;
        transition: none;
    }
}

@media (max-width: 960px) {
    .fo-hero-grid {
        grid-template-columns: 1fr;
    }

    .fo-hero-visual {
        display: none;
    }

    .fo-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fo-stats > div:nth-child(2) {
        border-right: 0;
    }

    .fo-stats > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--fo-border);
    }
}

/* ---------- Planes del ecosistema ---------- */
.fo-plan-price {
    font-size: var(--fo-text-md);
    color: var(--fo-foreground-secondary);
}

.fo-plan-price strong {
    font-family: var(--fo-font-display);
    font-size: var(--fo-text-xl);
    color: var(--fo-foreground);
}

.fo-plans-note {
    max-width: 46rem;
    margin: 0 auto var(--fo-space-5);
    padding: var(--fo-space-4) var(--fo-space-5);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--fo-primary);
    border-radius: var(--fo-radius-md);
    background: var(--bg-primary);
    text-align: left;
    font-size: var(--fo-text-sm);
    color: var(--text-secondary);
}

.fo-plans-note p {
    margin: 0 0 var(--fo-space-2);
}

.fo-plans-note ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fo-space-2) var(--fo-space-5);
    list-style: none;
    padding: 0;
    margin: 0;
}

.fo-plans-note a {
    font-weight: 600;
    color: var(--fo-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}
