/* Brand Colors */
:root {
    --primary: #CCD5AE;
    --primary-dark: #B8C49A;
    --secondary: #E9EDC9;
    --light: #FEFAE0;
    --accent: #FAEDCD;
    --dark: #D4A373;
    --dark-light: #E8C4A0;
    --text: #5A4A3A;
    --text-light: #8B7A6A;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 40px 0 20px;
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.logo-dot {
    color: var(--primary);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 60px;
}

/* Hero Section */
.hero {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 50px;
    font-style: italic;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    opacity: 0;
}

/* Animation Container */
.animation-container {
    width: 320px;
    height: 220px;
    margin: 40px auto;
    background-color: var(--accent);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(212, 163, 115, 0.15);
    overflow: hidden;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.animation-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(212, 163, 115, 0.2);
}

#needle-animation {
    width: 100%;
    height: 100%;
    background-color: var(--secondary);
}

/* Form Styles */
.subscription-form {
    width: 100%;
    max-width: 480px;
    margin: 30px auto 0;
    padding: 36px;
    background-color: var(--accent);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(212, 163, 115, 0.1);
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    opacity: 0;
}

.subscription-form:hover {
    box-shadow: 0 16px 50px rgba(212, 163, 115, 0.15);
}

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

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--primary);
    border-radius: 12px;
    background-color: var(--light);
    color: var(--text);
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--dark);
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.15);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: rgba(90, 74, 58, 0.4);
    font-style: italic;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--light) inset;
    -webkit-text-fill-color: var(--text);
    transition: background-color 5000s ease-in-out 0s;
}

.form-button {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    font-family: 'Playfair Display', Georgia, serif;
    position: relative;
    overflow: hidden;
}

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

.form-button:hover::before {
    left: 100%;
}

.form-button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(204, 213, 174, 0.3);
}

.form-button:active {
    transform: translateY(0);
}

.form-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.form-button.loading {
    opacity: 0.9;
    cursor: wait;
}

.form-button.success {
    background: linear-gradient(135deg, #2D5A3D 0%, #1B3D2E 100%);
}

.button-text,
.button-loading {
    display: inline-block;
    transition: all 0.3s ease;
}

.button-loading {
    display: none;
}

.form-button.loading .button-text {
    display: none;
}

.form-button.loading .button-loading {
    display: inline-block;
}

/* Success Message */
.form-success-message {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    margin-top: 20px;
    background-color: rgba(45, 90, 61, 0.1);
    border: 2px solid #2D5A3D;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.form-success-message.show {
    display: flex;
    opacity: 1;
}

.success-icon {
    width: 24px;
    height: 24px;
    color: #2D5A3D;
    flex-shrink: 0;
}

.form-success-message p {
    color: #2D5A3D;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* Error Message */
.form-error {
    display: none;
    padding: 12px 16px;
    margin-top: 16px;
    background-color: rgba(180, 50, 50, 0.1);
    border: 2px solid #B43232;
    border-radius: 10px;
    color: #B43232;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.form-error.show {
    display: block;
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--primary);
    color: var(--text-light);
    font-size: 0.95rem;
    font-style: italic;
    animation: fadeIn 1s ease-out 0.8s both;
    opacity: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header {
        padding: 30px 0 15px;
        margin-bottom: 30px;
    }
    
    .logo {
        font-size: 2.4rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .animation-container {
        width: 280px;
        height: 180px;
    }
    
    .subscription-form {
        padding: 28px;
        margin-top: 20px;
    }
    
    .main-content {
        padding: 10px 0 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .animation-container {
        width: 240px;
        height: 150px;
    }
    
    .subscription-form {
        padding: 20px;
    }
    
    .form-button {
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    .footer {
        font-size: 0.85rem;
        padding: 20px 0;
    }
}

/* Accessibility */
.form-input:focus-visible {
    outline: 2px solid var(--dark);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dark);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }
    
    .form-button {
        border: 2px solid white;
    }
}
