/* ================================
   RESET AND BASE STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Saans-TRIAL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #4B2354;
    background: linear-gradient(270deg, rgba(75, 35, 84, 1) 0%, rgba(118, 36, 154, 1) 47%, rgba(46, 29, 77, 1) 100%);
}

/* ================================
   LAYOUT COMPONENTS
   ================================ */

.main-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section {
    width: 100%;
    padding: 80px 16px;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.row {
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 100%;
    align-items: center;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ================================
   HEADER - MENÚ MÓVIL COMPLETO
   ================================ */

.header {
    background-color: rgba(0, 0, 0, 0.18);
        border-radius: 16px;
        padding: 12px 20px;
        margin: 24px auto 0 auto;
        max-width: 1220px;
        box-shadow: 0px 4px 70px rgba(136, 136, 136, 0.3);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    width: 80px;
    height: 26px;
    z-index: 1002;
}

/* Menú hamburguesa */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay del menú móvil */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 8px 0;
}

.nav-link:hover {
    color: #b147ff;
}

.cta-button,
.cta-button-mobile {
    background-color: #ffffff;
    color: #000000;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cta-button:hover,
.cta-button-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.cta-button-mobile {
    display: none;
}

.desktop-only {
    display: block;
}

/* ================================
   BUTTONS
   ================================ */

.primary-button {
    background: linear-gradient(90deg, #b147ff 0%, #f3359e 100%);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(177, 71, 255, 0.4);
}

/* ================================
   WAITLIST SECTION
   ================================ */

.waitlist-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 160px 16px 80px;
    margin-top: 0;
}

.waitlist-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.waitlist-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #ffffff 0%, #fdfdfd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    white-space: normal;
}

.waitlist-subtitle {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    margin-bottom: 24px;
    opacity: 0.9;
}

.highlight-text {
    background: linear-gradient(90deg, #b147ff 0%, #f3359e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.waitlist-text {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 48px;
    opacity: 0.8;
    max-width: 600px;
}

/* ================================
   ROLE CARDS VERTICALES
   ================================ */

.role-cards-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 400px;
    margin-top: 40px;
}

.role-card {
    background: linear-gradient(270deg, #faf5fe 0%, #fcf2f8 100%);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 8px 32px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    width: 100%;
}

.role-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(177, 71, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 20px 60px rgba(255, 255, 255, 0.2);
    background: linear-gradient(270deg, #ffffff 0%, #f8f4ff 100%);
}

.role-card:hover:before {
    left: 100%;
}

.role-card:active {
    transform: translateY(-4px);
}

.role-card-image {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.role-card:hover .role-card-image {
    transform: scale(1.05);
    background: rgba(177, 71, 255, 0.1);
}

.role-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.role-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.role-title {
    font-size: 18px;
    font-weight: 700;
    color: #6e0873;
    margin: 0;
    transition: all 0.3s ease;
}

.role-card:hover .role-title {
    color: #5a0861;
    transform: translateY(-2px);
}

/* Estados de selección */
.role-card.selected {
    background: linear-gradient(270deg, #b147ff 0%, #f3359e 100%);
    color: white;
    transform: translateY(-8px);
    box-shadow: 0px 20px 60px rgba(177, 71, 255, 0.4);
}

.role-card.selected .role-title {
    color: white;
}

.role-card.selected .role-card-image {
    background: rgba(255, 255, 255, 0.2);
}

/* Loading state */
.role-card.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.role-card.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #6e0873;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ================================
   FOOTER
   ================================ */

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 16px 40px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.footer-description {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.8;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-link:hover {
    opacity: 1;
    transform: scale(1.2);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.footer-link {
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-link:hover {
    color: #b147ff;
    opacity: 1;
}

/* ================================
   INTERACTIVE STATES
   ================================ */

.interactive:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waitlist-content {
    animation: fadeInUp 0.8s ease-out;
}

.waitlist-title {
    animation: slideInLeft 1s ease-out 0.2s both;
}

.waitlist-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.waitlist-text {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.role-cards-container {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.role-card:nth-child(1) {
    animation: slideInUp 0.6s ease-out 1s both;
}

.role-card:nth-child(2) {
    animation: slideInUp 0.6s ease-out 1.2s both;
}

.role-card:nth-child(3) {
    animation: slideInUp 0.6s ease-out 1.4s both;
}

/* ================================
   RESPONSIVE DESIGN - MENÚ MÓVIL
   ================================ */

/* Mobile pequeño - hasta 374px */
@media (max-width: 374px) {
    .header {
        padding: 8px 12px;
        margin: 8px;
        width: 95%;
    }

    .logo {
        width: 70px;
        height: 22px;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 28px;
        height: 28px;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(75, 35, 84, 0.98) 0%, rgba(118, 36, 154, 0.98) 100%);
        flex-direction: column;
        padding: 80px 20px 30px;
        gap: 18px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 16px;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cta-button {
        display: none;
    }

    .cta-button-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 15px;
        font-size: 12px;
        padding: 10px 16px;
    }

    .waitlist-title {
        font-size: 28px;
        line-height: 1.1;
    }

    .waitlist-subtitle {
        font-size: 16px;
    }

    .waitlist-text {
        font-size: 14px;
    }

    .role-card {
        min-height: 180px;
        padding: 20px;
    }

    .role-card-image {
        width: 80px;
        height: 80px;
    }

    .role-title {
        font-size: 16px;
    }
}

/* Mobile - 375px a 480px */
@media (min-width: 375px) and (max-width: 480px) {
    .header {
        padding: 10px 16px;
        margin: 12px;
        width: 95%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(75, 35, 84, 0.98) 0%, rgba(118, 36, 154, 0.98) 100%);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 18px;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cta-button {
        display: none;
    }

    .cta-button-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    .waitlist-title {
        font-size: 30px;
    }

    .waitlist-subtitle {
        font-size: 17px;
    }

    .role-card-image {
        width: 90px;
        height: 90px;
    }
}

/* Tablet - 481px a 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .header {
        padding: 12px 20px;
        margin: 16px;
        width: 95%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(75, 35, 84, 0.98) 0%, rgba(118, 36, 154, 0.98) 100%);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 20px;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cta-button {
        display: none;
    }

    .cta-button-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }
}

/* Desktop pequeño - 769px en adelante */
@media (min-width: 769px) {
    .header {
        margin: 20px auto 0 auto;
        width: 95%;
        max-width: 1400px;
        padding: 12px 40px;
    }

    .nav-links {
        display: flex;
        gap: 40px;
        position: static;
        width: auto;
        height: auto;
        background: none;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        align-items: center;
    }

    .nav-link {
        font-size: 18px;
        width: auto;
        padding: 8px 0;
        border-bottom: none;
    }

    .desktop-only {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .cta-button-mobile {
        display: none;
    }
}

/* ================================
   RESPONSIVE MEDIA QUERIES
   ================================ */

@media (min-width: 640px) {
    .section {
        padding: 100px 24px;
    }

    .waitlist-title {
        font-size: 42px;
        white-space: nowrap;
    }

    .waitlist-subtitle {
        font-size: 20px;
    }

    .waitlist-text {
        font-size: 18px;
    }

    .role-cards-container {
        flex-direction: row;
        gap: 20px;
        max-width: 800px;
        justify-content: center;
    }

    .role-card {
        flex: 1;
        max-width: 240px;
        min-height: 240px;
        padding: 28px 20px;
    }

    .role-card-image {
        width: 100px;
        height: 100px;
    }

    .role-title {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .section {
        padding: 120px 32px;
    }

    .waitlist-title {
        font-size: 58px;
    }

    .waitlist-subtitle {
        font-size: 22px;
    }

    .waitlist-text {
        font-size: 20px;
    }

    .role-cards-container {
        gap: 28px;
        max-width: 900px;
    }

    .role-card {
        max-width: 260px;
        min-height: 260px;
        padding: 32px 24px;
    }

    .role-card-image {
        width: 110px;
        height: 110px;
    }

    .role-title {
        font-size: 20px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-brand {
        text-align: left;
        flex: 1;
    }

    .footer-links {
        flex-direction: row;
        text-align: left;
        gap: 60px;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 140px 48px;
    }

    .waitlist-title {
        font-size: 68px;
    }

    .waitlist-subtitle {
        font-size: 24px;
    }

    .role-cards-container {
        gap: 32px;
        max-width: 1000px;
    }

    .role-card {
        max-width: 280px;
        min-height: 280px;
        padding: 36px 28px;
    }

    .role-card-image {
        width: 120px;
        height: 120px;
    }

    .role-title {
        font-size: 22px;
    }
}

@media (min-width: 1280px) {
    .waitlist-title {
        font-size: 72px;
    }

    .waitlist-content {
        max-width: 900px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }

    .waitlist-title {
        font-size: 76px;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .role-card {
        border: 2px solid #000000;
        background: #ffffff;
    }

    .role-title {
        color: #000000;
    }

    .role-card:hover {
        background: #f0f0f0;
        border-color: #b147ff;
    }

    .role-card.selected {
        background: #000000;
        color: #ffffff;
    }

    .role-card.selected .role-title {
        color: #ffffff;
    }

    .nav-link:hover,
    .footer-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding: 4px 8px;
        border-radius: 4px;
    }
}

.role-card:focus,
.nav-link:focus,
.cta-button:focus,
.footer-link:focus {
    outline: 2px solid #b147ff;
    outline-offset: 2px;
}

@media print {

    .header,
    .footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .waitlist-title,
    .waitlist-subtitle,
    .highlight-text {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}