/* Custom Fonts */
@font-face {
    font-family: 'Stockholm Mono';
    src: url('./assets/Stockholm_Mono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Goldoni';
    src: url('./assets/Goldoni.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('./assets/header_photo_1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Dark overlay matching reference design */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

/* Hero Content Container */
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 100px;
    max-width: 1400px;
    width: 100%;
    padding: 60px 80px;
    align-items: center;
}

/* Left Side - Brand Content */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 650px;
    animation: fadeInUp 0.8s ease-out;
}

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

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.brand-name {
    font-family: 'Balthazar', serif;
    font-size: 4.2rem;
    font-weight: normal;
    letter-spacing: 12px;
    text-transform: uppercase;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #ebe78f 0%, #c7a858 50%, #3d3424 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(132, 117, 78, 0.4));
    line-height: 1.1;
}

.tagline {
    font-family: 'Goldoni', serif;
    font-size: 1.25rem;
    font-weight: normal;
    line-height: 2;
    letter-spacing: 0.5px;
    opacity: 0.92;
    max-width: 550px;
    color: rgba(255, 255, 255, 0.95);
}

/* Right Side - Signup Form */
.hero-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.signup-form {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: 40px 48px 48px 48px;
    width: 100%;
    max-width: 440px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
}

.signup-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.signup-form:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

/* Form Headings */
.form-heading {
    font-family: 'Goldoni', serif;
    font-size: 1.2rem;
    font-weight: normal;
    margin-bottom: 36px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 1;
    text-align: center;
    position: relative;
    padding-bottom: 16px;
    white-space: nowrap;
}

.form-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0;
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    letter-spacing: 0.8px;
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Validation styling only when form has been submitted */
.form-input.error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

/* Subscribe Button - White with thin black border */
.subscribe-btn {
    width: 100%;
    padding: 19px 28px 16px 28px;
    background: #ffffff;
    color: #000000;
    border: 1.5px solid #000000;
    border-radius: 2px;
    font-family: 'Stockholm Mono', monospace;
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    margin-top: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.subscribe-btn:hover::before {
    left: 100%;
}

.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #1a1a1a;
}

.subscribe-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.subscribe-btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.subscribe-btn:disabled::before {
    display: none;
}

/* Error and Success Messages */
.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 12.5px;
    font-weight: 400;
    margin-top: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.error-message.show {
    opacity: 1;
    max-height: 60px;
    animation: slideDown 0.3s ease-out;
}

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

.success-message {
    color: #4caf50;
    font-size: 14.5px;
    font-weight: 500;
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.success-message.show {
    opacity: 1;
    max-height: 60px;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Message States (for #formMessage element) */
#formMessage {
    font-size: 14.5px;
    font-weight: 500;
    text-align: center;
    margin-top: 0;
    padding: 0;
    border-radius: 3px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    line-height: 1.5;
}

#formMessage.show {
    opacity: 1;
    max-height: 120px;
    margin-top: 20px;
    padding: 14px 16px;
    margin-bottom: 0;
    animation: fadeInScale 0.5s ease-out;
}

#formMessage.success {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.12);
    border: 1.5px solid rgba(76, 175, 80, 0.35);
}

#formMessage.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    border: 1.5px solid rgba(255, 107, 107, 0.35);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr 400px;
        gap: 60px;
        padding: 40px 60px;
    }

    .brand-name {
        font-size: 4rem;
        letter-spacing: 10px;
    }

    .tagline {
        font-size: 1.15rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 60px 40px;
        text-align: center;
    }

    .error-message {
        text-align: left;
    }

    .hero-left {
        max-width: none;
        align-items: center;
    }

    .hero-right {
        justify-content: center;
    }

    .logo {
        width: 100px;
    }

    .brand-name {
        font-size: 3.5rem;
        letter-spacing: 8px;
    }

    .tagline {
        font-size: 1.1rem;
        max-width: 600px;
        text-align: center;
    }

    .signup-form {
        padding: 36px 44px 44px 44px;
        max-width: 480px;
        margin: 0 auto;
    }

    .form-heading {
        font-size: 1.3rem;
        letter-spacing: 1.2px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 40px 32px;
        gap: 48px;
    }

    .logo {
        width: 85px;
    }

    .brand-name {
        font-size: 3rem;
        letter-spacing: 6px;
    }

    .tagline {
        font-size: 1.05rem;
        line-height: 1.9;
    }

    .signup-form {
        padding: 32px 40px 40px 40px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 32px 20px;
        gap: 44px;
    }

    .logo {
        width: 70px;
    }

    .brand-name {
        font-size: 2.5rem;
        letter-spacing: 4px;
        margin-bottom: 8px;
    }

    .tagline {
        font-size: 1rem;
        line-height: 1.85;
        padding: 0 8px;
        max-width: 100%;
    }

    .hero-right {
        animation: fadeInUpMobile 0.8s ease-out 0.2s both;
    }

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

    .signup-form {
        padding: 32px 28px 36px 28px;
        max-width: 100%;
        border-radius: 3px;
    }

    .form-heading {
        font-size: 1.15rem;
        margin-bottom: 28px;
        letter-spacing: 1px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-input {
        padding: 16px 18px;
        font-size: 16px;
        border-radius: 2px;
    }

    .subscribe-btn {
        padding: 17px 24px 14px 24px;
        font-size: 10px;
        letter-spacing: 2px;
        margin-top: 8px;
    }

    .subscribe-btn:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 375px) {
    .hero-content {
        padding: 28px 16px;
    }

    .logo {
        width: 65px;
    }

    .brand-name {
        font-size: 2rem;
        letter-spacing: 3px;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .signup-form {
        padding: 28px 24px 32px 24px;
    }

    .form-heading {
        font-size: 1.1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0, 0, 0, 0.8);
    }

    .form-input {
        border-color: #ffffff;
    }

    .subscribe-btn {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-left,
    .hero-right,
    .form-input,
    .subscribe-btn,
    .error-message,
    .success-message,
    .signup-form,
    .form-group,
    #formMessage {
        animation: none;
        transition: none;
    }

    .hero-background {
        background-attachment: scroll;
    }

    .form-input:focus {
        transform: none;
    }

    .subscribe-btn:hover {
        transform: none;
    }

    .subscribe-btn::before {
        display: none;
    }
}
