/* --- VARIABLES & BASE STYLES --- */
:root {
    --deep-space: #121217;
    --off-white: #F0F0F5;
    --light-gray: #A0A0B0;
    --servespot-green: #ADFF2F;
    --tech-purple: #6F3FF5;
    --success-green: #28a745;
    --error-red: #dc3545;
}

body {
    background-color: var(--deep-space);
    color: var(--off-white);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

section {
    padding: 4rem 1rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-weight: 900;
    margin-top: 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

p {
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
}
.final-cta-section p {
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

/* --- LOGO --- */
.logo {
    margin-bottom: 2rem;
}
.logo-image {
    max-height: 30px;
    width: auto;
    display: block;
}

/* --- BUTTONS & LINKS --- */
.cta-button {
    display: inline-block;
    background-color: var(--tech-purple);
    color: var(--off-white);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease;
}
.cta-button:hover {
    transform: translateY(-3px);
}

.cta-button-secondary {
    display: inline-block;
    background-color: transparent;
    border: 2px solid var(--tech-purple);
    color: var(--tech-purple);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.cta-button-secondary:hover {
    background-color: var(--tech-purple);
    color: var(--off-white);
}

/* --- HERO SECTION (MOBILE FIRST) --- */
.hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 0;
    text-align: center;
    background: #121217; /* Dark background for mobile */
}

.hero-text-container {
    z-index: 2;
    padding: 2rem;
    text-align: center;
}

.hero-image-container {
    display: block;
    width: 100%;
    margin: 0;
}

.hero-image {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    object-position: center left;
    display: block;
}

.logo {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-section h1 {
    font-size: 3rem;
    max-width: 800px;
    margin-bottom: 1rem;
}
.hero-section .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* --- PLAYER ADVANTAGE & PILOT DEMO --- */
.pilot-courts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin: 2.5rem auto;
}
.pilot-court-card {
    background-color: #1A1A1D;
    padding: 1.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    box-sizing: border-box;
}
.pilot-court-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}
.status-indicator {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.status-indicator.available { color: var(--success-green); }
.status-indicator.occupied { color: var(--error-red); }
.timestamp-container {
    display: flex;
    width: 100%;
    margin: 0;
    justify-content: center;
}

.timestamp-label {
    font-size: 0.9rem;
    color: var(--light-gray);
    margin: 0;
    text-align: right;
}

.timestamp-value {
    font-size: 0.9rem;
    color: var(--light-gray);
    margin: 0;
    text-align: left;
}

/* --- LOADING STATES --- */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid var(--tech-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-indicator p {
    color: var(--light-gray);
    margin: 0;
    font-size: 0.9rem;
}

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

/* Hide content when loading */
.pilot-court-card.loading .court-title,
.pilot-court-card.loading .status-indicator,
.pilot-court-card.loading .timestamp {
    display: none;
}

.pilot-court-card.loading .loading-indicator {
    display: flex;
}

/* Hide loading when content is loaded */
.pilot-court-card:not(.loading) .loading-indicator {
    display: none;
}

/* --- REFRESHING STATES --- */
.refreshing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--light-gray);
    opacity: 0.8;
}

.refreshing-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top: 2px solid var(--tech-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Show refreshing indicator when refreshing */
.pilot-court-card.refreshing .refreshing-indicator {
    display: flex;
}

/* Hide refreshing indicator when not refreshing */
.pilot-court-card:not(.refreshing) .refreshing-indicator {
    display: none;
}

/* --- HOW IT WORKS SECTION --- */
.features-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
    align-items: center;
}
.feature-card .icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-card {
    background-color: #1A1A1D;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.feature-card .icon svg {
    width: 48px;
    height: 48px;
    color: var(--tech-purple);
}
.feature-card h3 {
    color: var(--servespot-green);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.feature-card p {
    flex: 1;
    margin: 0;
    text-align: center;
    line-height: 1.6;
    display: block;
}

/* --- ECOSYSTEM SECTION --- */
.ecosystem-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
    align-items: center;
}
.ecosystem-card {
    background-color: #1A1A1D;
    padding: 2rem;
    border-radius: 12px;
    text-align: left;
    width: 90%;
    max-width: 350px;
    box-sizing: border-box;
    position: relative;
}
.ecosystem-card h3 {
    color: var(--light-gray);
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.ecosystem-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    white-space: nowrap;
}
.ecosystem-card p {
    margin: 1rem 0;
}
.ecosystem-card .cta-link {
    color: var(--tech-purple);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-top: 1rem;
}


/* --- ROADMAP SECTION (MOBILE) --- */
.roadmap-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  margin-top: 3rem;
}
.roadmap-phase {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  width: 90%;
  max-width: 350px;
  text-align: center;
  box-sizing: border-box;
}

.phase-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.phase-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--off-white);
}
.in-progress { background-color: var(--tech-purple); }
.next-up { background-color: var(--servespot-green); color: var(--deep-space); }
.future { background-color: #444; }
.roadmap-phase h3 { 
    font-size: 1.2rem; 
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}
.roadmap-phase h4 { 
    font-size: 1rem; 
    color: var(--light-gray);
    margin-bottom: 0.75rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

/* --- FINAL CTA SECTION --- */
.final-cta-section {
    background-color: #1A1A1D;
}
.lead-form {
    max-width: 350px;
    margin: 2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 90%;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: var(--deep-space);
    color: var(--off-white);
    font-size: 1rem;
    box-sizing: border-box;
}

/* Ensure consistent styling - match dropdown to email input */
.form-group select {
    background-color: var(--deep-space) !important;
    color: var(--off-white) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Style dropdown options to match email input */
.form-group select option {
    background-color: var(--deep-space) !important;
    color: var(--off-white) !important;
}

/* Style selected/highlighted dropdown options */
.form-group select option:checked,
.form-group select option:hover {
    background-color: var(--deep-space) !important;
    color: var(--off-white) !important;
}

/* When form fields have values, make them match the browser's default populated input color */
.form-group input.populated,
.form-group select.populated {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Override any browser-specific styling for populated inputs */
.form-group input[type="text"].populated {
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select.populated {
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.lead-form .cta-button {
    border: none;
}
.form-group select {
    appearance: none;
}

/* --- FORM IMPROVEMENTS --- */
.form-group {
    text-align: left; /* Align labels to the left */
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #f5f5f5;
}

/* Wrapper to help position the dropdown arrow */
.select-wrapper {
    position: relative;
}

/* The little dropdown arrow */
.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    color: #666;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Allows clicks to go through to the select box */
}

/* Error message styling (initially empty) */
.error-message {
    color: var(--error-red);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    min-height: 1em; /* Prevents layout shift */
}

/* Success message styling */
#success-message h3 {
    color: var(--success-green);
    padding: 2rem;
    border: 1px solid var(--success-green);
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
}

/* Trust-building microcopy */
.microcopy {
    font-size: 0.8rem;
    margin-top: 1rem;
    color: var(--light-gray);
}

/* --- FORM MESSAGES --- */
.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.form-message-success {
    background-color: var(--success-green);
    color: white;
}

.form-message-error {
    background-color: var(--error-red);
    color: white;
}

.form-message-info {
    background-color: #6B7280;
    color: white;
}

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

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* --- MOBILE STYLES (max-width: 767px) --- */
@media (max-width: 767px) {
    .phase-status {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* --- TABLET PORTRAIT STYLES (min-width: 768px) --- */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        min-height: 100vh;
    }
    .hero-text-container {
        margin-bottom: 2rem;
        padding: 2rem;
    }
    .hero-image-container {
        width: 100%;
        max-width: none;
    }
    .hero-image {
        width: 100%;
        height: 70vh;
        object-fit: cover;
        object-position: center left;
    }
    
    /* --- ROADMAP (TABLET) --- */
    .roadmap-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch; /* Stretch cards to same height */
        gap: 1.5rem;
    }
    
    .roadmap-phase {
        width: 32%;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        min-height: 650px; /* Increased minimum height to accommodate longer content */
    }
    
    .phase-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        flex: 1;
    }
    
    .roadmap-phase h3 {
        font-size: 1.1rem;
        margin: 0;
        line-height: 1.2;
        min-height: 2.4rem; /* Fixed height for title area */
    }
    
    .roadmap-phase h4 {
        font-size: 0.9rem;
        margin: 0;
        line-height: 1.2;
        min-height: 2.4rem; /* Fixed height for subtitle area */
    }
    
    .roadmap-phase p {
        margin: 0;
        flex: 1;
    }
    
    .roadmap-phase {
        text-align: left; /* Left-align text on tablet like desktop */
    }
    
    /* --- PILOT DEMO (TABLET) --- */
    .pilot-courts-container {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .pilot-court-card {
        width: 45%;
        max-width: 300px;
    }
    
    /* --- FEATURES GRID (TABLET) --- */
    .features-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
        max-width: 800px;
        margin: 0 auto;
        align-items: stretch;
    }
    
    .feature-card {
        width: 100% !important;
        max-width: none !important;
        display: flex;
        flex-direction: column;
        min-height: 400px;
        text-align: center;
        padding: 2rem;
    }
    
    .feature-card .icon {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    
    .feature-card h3 {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    
    .feature-card p {
        flex: 1;
        margin: 0;
        text-align: center;
        line-height: 1.6;
        display: block;
    }
    
    /* --- ECOSYSTEM GRID (TABLET) --- */
    .ecosystem-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .ecosystem-card {
        width: 100%;
        max-width: none;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        min-height: 400px;
    }
    
    .ecosystem-card h3 {
        margin-bottom: 0.5rem;
        flex-shrink: 0;
    }
    
    .ecosystem-card h4 {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    
    .ecosystem-card p {
        margin: 0;
        flex: 1;
    }
    
    .ecosystem-card .cta-link {
        display: inline-block;
        margin-top: 1rem;
        flex-shrink: 0;
    }
    
    /* --- FINAL CTA (TABLET) --- */
    .lead-form {
        max-width: 500px;
        width: 100%;
    }
}

/* --- DESKTOP & TABLET LANDSCAPE STYLES (min-width: 992px) --- */
@media (min-width: 992px) {
    section {
        padding: 6rem 2rem;
    }
    h2 {
        font-size: 3rem;
    }

    /* --- HERO (DESKTOP) --- */
    .hero-section {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Equal split for better balance */
        align-items: center;
        text-align: left;
        background-image: url('hero-image.png'); /* Background image for desktop */
        background-size: cover;
        background-position: 40% 50%; /* Shift image left to move phone further into left column */
        min-height: 90vh;
        padding: 2rem;
    }
    .hero-image-container {
        display: none; /* Hide image container on desktop - use background instead */
    }
    .hero-text-container {
        grid-column: 2 / 3; /* Place text in the right column */
        z-index: 2;
        text-align: left;
        padding: 4rem 4rem 4rem 6rem; /* Extra left padding to push text further right */
        /* Much lighter gradient since text sits on cleaner background */
        background: linear-gradient(to left, rgba(18, 18, 23, 0.3) 0%, rgba(18, 18, 23, 0) 100%);
    }
    .logo {
        text-align: left;
        margin: 0 0 2rem 0;
        justify-content: flex-start;
    }
    .hero-section h1 {
        font-size: 4rem;
        text-align: left;
    }
    .hero-section .subtitle {
        text-align: left !important;
        margin-left: 0;
        margin-right: auto;
    }
    
    /* Larger CTA buttons for desktop */
    .cta-button {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .cta-button-secondary {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
    .logo-image {
        max-height: 40px;
    }

    /* --- OTHER GRIDS (DESKTOP) --- */
    .pilot-courts-container {
        flex-direction: row;
        justify-content: center;
    }
    .features-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .ecosystem-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .feature-card {
        width: 100%;
        max-width: none;
        display: flex;
        flex-direction: column;
        min-height: 400px;
        text-align: center;
        padding: 2rem;
    }
    
    .feature-card .icon {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    
    .feature-card h3 {
        margin-bottom: 1rem;
        flex-shrink: 0;
    }
    
    .feature-card p {
        flex: 1;
        margin: 0;
        text-align: center;
        line-height: 1.6;
        display: block;
    }
    
    .ecosystem-card {
        width: 100%;
        max-width: none;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        min-height: 400px;
    }
    
    .ecosystem-card h3 {
        margin: 0 0 0.5rem 0;
    }
    
    .ecosystem-card h4 {
        margin: 0 0 1rem 0;
        line-height: 1.2;
        min-height: 2.4rem;
    }
    
    .ecosystem-card p {
        margin: 0;
        flex: 1;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
    }
    
    .ecosystem-card .cta-link {
        display: inline-block;
        margin-top: 1rem;
    }

    /* --- ROADMAP (DESKTOP) --- */
    .roadmap-container {
        flex-direction: row;
        position: relative;
        padding-top: 2rem;
        justify-content: space-between;
        align-items: flex-start;
    }

    .roadmap-phase {
        width: 30%;
        position: relative;
        text-align: center;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        min-height: 450px;
    }
    
    .phase-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        flex: 1;
    }
    
    .roadmap-phase h3 {
        font-size: 1.2rem;
        margin: 0;
        line-height: 1.2;
        min-height: 2.4rem;
        text-align: center;
    }
    
    .roadmap-phase h4 {
        font-size: 1rem;
        color: var(--light-gray);
        margin: 0;
        line-height: 1.2;
        min-height: 2.4rem;
        text-align: center;
    }
    
    .roadmap-phase p {
    margin: 0;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    text-align: center;
    flex: 1;
}

} 