/**
 * Auth Pages - Mobile-First Responsive Styles
 * Optimized for signin.html and signup.html
 */

/* ========== BASE / MOBILE STYLES (320px+) ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'CartographMono', 'Courier New', monospace;
    background: #000;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

/* Split Screen - Stack on mobile */
.split-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: #000;
    padding: 1.5rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

/* Background Image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://www.themxm.ai/assets/images/artificial-ingenious/backgrounds/landscape/BG8.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
}

/* Dark overlay */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(0,0,0,0.8) 0%,
        rgba(220, 20, 60, 0.1) 50%,
        rgba(0,0,0,0.85) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-logo {
    font-family: 'UniformExtraCondensed', sans-serif;
    font-size: 1.75rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #DC143C;
    margin-bottom: 0.75rem;
    animation: glow-pulse 3s ease-in-out infinite;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hero-logo:hover {
    opacity: 0.8;
}

@keyframes glow-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(220, 20, 60, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(220, 20, 60, 0.6));
    }
}

.hero-tagline {
    font-family: 'UniformExtraCondensed', sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: #FFFFFF;
}

.hero-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 1rem;
    max-width: 100%;
}

.hero-credit {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.hero-credit strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
}

.hero-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* Features Grid - Hidden on mobile */
.features-grid {
    display: none;
}

/* Trust Badges */
.trust-badges {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0.5;
    margin-top: 1rem;
}

.trust-badge {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: normal;
}

