/* Core Variables & Base Styles */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    --color-bg: hsl(222.2, 84%, 4.9%); /* Almost black */
    --color-text-primary: hsl(210, 40%, 98%); /* Almost white */
    --color-text-muted: hsl(240, 5.3%, 83.9%); /* Lighter gray */
    --color-text-dark: #000000;

    --color-neongreen-primary: #00FF99;
    --color-neongreen-accent: #42ff90;
    --color-neonblue: #01e0fc;

    --border-radius-sm: 0.375rem; /* 6px */
    --border-radius-md: 0.5rem;   /* 8px */
    --border-radius-lg: 0.75rem;  /* 12px */
    --border-radius-xl: 1rem;     /* 16px */
    --border-radius-xxl: 1.25rem; /* 20px */
    --border-radius-full: 9999px;

    --rgb-neonblue: 1, 224, 252;
    --rgb-neongreen-accent: 66, 255, 144;
    --rgb-neongreen-primary: 0, 255, 153;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Matrix Rain Canvas Style */
#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

/* General utility for simple fade-in */
.fade-in {
    animation: fadeInAnimation 0.7s ease-out forwards;
    opacity: 0;
}
@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleInAnimation {
    from { transform: scale(0.9); }
    to   { transform: scale(1); }
}

/* Logo Header (Top Left) */
.logo-header {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    z-index: 30;
    display: flex;
    align-items: center;
    animation: fadeInAnimation 0.5s ease-out 0.12s forwards;
    opacity: 0;
}
.logo-icon {
    width: 60px; /* Adjust as needed */
    height: auto;
    filter: drop-shadow(0 0 0.5rem rgba(var(--rgb-neonblue), 0.47));
}

/* Hero Section */
.hero-section {
    padding-top: 4rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
}
.main-title {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-neongreen-primary);
    text-shadow: 0 4px 32px rgba(var(--rgb-neongreen-accent), 0.6);
    letter-spacing: 0.1em;
    line-height: 1.1;
    animation: fadeInAnimation 0.6s ease-out 0.2s forwards, scaleInAnimation 0.6s ease-out 0.2s forwards;
    opacity: 0;
}
.title-fox {
    color: var(--color-neonblue);
}
.subtitle {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 42rem;
    letter-spacing: 0.025em;
    animation: fadeInAnimation 0.7s ease-out 0.5s forwards;
    opacity: 0;
}
.subtitle-highlight {
    color: var(--color-neonblue);
}
.cta-button {
    margin-top: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-full);
    font-family: var(--font-mono);
    font-size: 1.125rem;
    background-image: linear-gradient(to bottom right, var(--color-neonblue), #4ade80, var(--color-neongreen-primary));
    color: var(--color-text-dark);
    box-shadow: 0 0 15px rgba(var(--rgb-neonblue),0.4), 0 0 8px rgba(var(--rgb-neongreen-primary),0.3);
    border: 1px solid rgba(var(--rgb-neonblue), 0.4);
    text-decoration: none;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    animation: fadeInAnimation 0.7s ease-out 0.8s forwards;
    opacity: 0;
}
.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(var(--rgb-neonblue),0.6), 0 0 15px rgba(var(--rgb-neongreen-primary),0.5);
}
.cta-button:active {
    transform: scale(1);
}

/* Main Content Area */
main {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: 100%;
}

/* Teaser Highlights (Feature Cards) */
.teaser-highlights-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    justify-content: center;
    max-width: 56rem;
    width: 100%;
    margin-top: 2.5rem;
    animation: fadeInAnimation 0.8s ease-out 1.4s forwards;
    opacity: 0;
}
.feature-card {
    background-color: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(var(--rgb-neonblue), 0.3);
    border-radius: var(--border-radius-xxl);
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 250px;
    max-width: 24rem;
    box-shadow: 0 0 18px 4px rgba(var(--rgb-neonblue), 0.27), 0 0 2px 0 rgba(var(--rgb-neongreen-accent), 0.6);
    transition: border-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    backdrop-filter: blur(5px);
    position: relative;
}
.feature-card:hover {
    border-color: rgba(var(--rgb-neongreen-accent), 0.7);
    transform: translateY(-3px);
}
.feature-icon-container {
    margin-bottom: 0.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px currentColor);
    transition: transform 0.2s ease-in-out;
}
.feature-card:nth-child(odd) .feature-icon-container { color: var(--color-neonblue); }
.feature-card:nth-child(even) .feature-icon-container { color: var(--color-neongreen-accent); }
.feature-icon-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.feature-card:hover .feature-icon-container {
    transform: scale(1.25) translateY(-0.25rem);
}
.feature-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-neongreen-primary);
    font-family: var(--font-mono);
    margin-bottom: 0.25rem;
    letter-spacing: 0.025em;
}
.feature-description {
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-size: 0.875rem;
}

