/* === FAIRWAY LANDING PAGE === */

:root {
    --deep-green: #1A3A2A;
    --near-black: #0D1117;
    --fairway-green: #2D6A4F;
    --fairway-green-light: #40916C;
    --fairway-green-dark: #1B4332;
    --text-primary: #F5F0E8;
    --text-secondary: #A0997A;
    --text-muted: #6B6650;
    --text-dim: #4A4535;
    --card-bg: rgba(26, 58, 42, 0.3);
    --card-border: rgba(45, 106, 79, 0.2);
}

/* === RESET === */

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

/* === BASE === */

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--near-black);
    background:
        radial-gradient(ellipse at 50% 40%, var(--deep-green) 0%, var(--near-black) 70%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* === GRAIN TEXTURE === */

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* === MAIN CONTENT === */

main {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    max-width: 640px;
    width: 100%;
}

/* === LOGO === */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--fairway-green);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--text-primary);
}

/* === HEADLINE === */

h1 {
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

/* === SUBTITLE === */

.subtitle {
    font-size: clamp(16px, 3.5vw, 20px);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* === FORM === */

.form-container {
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.waitlist-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transition: border-color 0.2s ease;
}

.form-row:focus-within {
    border-color: var(--fairway-green);
}

.form-row input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.form-row input::placeholder {
    color: var(--text-muted);
}

.form-row button {
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: var(--fairway-green);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.form-row button:hover {
    background: var(--fairway-green-light);
}

.form-row button:active {
    background: var(--fairway-green-dark);
}

.form-row button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state */
.btn-loading {
    display: none;
}

button.loading .btn-text {
    visibility: hidden;
}

button.loading .btn-loading {
    display: block;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.loading .btn-loading svg {
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
}

/* Loops.so loading button */
.newsletter-loading-button {
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: var(--fairway-green);
    color: white;
    border: none;
    cursor: not-allowed;
    white-space: nowrap;
    position: relative;
    opacity: 0.7;
}

.newsletter-loading-button .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-loading-button .btn-loading svg {
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
}

/* Loops.so back button */
.newsletter-back-button {
    font-family: inherit;
    font-size: 14px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    margin-top: 12px;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.newsletter-back-button:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Form messages */
.form-message {
    font-size: 14px;
    margin-top: 12px;
    min-height: 20px;
}

.form-message.success {
    color: var(--fairway-green-light);
}

.form-message.error {
    color: #EF4444;
}

/* === SOCIAL PROOF === */

.social-proof {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.0s forwards;
}

/* === SOCIAL LINKS === */

.social-links {
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.social-links a svg {
    width: 20px;
    height: 20px;
}

/* === FOOTER === */

footer {
    position: relative;
    z-index: 2;
    padding: 32px 24px;
    text-align: center;
    width: 100%;
}

footer p {
    font-size: 13px;
    color: var(--text-dim);
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* === ANIMATIONS === */

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

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

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

/* === RESPONSIVE === */

@media (max-width: 520px) {
    main {
        padding: 40px 20px;
    }

    .logo {
        margin-bottom: 36px;
    }

    .form-row {
        flex-direction: column;
        border-radius: 12px;
    }

    .form-row input {
        border-bottom: 1px solid var(--card-border);
    }

    .form-row button {
        border-radius: 0 0 11px 11px;
    }

    .subtitle {
        margin-bottom: 32px;
    }
}

/* === REDUCED MOTION === */

@media (prefers-reduced-motion: reduce) {
    .logo, h1, .subtitle, .form-container, .social-proof, .social-links {
        animation: none;
        opacity: 1;
    }

    .grain {
        display: none;
    }
}

/* === PRINT === */

@media print {
    body {
        background: white;
        color: black;
    }

    .grain, .social-links, .form-container {
        display: none;
    }
}
