/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Yellix Font Family - Robot.com Design System */
@font-face {
    font-family: 'Yellix';
    src: url('../fonts/Yellix-Regular.woff2') format('woff2'),
         url('../fonts/Yellix-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Yellix';
    src: url('../fonts/Yellix-Medium.woff2') format('woff2'),
         url('../fonts/Yellix-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Yellix';
    src: url('../fonts/Yellix-SemiBold.woff2') format('woff2'),
         url('../fonts/Yellix-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - Robot.com Design System */
:root {
    /* Colors from Figma */
    --yellow-accent: #fff65d;
    --black: #262626;
    --black-65: rgba(38, 38, 38, 0.65);
    --black-30: rgba(38, 38, 38, 0.3);
    --warm-gray-10: #f2f1ee;
    --warm-gray-20: #deddda;
    --white: #ffffff;
    --white-65: rgba(255, 255, 255, 0.65);
    --white-30: rgba(255, 255, 255, 0.3);

    /* Typography - Yellix Font Family */
    --font-family: 'Yellix', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 19px;
    --radius-lg: 24px;
    --radius-pill: 70px;
}

body {
    font-family: var(--font-family);
    font-weight: 500; /* Yellix Medium */
    background-color: #ffffff;  /* ✅ Blanco puro 100% */
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    padding: 16px;              /* ✅ Padding 16px en todos los lados */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-container {
    min-height: calc(100vh - 32px);  /* ✅ 100vh menos padding del body (16px × 2) */
    display: flex;
    flex-direction: column;
    background-color: var(--warm-gray-10);
    padding: 40px 48px 32px;  /* ✅ Aumentado padding-top a 40px para más breathing room */
    border-radius: 19.07px;   /* ✅ Border radius para efecto slide */
}

/* Header */
.header {
    text-align: left;  /* ✅ Alineado a la izquierda como en Figma */
    margin-bottom: 60px;  /* ✅ Aumentado para más breathing room entre logo y hero */
    padding: 0;
}

.logo-container {
    display: inline-block;
}

.logo {
    width: 200px;
    height: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Centra verticalmente */
    align-items: flex-start;  /* ✅ Alineado a la izquierda como en Figma */
}

/* Hero Section */
.hero-section {
    text-align: left;  /* ✅ Alineado a la izquierda como en Figma */
    margin-bottom: 0;  /* ✅ Sin margin-bottom, el spacing lo maneja el hero-headline */
    width: 100%;
    max-width: 1028px;  /* ✅ Desktop max-width */
    padding: 0;         /* ✅ Sin padding en desktop */
}

.hero-headline {
    font-family: var(--font-family);
    font-size: clamp(36px, 5.5vw, 64px);  /* ✅ Aumentado a 64px como en Figma */
    font-weight: 600; /* Yellix SemiBold */
    line-height: 1.1;  /* ✅ Line-height compacto como en Figma */
    margin-bottom: 80px;  /* ✅ Mayor espaciado entre headline y pregunta */
    color: #15171A;  /* ✅ Color de marca Robot.com */
    letter-spacing: -0.02em;
    max-width: 900px;  /* ✅ Aumentado a 900px para texto más ancho y menos saltos de línea */
}

.hero-subtext {
    font-family: var(--font-family);
    font-weight: 500; /* Yellix Medium */
    font-size: clamp(14px, 1.8vw, 16px);  /* ✅ Reducido de 18px a 16px */
    line-height: 1.4;
    color: var(--black-65);
    max-width: 700px;
    margin: 0 auto 24px;  /* ✅ Reducido de 40px a 24px para eliminar scroll */
}

/* Segmentation Section */
.segmentation-section {
    text-align: left;  /* ✅ Alineado a la izquierda como en Figma */
    max-width: 1028px;  /* ✅ Mismo max-width que hero section */
    width: 100%;
    margin: 0;  /* ✅ Sin margin auto para alineación izquierda */
    padding: 0;
}

.segmentation-form {
    width: 100%;
}

.form-step {
    margin-bottom: 20px;  /* ✅ Reducido de 32px a 20px para eliminar scroll */
    transition: all 0.4s ease;
    animation: fadeIn 0.4s ease forwards;
}

.form-step.hidden {
    display: none;
    opacity: 0;
}

/* Form Questions */
.form-question {
    font-family: var(--font-family);
    font-size: clamp(22px, 3vw, 28px);  /* ✅ Reducido de 32px a 28px */
    font-weight: 600; /* Yellix SemiBold */
    margin-bottom: 18px;  /* ✅ Reducido de 24px a 18px para eliminar scroll */
    color: var(--black);
    line-height: 1.05;
}

.form-question-secondary {
    font-family: var(--font-family);
    font-size: clamp(16px, 2.2vw, 20px);  /* ✅ Reducido de 22px a 20px */
    font-weight: 500; /* Yellix Medium */
    margin-bottom: 16px;  /* ✅ Reducido de 20px a 16px para eliminar scroll */
    color: var(--black);
    line-height: 1.16;
}

/* Chips Container */
.chips-container {
    display: flex;
    gap: 14px;
    justify-content: flex-start;  /* ✅ Alineado a la izquierda como en Figma */
    align-items: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0;  /* ✅ Sin margin auto */
}

.chips-container.chips-wrap {
    gap: 12px;
}

/* Chip Styles */
.chip {
    background-color: var(--warm-gray-10);  /* ✅ Estado normal: gris claro */
    color: var(--black);
    border: 1.5px solid var(--black);  /* ✅ Reducido a 1.5px para más elegancia */
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    font-family: var(--font-family);
    font-size: clamp(13px, 1.8vw, 15px);
    font-weight: 500; /* Yellix Medium */
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chip-primary {
    padding: 14px 28px;
    font-size: clamp(15px, 2vw, 17px);
    font-weight: 600; /* Yellix SemiBold */
    border-width: 2px;  /* ✅ Reducido a 2px para más elegancia */
}

.chip-secondary {
    padding: 9px 18px;
    font-size: clamp(12px, 1.6vw, 14px);
}

/* Chip Hover States */
.chip:hover {
    background-color: var(--white);  /* ✅ Hover: blanco (más claro que el gris) */
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(38, 38, 38, 0.1);
}

.chip:active {
    transform: scale(0.98);
}

/* Chip Selected State */
.chip.selected {
    background-color: var(--black);  /* ✅ Selected: fondo negro */
    color: var(--white);  /* ✅ Texto blanco */
    border-color: var(--black);
    box-shadow: 0 4px 12px rgba(38, 38, 38, 0.2);
}

.chip.selected:hover {
    background-color: var(--black);  /* ✅ Mantener negro en hover cuando está selected */
    box-shadow: 0 4px 14px rgba(38, 38, 38, 0.3);
    opacity: 0.9;  /* ✅ Sutil efecto de hover con opacidad */
}

/* CTA Container */
.cta-container {
    margin-top: 24px;  /* ✅ Reducido de 32px a 24px para eliminar scroll */
    text-align: left;  /* ✅ Alineado a la izquierda como en Figma */
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.cta-container.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.btn-cta {
    background-color: var(--yellow-accent);
    color: var(--black);
    border: none;
    border-radius: var(--radius-pill);
    padding: 16px 56px;
    font-family: var(--font-family);
    font-size: clamp(16px, 2.2vw, 18px);
    font-weight: 600; /* Yellix SemiBold */
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-cta:hover {
    background-color: #ffff3c;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 61, 0.4);
}

.btn-cta:active {
    transform: scale(1.02);
}

/* Thank You Section */
.thank-you-section {
    text-align: left;  /* ✅ Alineado a la izquierda como la pantalla principal */
    padding: 0;
    width: 100%;
    max-width: 1028px;  /* ✅ Mismo max-width que hero section */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.thank-you-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.thank-you-content {
    max-width: 900px;  /* ✅ Mismo max-width que hero headline */
    margin: 0;  /* ✅ Sin margin auto para alineación izquierda */
}

/* Video Thumbnail - Elegant & Compact */
.video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 350px;  /* ✅ Más pequeño y elegante */
    margin-bottom: 32px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio */
    background: #E8E7E3;  /* ✅ Fondo gris claro como fallback */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.play-button {
    position: absolute;
    bottom: 16px;  /* ✅ Posicionado en esquina inferior derecha */
    right: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.video-thumbnail:hover .play-button {
    transform: scale(1.08);
    filter: drop-shadow(0 6px 16px rgba(255, 246, 93, 0.4));
}

/* Video Modal - Fullscreen */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
    z-index: 10001;
}

.video-modal-close:hover {
    transform: scale(1.1);
}

.video-modal-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.thank-you-title {
    font-family: var(--font-family);
    font-size: clamp(32px, 4.5vw, 48px);  /* ✅ Más pequeño que hero headline */
    font-weight: 600; /* Yellix SemiBold */
    margin-bottom: 24px;
    color: var(--black);
    line-height: 1.15;  /* ✅ Ligeramente más espaciado para dos líneas */
}

.thank-you-text {
    font-family: var(--font-family);
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 500; /* Yellix Medium */
    line-height: 1.5;
    color: var(--black-65);
    max-width: 600px;
    margin: 0;  /* ✅ Sin margin auto para alineación izquierda */
}

/* Footer */
.footer {
    text-align: right;  /* ✅ Alineado a la derecha como en la diapositiva */
    padding: 32px 0 0;
    margin-top: auto;
    width: 100%;
}

.privacy-text {
    font-family: var(--font-family);
    font-size: 11px;  /* ✅ Más pequeño y discreto */
    font-weight: 500; /* Yellix Medium */
    color: rgba(38, 38, 38, 0.4);  /* ✅ Más claro/discreto */
    margin-bottom: 2px;  /* ✅ Reducido a 2px para menos espacio */
    line-height: 1.2;  /* ✅ Line-height más compacto */
}

.privacy-link {
    color: rgba(38, 38, 38, 0.4);  /* ✅ Mismo color discreto */
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.privacy-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.copyright {
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: 500; /* Yellix Medium */
    color: rgba(38, 38, 38, 0.4);  /* ✅ Mismo color discreto */
    line-height: 1.2;  /* ✅ Line-height más compacto */
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;              /* ✅ Padding 12px en tablet */
    }

    .page-container {
        min-height: calc(100vh - 24px);  /* ✅ 100vh menos padding (12px × 2) */
        padding: 32px 24px 50px;  /* ✅ Ajustado padding para tablet */
        border-radius: 16px;        /* ✅ Border radius proporcional */
    }

    .hero-headline {
        font-size: clamp(36px, 6vw, 56px);  /* ✅ Más grande en tablet */
        max-width: 700px;  /* ✅ Más ancho en tablet */
    }

    .header {
        margin-bottom: 48px;  /* ✅ Más espacio en tablet */
        text-align: left;  /* ✅ Mantener alineación izquierda en tablet */
    }

    .hero-section {
        margin-bottom: 50px;
        text-align: left;  /* ✅ Mantener alineación izquierda en tablet */
        padding: 0;
    }

    .segmentation-section {
        text-align: left;  /* ✅ Mantener alineación izquierda en tablet */
    }

    .chips-container {
        justify-content: flex-start;  /* ✅ Mantener alineación izquierda en tablet */
    }

    .hero-subtext {
        margin-bottom: 40px;
    }

    .segmentation-section {
        margin-bottom: 50px;
    }

    .chips-container {
        gap: 10px;
    }

    .chip {
        padding: 10px 20px;
        font-size: 14px;
    }

    .chip-primary {
        padding: 14px 28px;
        font-size: 16px;
    }

    .chip-secondary {
        padding: 9px 18px;
        font-size: 13px;
    }

    .cta-container {
        margin-top: 40px;
    }

    .footer {
        padding: 40px 0 0;  /* ✅ Mantener alineación derecha en tablet */
        text-align: right;
    }

    .video-thumbnail {
        max-width: 100%;  /* ✅ Full width en tablet */
        margin-bottom: 28px;
    }

    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -40px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;               /* ✅ Padding 8px en móvil */
    }

    .page-container {
        min-height: calc(100vh - 16px);  /* ✅ 100vh menos padding (8px × 2) */
        padding: 24px 16px 40px;  /* ✅ Más padding-top en móvil */
        border-radius: 12px;        /* ✅ Border radius más pequeño */
    }

    .header {
        text-align: left;  /* ✅ Mantener alineación izquierda en móvil */
        margin-bottom: 36px;  /* ✅ Espacio proporcional en móvil */
    }

    .hero-section {
        text-align: left;  /* ✅ Mantener alineación izquierda en móvil */
        padding: 0;
    }

    .hero-headline {
        font-size: clamp(32px, 8vw, 48px);  /* ✅ Tamaño apropiado para móvil */
        max-width: 100%;  /* ✅ Usar todo el ancho disponible en móvil */
        margin-bottom: 60px;  /* ✅ Espaciado proporcional en móvil */
    }

    .segmentation-section {
        text-align: left;  /* ✅ Mantener alineación izquierda en móvil */
    }

    .chips-container {
        justify-content: flex-start;  /* ✅ Mantener alineación izquierda en móvil */
    }

    .chip {
        font-size: 13px;
        padding: 9px 16px;
    }

    .chip-primary {
        font-size: 15px;
        padding: 12px 24px;
    }

    .chip-secondary {
        font-size: 12px;
        padding: 8px 16px;
    }

    .btn-cta {
        padding: 14px 40px;
        font-size: 16px;
    }

    .video-thumbnail {
        max-width: 100%;  /* ✅ Full width en móvil */
        margin-bottom: 24px;
    }

    .play-button {
        width: 48px;
        height: 48px;
        bottom: 12px;
        right: 12px;
    }

    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -35px;
        right: 0;
    }

    .video-modal-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading state */
.btn-cta.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-cta.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