/* Feature Gallery Section */
.feature-gallery-section {
    width: 100%;
    max-width: 72rem;
    margin: 4rem auto 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
}
.gallery-item {
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    outline: 2px solid rgba(var(--rgb-neonblue), 0.2);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transition: outline-color 0.2s ease, transform 0.2s ease;
    animation: fadeInAnimation 0.5s ease-out forwards;
    opacity: 0;
}
.gallery-item:hover {
    outline-color: rgba(var(--rgb-neonblue), 0.7);
    transform: scale(1.05);
}
.gallery-item:nth-child(1) { animation-delay: 0.2s; }
.gallery-item:nth-child(2) { animation-delay: 0.38s; }
.gallery-item:nth-child(3) { animation-delay: 0.56s; }
.gallery-item:nth-child(4) { animation-delay: 0.74s; }
.gallery-image-container {
    /* aspect-ratio: 16 / 9; */ /* Removed as per your provided files */
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    position: relative;
}
.gallery-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    filter: brightness(0.95) saturate(1.12);
}
.gallery-icon-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.5rem;
    color: var(--color-neonblue);
}
.gallery-label-container {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(var(--rgb-neonblue), 0.1);
}
.gallery-label {
    color: var(--color-neongreen-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
}

/* What Is TrackerFox Section */
.what-is-section {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeInAnimation 0.9s ease-out 2s forwards;
    opacity: 0;
}
.info-box {
    max-width: 42rem;
    width: calc(100% - 2rem);
    background: linear-gradient(120deg, rgba(16, 22, 25, 0.8) 60%, rgba(3, 61, 69, 0.13) 100%);
    border-radius: var(--border-radius-xl);
    padding: 1.25rem 1.75rem;
    box-shadow: 0 0 18px 5px rgba(var(--rgb-neonblue), 0.41);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}
.info-box-glow-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    border: 2px solid var(--color-neonblue);
    opacity: 0.55;
    filter: blur(5px);
    animation: pulse-glow 2.3s infinite alternate;
    box-shadow: 0 0 22px 4px rgba(var(--rgb-neonblue), 0.53);
}
@keyframes pulse-glow {
    0%   { box-shadow: 0 0 24px 5px rgba(var(--rgb-neonblue), 0.5), 0 0 0 0 rgba(var(--rgb-neongreen-accent),0.5); opacity:0.6;}
    20%  { box-shadow: 0 0 14px 3px rgba(var(--rgb-neongreen-accent),0.43), 0 0 0 0 rgba(var(--rgb-neonblue),0.5); opacity:0.7;}
    100% { box-shadow: 0 0 40px 14px rgba(var(--rgb-neonblue),0.53), 0 0 0 0 rgba(var(--rgb-neonblue),0.73); opacity:0.9;}
}
.info-box-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--color-neongreen-primary);
    margin-bottom: 0.125rem;
    position: relative; z-index: 1;
}
.info-box-list {
    padding-left: 1.5rem;
    list-style: disc;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative; z-index: 1;
}
.info-box-list li::marker {
    color: var(--color-neongreen-primary);
}
.join-link {
    color: var(--color-neonblue);
    text-decoration: none;
    font-weight: bold;
}
.join-link:hover {
    text-decoration: underline;
}

/* Signup Section */
.signup-section {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    animation: fadeInAnimation 0.7s ease-out 0.9s forwards;
    opacity: 0;
}
.signup-form {
    width: 100%;
    max-width: 42rem;
    display: flex;
    flex-direction: column; 
    gap: 0.5rem; 
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 0 30px 3px rgba(var(--rgb-neonblue), 0.26);
    border: 1.5px solid var(--color-neongreen-primary);
    backdrop-filter: blur(10px);
}
.input-group {
    position: relative;
    width: 100%;
}

.signup-form input[type="email"] {
    font-family: var(--font-mono);
    width: 100%;
    /* INCREASED PADDING for more height */
    padding: 1.125rem 2.75rem 1.125rem 1.25rem; 
    border-radius: var(--border-radius-md);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--color-neonblue);
    border: 1px solid rgba(var(--rgb-neongreen-primary), 0.4);
    transition: border-color 0.2s ease;
    /* You can slightly increase font-size if desired for a larger input */
    font-size: 0.95rem; 
    box-sizing: border-box;
    /* line-height: 1.5; /* Can often be kept, or adjusted if text isn't centered */
}


.signup-form input[type="email"]::placeholder {
    color: rgba(var(--rgb-neongreen-primary), 0.5);
}
.signup-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-neonblue);
}
.input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neongreen-primary);
    pointer-events: none;
    font-size: 1.375rem; /* This size should generally still work */
}

.input-icon-1 {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 10%;
    height: 60%;
    transform: translateY(-50%);
    color: var(--color-neongreen-primary);
    pointer-events: none;
    font-size: 1.375rem; /* This size should generally still work */
}
.email-error-message {
    color: #ff4d4d; 
    font-size: 0.875rem;
    text-align: left; 
    width: 100%;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
    min-height: 1.2em; 
    padding-left: 0.25rem;
    box-sizing: border-box;
}

