/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #dedede;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: #ebebeb;
}

.hero-content {
    max-width: 800px;
    width: fit-content;
    padding: 0 2rem;
}

.brand-bird {
    height: clamp(7.8rem, 39vw, 18.7rem);
    width: auto;
    max-width: 90%;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.brand-name {
    font-size: 8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #1a1a1a;
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

.brand-name.sized {
    opacity: 1;
}

.subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: #666;
    margin-bottom: 3rem;
    padding-bottom: 6rem;
    text-align: left;
    padding-left: 10px;
}

.finally {
    opacity: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.scroll-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: #666;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

/* 3D Dovetail Section */
.dovetail-wrapper {
    height: 200vh; /* Space for scroll-driven animation */
    position: relative;
    background-color: #ebebeb;
}

.dovetail-canvas {
    position: sticky;
    top: 0;
    width: 100% !important;
    max-width: 100%;
    height: 100vh;
    display: block;
    background: transparent;
}

/* Copy Section */
.copy {
    min-height: 50vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 2rem 4rem;
    background-color: #ebebeb;
}

.copy-content {
    max-width: 700px;
    text-align: center;
    margin-top: 0;
    padding-top: 0;
}

.tagline {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.description {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #555;
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto;
}

/* Coming Soon */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    background-color: #ebebeb;
}

.coming-soon-text {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #555;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-align: center;
}

/* Waitlist Form */
.waitlist-cta {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #555;
    font-weight: 400;
    margin-top: 0.4rem;
    margin-bottom: 2rem;
}

.newsletter-form-container {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.newsletter-form-input {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #1a1a1a;
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: transparent;
    border: 1px solid #bbb;
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-form-input::placeholder {
    color: #aaa;
}

.newsletter-form-input:focus {
    border-color: #888;
}

.newsletter-form-button,
.newsletter-loading-button {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #8B5E3C;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.newsletter-form-button:hover {
    background: #724C2F;
}

.newsletter-loading-button {
    display: none;
    cursor: default;
    background: #555;
}

.newsletter-success,
.newsletter-error {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(to bottom, #e0e0e0, #e6e6e6);
    border: 1px solid #c0c0c0;
    border-radius: 25px;
    padding: 1.5rem 2rem;
    flex-direction: column;
}

.newsletter-success-message {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: #555;
    letter-spacing: 0.01em;
}

.newsletter-error-message {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #b91c1c;
    letter-spacing: 0.01em;
}

.newsletter-back-button {
    display: block;
    margin: 0.75rem auto 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #999;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.newsletter-back-button:hover {
    color: #555;
}

/* Footer */
.footer {
    background-color: #dedede;
    padding: 6rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-email {
    font-size: 1.4rem;
    color: #555;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.contact-email:hover {
    color: #1a1a1a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 1rem;
    }

    .subtitle {
        padding-left: 0;
    }

    .copy {
        padding: 3rem 1rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Compact landscape (e.g. iPhone landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .brand-bird {
        display: none;
    }

    .subtitle {
        padding-bottom: 0;
    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Hide canvas initially until Three.js loads */
.dovetail-canvas {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.dovetail-canvas.loaded {
    opacity: 1;
}