/* 
 * WorkOut Landing Page Stylesheet
 * Custom CSS with Premium Visual Design & Host Grotesk Typography
 */

/* Import Host Grotesk font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --primary-color: #FF5757;
    /* Coral red from logo */
    --primary-hover: #E84545;
    /* Darker red/coral for hover states */
    --bg-input: #FFF6F4;
    /* Light pill background */
    --text-main: #FFFFFF;
    --text-muted: #E2E2E2;
    --font-family: 'Host Grotesk', sans-serif;

    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: #111111;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Background image with full cover */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('landing.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Linear/radial dark overlay to make text pop */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.15) 100%);
    z-index: -1;
}

/* Main Layout Wrapper */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2.5rem 5% 3.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    justify-content: space-between;
}

/* Header */
.header {
    z-index: 10;
    display: flex;
    align-items: center;
    margin-top: 6rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* Fallback stylized text logo */
.logo-fallback {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

/* Main Hero Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 850px;
    z-index: 5;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* Heading Typography */
h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.5rem);
    font-weight: 600;
    /* Host Grotesk Semibold */
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* On viewports where the text needs to wrap naturally, reset white-space */
@media (max-width: 768px) {
    h1 {
        white-space: normal;
    }
}

/* Subtitle/Description */
.description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Form Container - Double Pill Layout */
.waitlist-form {
    width: 100%;
    max-width: 460px;
    position: relative;
}

.input-group {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border-radius: 9999px;
    padding: 6px 6px 6px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
    transition: var(--transition-normal);
}

.input-group:focus-within {
    border-color: rgba(255, 87, 87, 0.4);
    box-shadow: 0 4px 25px rgba(255, 87, 87, 0.2), 0 0 0 4px rgba(255, 87, 87, 0.1);
}

.input-group input[type="email"] {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 400;
    color: #1a1a1a;
    width: 100%;
    padding-right: 12px;
}

.input-group input[type="email"]::placeholder {
    color: #a0908c;
    opacity: 0.8;
}

/* Pill Button */
.submit-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 14px 28px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 135px;
    height: 48px;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 87, 87, 0.4);
}

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

/* Button Loading State */
.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* Footer & Social Links */
.footer {
    z-index: 10;
}

.connect-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-link {
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    opacity: 0.85;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    width: calc(100% - 4rem);
}

.toast {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #2ec4b6;
}

.toast-error {
    border-left-color: #e71d36;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Media Queries for Responsiveness */

/* Tablet and Smaller Screen Sizes */
@media (max-width: 768px) {
    .bg-overlay {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0, 0, 0, 0.8) 100%);
    }

    .layout-wrapper {
        padding: 2rem 6%;
    }

    .header {
        margin-top: 4rem;
    }

    .main-content {
        margin-top: 4rem;
        margin-bottom: 5rem;
        text-align: left;
    }

    .description {
        margin-bottom: 2.2rem;
    }
}

/* Mobile Screen Sizes */
@media (max-width: 480px) {
    body {
        height: 100dvh;
        overflow: hidden;
    }

    .bg-container {
        background-position: 68% center; /* Shifts image slightly back to the left for a perfect visual crop */
    }

    .layout-wrapper {
        height: 100dvh;
        min-height: 100dvh;
        padding: 1.5rem 1.5rem 3rem 1.5rem; /* Balanced padding to keep elements inside screen bounds without overflow */
    }

    h1 {
        font-size: 1.85rem; /* Reduced from 2.2rem clamp to wrap heading perfectly on exactly 3 lines instead of 4 */
        line-height: 1.25;
        margin-bottom: 1rem;
    }

    .description {
        margin-bottom: 1.5rem; /* Reduced margin to optimize vertical space on mobile */
    }

    .header {
        margin-top: 1rem;
    }

    .logo-img {
        height: 32px;
    }

    .main-content {
        flex-grow: 0;
        margin-top: auto;
        margin-bottom: 1.5rem; /* Down close to the social section */
    }

    /* Convert double pill into beautiful separate elements on small screens */
    .input-group {
        flex-direction: column;
        background-color: transparent;
        padding: 0;
        border: none;
        box-shadow: none;
        gap: 12px;
    }

    .input-group:focus-within {
        box-shadow: none;
    }

    .input-group input[type="email"] {
        background-color: var(--bg-input);
        border-radius: 9999px;
        padding: 16px 24px;
        width: 100%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        border: 2px solid transparent;
        transition: var(--transition-normal);
    }

    .input-group input[type="email"]:focus {
        border-color: rgba(255, 87, 87, 0.4);
        background-color: #ffffff;
    }

    .submit-btn {
        width: 100%;
        padding: 16px;
        height: 52px;
        box-shadow: 0 4px 15px rgba(255, 87, 87, 0.3);
    }

    .footer {
        width: 100%;
        text-align: left;
    }

    .connect-title {
        text-align: left;
        margin-bottom: 0.8rem;
    }

    .social-links {
        justify-content: flex-start;
        width: 100%;
        gap: 1.5rem;
    }

    .toast-container {
        bottom: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
    }
}