.submit-button {
    font-weight: 700;
    /* INCREASED PADDING to match input's vertical padding */
    padding: 1.125rem 1.75rem; 
    border-radius: var(--border-radius-md);
    background-image: linear-gradient(to bottom right, var(--color-neonblue), #4ade80, var(--color-neongreen-primary));
    color: var(--color-text-dark);
    border: 1px solid rgba(var(--rgb-neongreen-primary), 0.4);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(var(--rgb-neonblue),0.53), 0 0 2px rgba(var(--rgb-neongreen-accent),0.73);
    width: 100%;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    /* line-height: 1.5; /* Can often be kept */
    font-size: 1rem; /* Keeping button font size consistent or slightly smaller than input */
}

.submit-button:hover:not(:disabled) {
    box-shadow: 0 0 15px rgba(var(--rgb-neonblue),0.5), 0 0 8px rgba(var(--rgb-neongreen-primary),0.4);
    border-color: var(--color-neonblue);
}
.submit-button:focus { outline: none; }
.submit-button:disabled { opacity: 0.7; cursor: not-allowed; }

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-text-dark);
    animation: spin 1s ease-infinite;
    margin-left: 10px;
}
.submit-button.loading .button-text { display: none; }
.submit-button .loading-spinner { /* Ensure spinner is part of the button flow */
    /* display: none; /* Handled by .submit-button.loading .button-text */
}
.submit-button.loading .button-text {
    /* visibility: hidden; /* Hide text but keep space */
    /* Instead of visibility, we can just change text content via JS */
}
.submit-button.loading .loading-spinner {
    display: inline-block;
    margin-left: 0; /* Centered when text is "SUBMITTING..." or "✓ JOINED" */
}


/* Footer */
.page-footer {
    z-index: 20;
    margin-top: 4rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    padding: 1rem;
}
.copyright { opacity: 0.7; }
.footer-separator { margin: 0 0.5rem; opacity: 0.7; }
.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-link:hover {
    text-decoration: underline;
    color: var(--color-neonblue);
}
.page-footer a[href^="mailto"]:hover {
    color: var(--color-neongreen-primary);
}

/* Modals (Calendly & Success) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.75);
    align-items: center; 
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background-color: #080808;
    margin: auto;
    padding: 20px;
    border: 1px solid var(--color-neonblue);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 900px;
    height: 85%;
    max-height: 700px;
    position: relative;
    box-shadow: 0 0 35px rgba(var(--rgb-neonblue), 0.6);
    display: flex;
    flex-direction: column;
}
.modal-content iframe {
    flex-grow: 1;
    width: 100%;
    border: none;
    border-radius: var(--border-radius-md);
    margin-top: 10px;
}
.close-button {
    color: var(--color-neonblue);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}
.close-button:hover,
.close-button:focus {
    color: var(--color-neongreen-primary);
    text-decoration: none;
}
.success-modal-content {
    text-align: center;
    padding: 30px 40px;
    max-width: 500px;
    height: auto;
}
.success-title {
    font-family: var(--font-mono);
    color: var(--color-neongreen-primary);
    font-size: 1.75rem;
    margin-bottom: 15px;
}
.success-message {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Responsive Adjustments */
@media (min-width: 640px) { /* sm breakpoint */
    .main-title { font-size: 3.75rem; }
    .subtitle { font-size: 1.5rem; }
    .cta-button { font-size: 1.25rem; }
}

@media (min-width: 768px) { /* md breakpoint */
    .feature-gallery-section {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 5rem;
    }
    /* Signup form row layout */
    .signup-form {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    .input-group {
        flex-grow: 1;
        width: auto;
        order: 0;
    }
    .email-error-message {
        width: auto;
        flex-basis: 200px; /* Adjust as needed */
        flex-shrink: 1;
        text-align: center;
        margin-top: 0;
        margin-bottom: 0;
        order: 1;
    }
    .submit-button {
        width: auto;
        flex-shrink: 0;
        order: 2;
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .feature-gallery-section {
        grid-template-columns: repeat(4, 1fr);
    }
}

.custom-toast {
    visibility: hidden;
    min-width: 280px;
    max-width: 400px; /* Max width */
    background-color: #fff; /* White background as per screenshot */
    color: #333; /* Dark text */
    text-align: left; /* Align text to the left */
    border-radius: 8px; /* Rounded corners */
    padding: 16px 40px 16px 20px; /* Padding, more on right for close button */
    position: fixed;
    z-index: 2000; /* Above everything */
    right: 30px;
    bottom: 30px;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
}

.custom-toast #toastMessage {
    display: block; /* Make it block to handle multi-line text well */
    font-weight: bold; /* "You've joined the waitlist." is bold */
}
.custom-toast #toastMessage::after { /* For the sub-text */
    content: attr(data-subtext); /* We'll set this via JS if needed or just part of message */
    display: block;
    font-weight: normal;
    font-size: 0.9em;
    color: #555;
    margin-top: 4px;
}


.custom-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px; /* Animate in from bottom */
}

.custom-toast.error {
    background-color: #ffebee; /* Light red for errors */
    color: #c62828; /* Dark red text */
    visibility: visible; /* Make sure errors are immediately visible if .show is also applied */
    opacity: 1;
    bottom: 50px;
}
.custom-toast.error #toastMessage::after {
    color: #d32f2f;
}


.toast-close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.toast-close-button:hover {
    color: #333;
}