@import url('https://fonts.googleapis.com/css2?family=Aleo:wght@700&family=Lato&display=swap');

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

:root {
    --cream:    #f5f0e8;
    --parchment:#ede6d6;
    --parchment-dk: #bbb6aa;
    --bark:     #4F4D48;
    --bark-lt:     #5e5b55;
    --sage:     #4a6741;
    --sage-lt:  #6b8f5e;
    --font-title: 'Aleo', serif;
    --font-body: 'Lato', serif;
}

html, body {
    height: 100%;
    background: var(--cream);
    color: var(--bark);
    overflow-x: hidden;
}

/* ── Grain overlay ── */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 1000;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
    opacity: 0.5;
}

h1 {
    font-family: var(--font-title);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--bark);
    text-transform: uppercase;
}

p, input, button {
    font-family: var(--font-body);
    font-size: 1rem;
}

p {
    color: var(--bark-lt);
    line-height: 1.6;
    max-width: 460px;
}

/* ── Background texture / gradient ── */
.bg {
    position: fixed; inset: 0; z-index: 0;
    background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(74,103,65,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(192,154,74,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(92,61,30,0.06) 0%, transparent 60%),
    var(--cream);
}

/* ── Main layout ── */
main {
    position: relative; z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 0;
    text-align: center;
    animation: fadeUp 1.2s cubic-bezier(.16,1,.3,1) both;
    background: var(--cream);
}

.logo {
    height: 160px;
    filter: drop-shadow(0 4px 18px rgba(43,36,24,0.12));
}

/* ── Rule ── */
.divider {
    margin: 28px auto;
    width: min(200px, 60%);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--sage-lt), transparent);
}

/* Form Styling */
.form-container {
    width: 100%;
    max-width: 28rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    border: 1px solid var(--earth-base);
    position: relative;
    margin: 32px 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.mail-icon {
    position: absolute;
    left: 1rem;
    color: rgba(44, 51, 42, 0.4);
}

input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: transparent;
    border: 1px solid var(--parchment-dk);
    outline: none;
    color: var(--earth-text);
    border-radius: 2px;
}

input::placeholder { color: rgba(44, 51, 42, 0.4); }

input[type="email"]:focus-within {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(74,103,65,0.18);
}
input[type="email"]:focus { outline: none; }

.submit-btn {
    background-color: var(--sage);
    color: var(--cream);
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    min-width: 120px;
}

.submit-btn:hover { background-color: var(--sage-lt); }

.success-overlay {
    display: none;
    inset: 0;
    background: var(--cream);
    border-radius: 1rem;
    align-items: center;
    justify-content: center;
    color: var(--sage-lt);
    gap: 0.5rem;
    border: 1px solid rgba(107, 122, 100, 0.2);
    padding: 16px 24px;
}

.success-overlay.active { display: flex; }

.spinner {
    height: 16px;
    animation: spin 1s linear infinite;
}
.opacity-25 {
    opacity: 25%;
}

.opacity-75 {
    opacity: 75%;
}

.disclaimer {
    font-size: 0.75rem;
    color: rgba(44, 51, 42, 0.5);
    margin: 1rem 0 3rem;
    max-width: 24rem;
}

/* ── Grass / horizon illustration ── */
.horizon {
    pointer-events: none;
    height: 120px;
}

/* ── Keyframes ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .notify-form { flex-direction: column; }
    .notify-form button { padding: 12px; }
}

@media (min-width: 768px) {
    .newsletter-form { flex-direction: row; }
}