/* ===========================
    TickStock.ai - Main Stylesheet
    =========================== */

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

/* CSS Variables / Design Tokens */
:root {
    /* Primary Colors */
    --primary: #aabbcc;
    /* Soft blue-gray */
    --primary-dark: #8899aa;
    /* Darker variant */
    --primary-light: #ccddee;
    /* Lighter variant */
    --secondary: #88aacc;
    /* Complementary blue */
    --accent: #ccaa88;
    /* Warm accent color */

    /* Neutral Colors */
    --dark: #1a1f2e;
    /* Dark background */
    --light: #ffffff;
    /* White */
    --gray: #8892b0;
    /* Gray text */

    /* Status Colors */
    --success: #88cc88;
    /* Success green */
    --danger: #cc8888;
    /* Danger red */
    --warning: #ccaa88;
    /* Warning orange */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', monospace;

    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Body and Main Layout */
body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #1a1f2e 0%, #2a3344 100%);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 20% 50%, var(--primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--secondary) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, var(--primary-dark) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite;
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(170, 187, 204, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(170, 187, 204, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    animation: gridMove 10s linear infinite;
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Logo and Branding */
.logo-container {
    margin-bottom: var(--spacing-lg);
    animation: fadeInDown 1s ease-out;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 10px 30px rgba(170, 187, 204, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667EEA, #64B6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.tagline {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Hero Content */
.hero-content {
    animation: fadeInUp 1s ease-out 0.4s both;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--light), var(--gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.6;
}

/* Features Grid */
.features-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    width: 100%;
    max-width: 800px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(170, 187, 204, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Email Signup Form */
.signup-container {
    margin-top: var(--spacing-xl);
    animation: fadeInUp 1s ease-out 0.8s both;
}

.signup-section {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.signup-intro {
    margin-bottom: var(--spacing-md);
    color: var(--gray);
    font-size: 1.1rem;
}

#subscription-form-container {
    background: transparent;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

#subscription-signup {
    background: rgba(255, 255, 255, 0.05); /* Match feature-card background */
    backdrop-filter: blur(10px); /* Match feature-card blur */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Match feature-card border */
    border-radius: 12px; /* Match feature-card radius */
    padding: 1.5rem; /* Match feature-card padding */
    transition: var(--transition-normal);
    box-shadow: 0 10px 30px rgba(170, 187, 204, 0.3); /* Match feature-card hover shadow */
    color: var(--light);
}

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

.form-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.label-left {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
}

.form-field-group input {
    padding: 0.75rem 1.5rem; /* Increased padding for wider appearance */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--light);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    width: 50%; /* Reduced width to shrink text box length */
}

.form-field-group input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-field-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.validation-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
    color: var(--primary-light);
}

.form-submit {
    margin-top: 1rem;
}

.submit-button {
    background: linear-gradient(135deg, #667EEA, #64B6FF);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
    letter-spacing: 0.02em;
    text-transform: none;
    font-family: var(--font-primary);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, #7788ff, #75c5ff);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.submit-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading state for button */
.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.form-responses {
    margin-top: 0.75rem;
}

.response {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0;
    display: none;
    font-size: 0.875rem;
    text-align: center;
    animation: slideInUp 0.3s ease-out;
}

#success-response {
    background: linear-gradient(135deg, rgba(136, 204, 136, 0.08), rgba(136, 204, 136, 0.05));
    color: #88dd88;
    border: 1px solid rgba(136, 204, 136, 0.2);
}

/* Status Badges */
.status-container {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1s both;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.status-dot.active {
    background: var(--success);
}

.status-dot.building {
    background: var(--secondary);
}

/* Footer */
.footer {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
    animation: fadeIn 1s ease-out 1.2s both;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--secondary);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(170, 187, 204, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(170, 187, 204, 0.5);
    }
}

@keyframes bgShift {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-20px, -20px) rotate(120deg);
    }
    66% {
        transform: translate(20px, -10px) rotate(240deg);
    }
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

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

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

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

/* Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .brand-name {
        font-size: 2rem;
    }
    .description {
        font-size: 1.1rem;
    }
    .features-preview {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    .container {
        padding: var(--spacing-md);
    }
    #subscription-signup {
        padding: 1.5rem;
    }
    .form-header h2 {
        font-size: 1.5rem;
    }
    .form-field-group input {
        width: 60%; /* Adjusted for smaller screens */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    .brand-name {
        font-size: 1.75rem;
    }
    .tagline {
        font-size: 1rem;
    }
    .description {
        font-size: 1rem;
    }
    #subscription-signup {
        padding: 1.25rem;
    }
    .form-header h2 {
        font-size: 1.25rem;
    }
    .form-field-group input {
        width: 100%; /* Full width on very small screens */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #subscription-signup {
        border-width: 2px;
    }
    .form-field-group input {
        border-width: 2px;
    }
}

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