/* ========== AUTH SECTION ========== */
.auth-section {
    background: #000;
    padding: 1.5rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-switch {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-switch a {
    color: #DC143C;
    text-decoration: none;
    font-weight: normal;
    margin-left: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.2s ease;
}

.auth-switch a:hover {
    color: #FF5733;
    gap: 0.4rem;
}

.auth-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.auth-title {
    font-family: 'UniformExtraCondensed', sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

/* Clerk Container */
.clerk-container {
    margin-bottom: 1rem;
    padding: 0;
    overflow: visible;
}

/* Copyright */
.copyright-notice {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* Loading State */
.loading-message {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(220, 20, 60, 0.2);
    border-top-color: #DC143C;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== SMALL MOBILE (375px+) ========== */
@media (min-width: 375px) {
    .hero-section {
        padding: 1.75rem 1.5rem 2rem;
    }

    .auth-section {
        padding: 1.75rem 1.5rem 2rem;
    }

    .hero-logo {
        font-size: 1.85rem;
    }

    .hero-tagline {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .auth-switch {
        font-size: 0.95rem;
    }

    .trust-badges {
        gap: 1.25rem;
    }

    .trust-badge {
        font-size: 0.8rem;
    }
}

/* ========== MEDIUM MOBILE (425px+) ========== */
@media (min-width: 425px) {
    .hero-logo {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .auth-title {
        font-size: 1.65rem;
    }
}

/* ========== TABLET (640px+) ========== */
@media (min-width: 640px) {
    .hero-section {
        padding: 2.5rem 2rem 3rem;
    }

    .auth-section {
        padding: 2.5rem 2rem 2.5rem;
    }

    .hero-logo {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .hero-tagline {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
        max-width: 520px;
    }

    .hero-credit {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .hero-note {
        font-size: 0.85rem;
        margin-bottom: 2rem;
    }

    .auth-content {
        max-width: 480px;
    }

    .auth-title {
        font-size: 1.85rem;
    }

    .trust-badges {
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .copyright-notice {
        font-size: 0.75rem;
    }
}

/* ========== DESKTOP SMALL (768px+) ========== */
@media (min-width: 768px) {
    .hero-section {
        padding: 3rem 2.5rem;
    }

    .auth-section {
        padding: 2.5rem 2.5rem;
    }

    .hero-logo {
        font-size: 2.4rem;
    }

    .hero-tagline {
        font-size: 2.15rem;
        margin-bottom: 1.25rem;
    }

    .hero-description {
        font-size: 1.08rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    .auth-content {
        max-width: 500px;
        justify-content: center;
    }

    .auth-title {
        font-size: 1.95rem;
    }

    .auth-subtitle {
        font-size: 0.95rem;
    }

    /* Show simplified features on tablet */
    .features-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    .feature-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(220, 20, 60, 0.15);
        border: 1px solid rgba(220, 20, 60, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 1.25rem;
    }

    .feature-content h3 {
        font-size: 0.9rem;
        font-weight: normal;
        color: #FFFFFF;
        margin-bottom: 0.2rem;
    }

    .feature-content p {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.4;
    }

    .trust-badges {
        gap: 1.75rem;
        margin-top: 2rem;
        opacity: 0.6;
    }

    .trust-badge {
        font-size: 0.85rem;
    }
}

/* ========== DESKTOP MEDIUM (1024px+) ========== */
@media (min-width: 1024px) {
    /* Switch to side-by-side layout */
    .split-container {
        flex-direction: row;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-section {
        padding: 4rem 3.5rem;
        min-height: 100vh;
        justify-content: space-between;
    }

    .auth-section {
        padding: 2rem 3rem;
        min-height: 100vh;
    }

    .hero-content {
        justify-content: center;
    }

    .hero-logo {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 2.35rem;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .auth-header {
        text-align: right;
        margin-bottom: 2rem;
    }

    .auth-content {
        max-width: 520px;
    }

    .auth-title {
        font-size: 2rem;
    }

    .features-grid {
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
    }

    .feature-content h3 {
        font-size: 0.95rem;
    }

    .feature-content p {
        font-size: 0.85rem;
    }

    .trust-badges {
        gap: 2rem;
    }
}

/* ========== DESKTOP LARGE (1280px+) ========== */
@media (min-width: 1280px) {
    .hero-section {
        padding: 4rem 5rem;
    }

    .auth-section {
        padding: 2rem 4rem;
    }

    .hero-logo {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 3rem;
        max-width: 540px;
    }

    .features-grid {
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        border-radius: 12px;
    }

    .feature-content h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .feature-content p {
        font-size: 0.9rem;
    }
}

/* ========== DESKTOP XL (1536px+) ========== */
@media (min-width: 1536px) {
    .hero-section {
        padding: 5rem 6rem;
    }

    .auth-section {
        padding: 2.5rem 5rem;
    }

    .hero-tagline {
        font-size: 2.75rem;
    }

    .hero-description {
        font-size: 1.15rem;
        max-width: 560px;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .split-container {
        flex-direction: row;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-section {
        padding: 1.5rem 2rem;
        min-height: 100vh;
    }

    .auth-section {
        padding: 1.5rem 2rem;
        min-height: 100vh;
    }

    .hero-content {
        justify-content: center;
    }

    .hero-logo {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .features-grid {
        display: none;
    }

    .trust-badges {
        margin-top: 0.75rem;
    }

    .auth-content {
        justify-content: center;
    }

    .auth-header {
        margin-bottom: 1rem;
    }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch devices */
    .hero-logo {
        padding: 0.25rem 0;
    }

    .auth-switch a {
        padding: 0.25rem 0.5rem;
        margin: -0.25rem 0;
    }

    /* Prevent double-tap zoom */
    a, button {
        touch-action: manipulation;
    }
}

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

    .hero-logo {
        animation: none;
    }

    .loading-spinner {
        animation: none;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    .hero-section::before {
        opacity: 0.15;
    }

    .hero-section::after {
        background: linear-gradient(135deg,
            rgba(0,0,0,0.9) 0%,
            rgba(220, 20, 60, 0.05) 50%,
            rgba(0,0,0,0.95) 100%
        );
    }

    .hero-description,
    .auth-switch,
    .trust-badge {
        color: rgba(255, 255, 255, 0.9);
    }
}
