/* 
   --------------------------------------------------------
   STYLES.CSS - FocusFlow Landing Page
   Senior Frontend Setup: Variables, Reset, Utilities, Components
   --------------------------------------------------------
*/

:root {
    /* PALETA DE COLORES - TEMA PSICOLOGÍA (Light & Calming) */
    /* Primarios - Teal & Soft Blue */
    --color-primary: #0d9488;
    /* Teal 600 */
    --color-primary-dark: #0f766e;
    /* Teal 700 */
    --color-accent: #f59e0b;
    /* Amber 500 (Cálido) */

    /* Neutrales (Light Theme Base) */
    --color-bg: #f8fafc;
    /* Slate 50 */
    --color-bg-alt: #ffffff;
    /* White */
    --color-text-main: #334155;
    /* Slate 700 */
    --color-text-muted: #64748b;
    /* Slate 500 */
    --color-border: #e2e8f0;
    /* Slate 200 */

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);

    /* TIPOGRAFÍA */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* ESPACIADOS & MEDIDAS */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* TRANSICIONES */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Texto nítido en macOS */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Accesibilidad: Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------------
   LAYOUT & UTILIDADES
   -------------------------------------------------------- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section__subtitle {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.btn--primary {
    background: var(--color-primary);
    color: white;
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn--secondary {
    background: transparent;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
}

.btn--text {
    background: transparent;
    color: var(--color-text-muted);
    padding: 0;
}

.btn--text:hover {
    color: var(--color-primary);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Texto Gradiente */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --------------------------------------------------------
   COMPONENTS: HEADER
   -------------------------------------------------------- */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-fast), backdrop-filter var(--transition-fast);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header__container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link:hover {
    color: var(--color-primary);
}

.header__actions {
    display: flex;
    gap: 1rem;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --------------------------------------------------------
   COMPONENTS: HERO
   -------------------------------------------------------- */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero__description {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hero__metrics {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(99, 102, 241, 0.2);
}

.metric__label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Hero Visual Animation */
.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Reemplazamos el mockup de app con una composición abstracta de bienestar */
.wellness-visual {
    position: relative;
    width: 400px;
    height: 400px;
}

.circle-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ccfbf1, #f0fdfa);
    z-index: 1;
    animation: pulse-slow 8s infinite ease-in-out;
}

.calm-image {
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.2);
    background: #e2e8f0;
    /* Fallback */
}

/* Simulamos una imagen con un div de color sólido por ahora */
.calm-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #99f6e4;
}

/* Floating Card Effect - Adapted */
.floating-card {
    position: absolute;
    bottom: 40px;
    right: -20px;
    /* Cambiado de lado */
    left: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(13, 148, 136, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    animation: float 5s ease-in-out infinite;
    z-index: 3;
}

.floating-card.secondary {
    bottom: auto;
    top: 60px;
    right: auto;
    left: -40px;
    animation-delay: 2s;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box.success {
    background: #d1fae5;
    color: #059669;
}

.icon-box.calm {
    background: #e0f2fe;
    color: #0284c7;
}

@keyframes float {
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --------------------------------------------------------
   COMPONENTS: CLIENTS / FEATURES
   -------------------------------------------------------- */
.clients__text {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.clients__grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    opacity: 0.6;
}

.client-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feature-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.purple {
    background: linear-gradient(135deg, #c084fc, #9333ea);
}

.blue {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.orange {
    background: linear-gradient(135deg, #fb923c, #ea580c);
}

.feature-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.feature-card__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --------------------------------------------------------
   COMPONENTS: STEPS / TESTIMONIALS
   -------------------------------------------------------- */
.steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    gap: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step__number {
    width: 3rem;
    height: 3rem;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin-top: 1.5rem;
    display: none;
    /* Mobile hidden */
}

@media(min-width: 768px) {
    .step-connector {
        display: block;
    }
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.testimonial-card__rating {
    color: #f59e0b;
    margin-bottom: 1rem;
}

.testimonial-card__text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--color-text-main);
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.gradient-1 {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.gradient-2 {
    background: linear-gradient(135deg, #10b981, #3b82f6);
}

/* --------------------------------------------------------
   COMPONENTS: CTA / FOOTER
   -------------------------------------------------------- */
.cta__card {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta__content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
}

.cta__content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
}

.cta__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Expanded Form Styles */
.cta__form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    text-align: left;
    /* Align text inside inputs to left */
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .full-width {
        grid-column: span 2;
    }
}

.cta__form input,
.cta__form select,
.cta__form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    transition: all var(--transition-fast);
}

.cta__form input:focus,
.cta__form select:focus,
.cta__form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
    background-color: white;
}

.cta__form textarea {
    resize: vertical;
}

.footer {
    border-top: 1px solid var(--color-border);
    padding: 4rem 0 2rem;
    background: var(--color-bg);
    margin-top: 4rem;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__col h4 {
    margin-bottom: 1.5rem;
    color: inherit;
}

.footer__col ul li {
    margin-bottom: 0.75rem;
}

.footer__col ul li a {
    color: var(--color-text-muted);
}

.footer__col ul li a:hover {
    color: var(--color-primary);
}

.footer__bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

/* --------------------------------------------------------
   MEDIA QUERIES (Mobile Adaptation)
   -------------------------------------------------------- */
@media (max-width: 768px) {
    .header__container {
        padding: 0 1.5rem;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .header__actions {
        display: none;
        /* Ocultar botones header en mÃ³vil para simplificar */
    }

    .nav__toggle {
        display: block;
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        margin: 0 auto;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__metrics {
        justify-content: center;
    }

    .steps {
        flex-direction: column;
    }

    .cta__form {
        flex-direction: column;
    }
}

@media (min-width: 769px) {
    .cta__form {
        flex-direction: row;
    }

    .cta__form input {
        flex: 1;
    }

    .cta__form button {
        width: auto;
    }
}

/* Utlity animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}