/* ===========================
   Design System Variables
   =========================== */
:root {
    --color-primary: #1A1A1A;
    --color-accent: #C9A961;
    --color-background: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-text-primary: #2D2D2D;
    --color-text-secondary: #6B7280;
    --color-border: #E5E7EB;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===========================
   Video Background
   =========================== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Show desktop video by default, hide mobile */
.video-desktop {
    display: block;
}

.video-mobile {
    display: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.85) 0%,
        rgba(26, 26, 26, 0.75) 50%,
        rgba(26, 26, 26, 0.85) 100%
    );
    backdrop-filter: blur(1px);
}

/* ===========================
   Layout
   =========================== */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 640px;
    width: 100%;
}

/* ===========================
   Typography
   =========================== */
.logo-mark h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4.5rem, 13vw, 8rem);
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-2xl);
    background: linear-gradient(
        145deg,
        #FFFFFF 0%,
        #F8F8F8 25%,
        #E8D9C0 60%,
        #D4B98A 80%,
        #C9A961 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4))
            drop-shadow(0 0 40px rgba(201, 169, 97, 0.3))
            drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo-mark h1::before {
    content: 'GetAlc';
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(
        145deg,
        rgba(201, 169, 97, 0.6) 0%,
        rgba(201, 169, 97, 0.3) 50%,
        rgba(201, 169, 97, 0.1) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px);
}

.tagline {
    margin-bottom: var(--space-2xl);
}

.tagline p {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: rgba(250, 250, 250, 0.9);
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ===========================
   Status Badge
   =========================== */
.status {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.badge {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(250, 250, 250, 0.8);
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.separator {
    color: rgba(250, 250, 250, 0.5);
    font-size: 0.875rem;
}

/* ===========================
   CTA Button
   =========================== */
.cta {
    margin-bottom: var(--space-2xl);
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background-color: var(--color-surface);
    color: var(--color-primary);
    border: 2px solid var(--color-surface);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-height: 56px;
}

.primary-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201, 169, 97, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: var(--space-xl) 0;
}

.footer p {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===========================
   Modal
   =========================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    animation: fadeIn var(--transition-base);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-base);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 10;
}

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

.modal-content {
    padding: var(--space-2xl) var(--space-2xl);
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

/* ===========================
   Form Steps
   =========================== */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* ===========================
   Form
   =========================== */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-grid.grid-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

.form-field {
    position: relative;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
    transition: all var(--transition-fast);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.form-field input::placeholder {
    color: transparent;
}

.form-field label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--color-text-secondary);
    pointer-events: none;
    transition: all var(--transition-fast);
    background-color: var(--color-surface);
    padding: 0 6px;
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field select:focus + label,
.form-field select:valid + label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 500;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-field select:invalid {
    color: var(--color-text-secondary);
}

.form-field textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
    transition: all var(--transition-fast);
    resize: vertical;
    min-height: 120px;
}

.form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.form-field textarea::placeholder {
    color: transparent;
}

.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* ===========================
   Role Selection Cards
   =========================== */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.role-card {
    background-color: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    font-family: inherit;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.role-card:hover {
    border-color: var(--color-accent);
    background-color: rgba(201, 169, 97, 0.05);
}

.role-card:active {
    transform: scale(0.98);
}

.role-card.full-width {
    grid-column: 1 / -1;
}

.role-icon {
    display: none;
}

.role-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.role-card p {
    display: none;
}

/* ===========================
   Form Error
   =========================== */
.form-error {
    padding: var(--space-md);
    background-color: #FEE2E2;
    color: #991B1B;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-top: var(--space-md);
}

/* ===========================
   Form Actions
   =========================== */
.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.btn-back {
    padding: 16px 24px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-width: 120px;
}

.btn-back:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: rgba(26, 26, 26, 0.03);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-back:active {
    transform: translateY(0);
}

.btn-back:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.form-actions .submit-btn {
    flex: 1;
}

/* ===========================
   Submit Button
   =========================== */
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background-color: var(--color-primary);
    color: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    background-color: #0D0D0D;
    border-color: #0D0D0D;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.submit-btn.is-loading {
    pointer-events: none;
}

.submit-btn.is-loading .btn-text {
    opacity: 0;
}

.submit-btn.is-loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===========================
   Success State
   =========================== */
.success-state {
    display: none;
    text-align: center;
    padding: var(--space-2xl) 0;
}

.success-state.is-visible {
    display: block;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-xl);
    color: var(--color-accent);
}

.success-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.success-state p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.success-state p:last-child {
    margin-bottom: 0;
}

.success-detail {
    font-size: 0.875rem !important;
    color: var(--color-text-secondary);
    opacity: 0.8;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* ===========================
   Mobile Video Optimization
   =========================== */
@media (max-width: 768px) {
    /* Hide desktop video, show mobile vertical video */
    .video-desktop {
        display: none;
    }

    .video-mobile {
        display: block;
    }

    .video-overlay {
        /* Darker overlay on mobile for better text readability */
        background: linear-gradient(
            135deg,
            rgba(26, 26, 26, 0.9) 0%,
            rgba(26, 26, 26, 0.85) 50%,
            rgba(26, 26, 26, 0.9) 100%
        );
    }
}

/* Disable video on very slow connections */
@media (prefers-reduced-data: reduce) {
    .video-background video {
        display: none;
    }

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

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 640px) {
    .page-wrapper {
        padding: var(--space-lg);
    }

    .logo-mark h1 {
        margin-bottom: var(--space-xl);
        font-size: clamp(3rem, 10vw, 5rem);
    }

    .tagline {
        margin-bottom: var(--space-xl);
    }

    .status {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .separator {
        display: none;
    }

    .form-grid,
    .form-grid.grid-3 {
        grid-template-columns: 1fr;
    }

    .role-selection {
        grid-template-columns: 1fr;
    }

    .role-card.full-width {
        grid-column: 1;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-back {
        order: 2;
    }

    .form-actions .submit-btn {
        order: 1;
    }

    .modal-content {
        padding: var(--space-2xl) var(--space-lg);
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

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

*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .modal,
    .cta {
        display: none;
    }
}
