/* ============================================================
   NYAYSE PRIVATE BETA - Using Official Design System
   Based on: client/src/index.css
   ============================================================ */

:root {
    /* Primary (ink) - legal, professional */
    --primary-50: #f0f4f8;
    --primary-100: #d9e2ec;
    --primary-200: #bcccdc;
    --primary-300: #9fb3c8;
    --primary-400: #829ab1;
    --primary-500: #627d98;
    --primary-600: #486581;
    --primary-700: #334e68;
    --primary-800: #243b53;
    --primary-900: #102a43;
    --primary-950: #0f172a;

    /* Accent (emerald) - trust, documentation */
    --accent-50: #ecfdf5;
    --accent-100: #d1fae5;
    --accent-200: #a7f3d0;
    --accent-300: #6ee7b7;
    --accent-400: #34d399;
    --accent-500: #10b981;
    --accent-600: #047857;
    --accent-700: #065f46;
    --accent-800: #064e3b;
    --accent-900: #022c22;

    /* Neutral (stone) - backgrounds */
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;

    /* Text Colors - WCAG AA Compliant */
    --text-primary: #1d1d1f;
    --text-secondary: #4a4a4d;
    --text-tertiary: #6b6b70;
    --text-inverse: #ffffff;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-default: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.06), 0 6px 12px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--neutral-50);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography - Using Nyayse Design System */
.heading-primary {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-align: center;
}

.heading-secondary {
    font-family: 'DM Sans', sans-serif;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--text-primary);
}

.heading-tertiary {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text-primary);
}

.text-body-large {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
}

.text-body {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.text-caption {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-tertiary);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
    position: relative;
    background: var(--neutral-50);
}

.hero-container {
    max-width: 640px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.logo-wrapper {
    margin-bottom: var(--space-8);
    animation: fadeIn 0.6s ease-out;
}

.logo {
    width: 240px;
    height: 240px;
    object-fit: contain;
}

.coming-soon {
    color: var(--accent-600);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-8);
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

.heading-primary {
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.text-body-large {
    max-width: 520px;
    margin: 0 auto var(--space-10);
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

.cta-button {
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

/* Animated Tags Background */
.tags-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.dispute-tag {
    position: absolute;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    animation: appearFade 10s ease-in-out infinite;
    will-change: opacity, transform;
}

/* Category Colors */
.dispute-tag.category-employment {
    background: var(--accent-50);
    color: var(--accent-600);
    border: 1px solid var(--accent-200);
}

.dispute-tag.category-property {
    background: var(--primary-50);
    color: var(--primary-600);
    border: 1px solid var(--primary-200);
}

.dispute-tag.category-business {
    background: var(--neutral-100);
    color: var(--neutral-600);
    border: 1px solid var(--neutral-200);
}

/* Random positioning for each tag */
.dispute-tag:nth-child(1) { top: 8%; left: 3%; animation-delay: 0s; }
.dispute-tag:nth-child(2) { top: 15%; right: 5%; animation-delay: 0.5s; }
.dispute-tag:nth-child(3) { top: 22%; left: 8%; animation-delay: 1s; }
.dispute-tag:nth-child(4) { top: 28%; right: 10%; animation-delay: 1.5s; }
.dispute-tag:nth-child(5) { top: 35%; left: 4%; animation-delay: 2s; }
.dispute-tag:nth-child(6) { top: 40%; right: 6%; animation-delay: 2.5s; }
.dispute-tag:nth-child(7) { top: 46%; left: 12%; animation-delay: 3s; }
.dispute-tag:nth-child(8) { top: 52%; right: 8%; animation-delay: 3.5s; }
.dispute-tag:nth-child(9) { top: 58%; left: 2%; animation-delay: 4s; }
.dispute-tag:nth-child(10) { top: 64%; right: 4%; animation-delay: 4.5s; }
.dispute-tag:nth-child(11) { top: 70%; left: 10%; animation-delay: 5s; }
.dispute-tag:nth-child(12) { top: 76%; right: 12%; animation-delay: 5.5s; }
.dispute-tag:nth-child(13) { top: 12%; left: 15%; animation-delay: 0.3s; }
.dispute-tag:nth-child(14) { top: 25%; right: 15%; animation-delay: 0.8s; }
.dispute-tag:nth-child(15) { top: 38%; left: 18%; animation-delay: 1.3s; }
.dispute-tag:nth-child(16) { top: 48%; right: 18%; animation-delay: 1.8s; }
.dispute-tag:nth-child(17) { top: 62%; left: 16%; animation-delay: 2.3s; }
.dispute-tag:nth-child(18) { top: 72%; right: 16%; animation-delay: 2.8s; }
.dispute-tag:nth-child(19) { top: 82%; left: 20%; animation-delay: 3.3s; }
.dispute-tag:nth-child(20) { top: 18%; left: 22%; animation-delay: 0.6s; }
.dispute-tag:nth-child(21) { top: 32%; right: 22%; animation-delay: 1.1s; }
.dispute-tag:nth-child(22) { top: 44%; left: 24%; animation-delay: 1.6s; }
.dispute-tag:nth-child(23) { top: 56%; right: 24%; animation-delay: 2.1s; }
.dispute-tag:nth-child(24) { top: 68%; left: 26%; animation-delay: 2.6s; }
.dispute-tag:nth-child(25) { top: 80%; right: 26%; animation-delay: 3.1s; }
.dispute-tag:nth-child(26) { top: 10%; right: 28%; animation-delay: 0.4s; }
.dispute-tag:nth-child(27) { top: 30%; left: 30%; animation-delay: 0.9s; }
.dispute-tag:nth-child(28) { top: 50%; right: 30%; animation-delay: 1.4s; }
.dispute-tag:nth-child(29) { top: 65%; left: 28%; animation-delay: 1.9s; }
.dispute-tag:nth-child(30) { top: 78%; right: 28%; animation-delay: 2.4s; }
.dispute-tag:nth-child(31) { top: 20%; left: 6%; animation-delay: 0.7s; }
.dispute-tag:nth-child(32) { top: 36%; right: 7%; animation-delay: 1.2s; }
.dispute-tag:nth-child(33) { top: 54%; left: 9%; animation-delay: 1.7s; }
.dispute-tag:nth-child(34) { top: 66%; right: 9%; animation-delay: 2.2s; }
.dispute-tag:nth-child(35) { top: 74%; left: 14%; animation-delay: 2.7s; }
.dispute-tag:nth-child(36) { top: 85%; right: 14%; animation-delay: 3.2s; }
.dispute-tag:nth-child(37) { top: 42%; left: 32%; animation-delay: 3.7s; }
.dispute-tag:nth-child(38) { top: 60%; right: 32%; animation-delay: 4.2s; }

/* Waitlist Section */
.waitlist-section {
    padding: var(--space-16) var(--space-4);
    background: var(--neutral-100);
    position: relative;
    z-index: 2;
}

.waitlist-container {
    max-width: 580px;
    margin: 0 auto;
}

/* Nyayse Card Component */
.ny-card {
    background: var(--background);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

.form-card {
    padding: var(--space-12);
}

.form-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.form-header .heading-secondary {
    margin-bottom: var(--space-3);
}

.form-header .text-body {
    margin: 0;
}

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

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Nyayse Input Component */
.input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.input::placeholder {
    color: var(--text-tertiary);
}

.input:hover {
    border-color: var(--border-strong);
}

.input:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--accent-100);
}

.input.textarea {
    min-height: 120px;
    resize: vertical;
}

.input.select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%234a4a4d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-10);
    appearance: none;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: var(--space-6);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-600);
    cursor: pointer;
}

