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

:root {
    --bg-color: #08080a;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Neon gradients */
    --accent-indigo: #4f46e5;
    --accent-cyan: #00f2fe;
    --accent-violet: #d946ef;
    
    --card-bg: rgba(13, 13, 17, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(0, 242, 254, 0.4);
    
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Fullscreen Canvas Background */
#latent-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Allows clicks to pass through to elements */
}

/* Glowing Ambient Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    animation: float 25s infinite alternate ease-in-out;
}

.glow-orb-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
    top: -10vw;
    left: -10vw;
}

.glow-orb-2 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
    bottom: -10vw;
    right: -10vw;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5%, 10%) scale(1.1);
    }
    100% {
        transform: translate(-5%, -5%) scale(0.95);
    }
}

/* Landing Container Layout */
.landing-container {
    width: 100%;
    max-width: 560px;
    padding: 24px;
    z-index: 10;
    display: flex;
    justify-content: center;
}

/* Glassmorphic Card */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.05),
        0 0 80px rgba(79, 70, 229, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.01) 30%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0.01) 70%,
        transparent
    );
    transform: rotate(30deg);
    pointer-events: none;
    animation: shine 12s infinite linear;
}

@keyframes shine {
    0% { transform: translate(-30%, -30%) rotate(30deg); }
    100% { transform: translate(30%, 30%) rotate(30deg); }
}

/* Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.hero-logo-container picture {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-logo {
    width: 100%; /* Mobile default: 100% width */
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    animation: logo-pulsate 5s infinite ease-in-out;
}

@media (min-width: 480px) {
    .hero-logo {
        width: 66%; /* Desktop layout */
        max-width: 320px; /* Limit desktop scale */
    }
}

@keyframes logo-pulsate {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.25));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 24px rgba(79, 70, 229, 0.45));
    }
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.tenant-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 100px;
    display: flex;
    gap: 4px;
    cursor: help;
    transition: all 0.3s ease;
}

.tenant-badge:hover {
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.05);
}

.badge-label {
    color: var(--text-muted);
}

.badge-value {
    color: var(--text-secondary);
}

/* Card Content / Typography */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.headline {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 70%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Waitlist Form styling */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.waitlist-form input[type="email"] {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 16px 20px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    user-select: text; /* Allows user selection and typing */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.waitlist-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.waitlist-form input[type="email"]:focus {
    border-color: rgba(0, 242, 254, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 0 20px rgba(0, 242, 254, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.02);
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.waitlist-form input[type="email"]:focus + .input-glow {
    opacity: 1;
}

.btn-submit {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
    background: #f9fafb;
}

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

.btn-text {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #000000;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

/* Loading State Active */
.btn-submit.loading {
    background: #ffffff;
    pointer-events: none;
}

.btn-submit.loading .btn-text {
    transform: translateY(-30px);
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    opacity: 1;
    transform: scale(1);
    animation: spin 0.8s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success State styles */
.success-state {
    display: none; /* Toggled by JS */
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 12px 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

.success-icon svg {
    width: 24px;
    height: 24px;
}

.success-info h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.success-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#registered-email {
    color: var(--text-primary);
    font-weight: 500;
}

.token-display {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.token-label {
    color: var(--text-muted);
}

.token-hash {
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

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

/* Card Footer */
.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: auto;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-secondary);
}

.separator {
    color: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}

/* Floating Brand Notes trigger and panel */
.notes-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notes-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: rotate(15deg);
}

.notes-trigger svg {
    width: 20px;
    height: 20px;
}

.brand-notes-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 320px;
    background: rgba(13, 13, 17, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-notes-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.panel-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 350px;
    overflow-y: auto;
}

.note-section h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-section p, .note-section li {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.note-section ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-card {
        padding: 24px;
        gap: 24px;
    }
    
    .headline {
        font-size: 2.2rem;
    }
    
    .brand-notes-panel {
        width: calc(100vw - 48px);
        right: 24px;
    }
}