/* Nyayse Button Component */
.ny-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.4;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    background: var(--accent-600);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.ny-button-primary:hover {
    background: var(--accent-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.ny-button-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-100);
}

.submit-button {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    margin-top: var(--space-2);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.form-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--space-3);
    margin-bottom: 0;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    animation: scaleIn 0.4s ease-out;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-6);
    animation: scaleIn 0.4s ease-out 0.1s both;
}

.success-message .heading-tertiary {
    margin-bottom: var(--space-3);
}

.success-message .text-body {
    margin: 0;
}

/* Ticker */
.ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-950);
    color: var(--text-inverse);
    padding: var(--space-3) var(--space-4);
    text-align: center;
    font-size: 13px;
    z-index: 100;
}

.ticker-number {
    font-weight: 600;
    color: var(--accent-400);
}

.ticker-text {
    color: var(--neutral-400);
}

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

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

@keyframes appearFade {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    10% {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    20% {
        opacity: 0.5;
        transform: scale(1) translateY(0);
    }
    35% {
        opacity: 0.4;
        transform: scale(1) translateY(-8px);
    }
    50% {
        opacity: 0.5;
        transform: scale(1) translateY(-12px);
    }
    65% {
        opacity: 0.4;
        transform: scale(1) translateY(-8px);
    }
    80% {
        opacity: 0.3;
        transform: scale(0.95) translateY(-4px);
    }
    95% {
        opacity: 0.1;
        transform: scale(0.9) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.85) translateY(5px);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    .dispute-tag {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: var(--space-6) var(--space-4);
    }

    .logo {
        width: 140px;
        height: 140px;
    }

    .heading-primary {
        font-size: 32px;
    }

    .text-body-large {
        font-size: 16px;
    }

    .form-card {
        padding: var(--space-8) var(--space-6);
    }

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

    .radio-group {
        flex-direction: column;
        gap: var(--space-2);
    }

        /* Show 19 tags on mobile (half of 38) */
    .dispute-tag:nth-child(n+20) {
        display: none;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: var(--space-6) var(--space-4);
        border-radius: var(--radius-md);
    }

    .ny-button-primary {
        width: 100%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}
