:root {
    --cream-50: #F7F3ED;
    --cream-100: #EFE9E1;
    --cream-200: #E9E2D6;
    --cream-300: #D4C6AE;
    --coffee-300: #C87941;
    --coffee-500: #8B5E3C;
    --coffee-700: #6F3F1E;
    --coffee-900: #2B1F17;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream-50);
    color: var(--coffee-900);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
}

/* ── Header ─────────────────────────────── */
.site-header {
    padding: 2rem 2rem 0;
    display: flex;
    justify-content: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.7;
}

.logo-svg {
    height: 50px;
    width: auto;
    display: block;
}

/* ── Hero ───────────────────────────────── */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}

.hero-rule {
    width: 1px;
    height: 52px;
    background: linear-gradient(to bottom, transparent, var(--coffee-300));
    margin-bottom: 2.5rem;
    animation: fadeDown 0.9s var(--ease-out) both;
}

.hero-label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--coffee-500);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s var(--ease-out) 0.1s both;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.75rem, 8vw, 5.25rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--coffee-900);
    max-width: 13ch;
    margin-bottom: 1.75rem;
    animation: fadeUp 0.7s var(--ease-out) 0.2s both;
}

.hero-headline em {
    font-style: italic;
    color: var(--coffee-700);
}

.hero-sub {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--coffee-500);
    max-width: 34ch;
    margin-bottom: 3rem;
    animation: fadeUp 0.7s var(--ease-out) 0.3s both;
}

/* ── Form ───────────────────────────────── */
.subscribe-form {
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.7s var(--ease-out) 0.4s both;
}

.form-message {
    display: none;
    margin-bottom: 0.875rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: left;
}

.form-message.success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-row {
    display: flex;
    border: 1.5px solid var(--cream-300);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row:focus-within {
    border-color: var(--coffee-700);
    box-shadow: 0 0 0 3px rgba(111, 63, 30, 0.09);
}

.form-input {
    flex: 1;
    min-width: 0;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--coffee-900);
    outline: none;
}

.form-input::placeholder {
    color: var(--cream-300);
}

.form-btn {
    padding: 0.875rem 1.3rem;
    background: var(--coffee-700);
    color: var(--cream-50);
    border: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.form-btn:hover:not(:disabled) {
    background: var(--coffee-900);
}

.form-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-note {
    margin-top: 0.85rem;
    font-size: 0.76rem;
    color: var(--coffee-500);
    opacity: 0.75;
    letter-spacing: 0.01em;
}

/* ── Pills ──────────────────────────────── */
.categories {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3.5rem;
    animation: fadeUp 0.7s var(--ease-out) 0.55s both;
}

.pill {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--cream-300);
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    color: var(--coffee-500);
}

/* ── Stats ──────────────────────────────── */
.divider {
    max-width: 560px;
    margin: 0 auto;
    width: calc(100% - 3rem);
    height: 1px;
    background: var(--cream-200);
}

.stats-section {
    padding: 2.25rem 1.5rem;
    text-align: center;
    animation: fadeUp 0.7s var(--ease-out) 0.65s both;
}

.stats-inner {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
}

.stat-item {
    line-height: 1.25;
}

.stat-number {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 2.25rem;
    letter-spacing: -0.04em;
    color: var(--coffee-900);
    display: block;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.69rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coffee-500);
}

.stat-sep {
    width: 1px;
    height: 30px;
    background: var(--cream-200);
}

/* ── Footer ─────────────────────────────── */
.site-footer {
    padding: 1.25rem 2rem;
    text-align: center;
    border-top: 1px solid var(--cream-200);
}

.footer-text {
    font-size: 0.73rem;
    color: var(--cream-300);
    letter-spacing: 0.04em;
}

.footer-text a {
    color: var(--coffee-500);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-text a:hover {
    color: var(--coffee-700);
}

/* ── Decorative drops ───────────────────── */
.deco {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

.deco-1 {
    top: -80px;
    right: -60px;
    width: 300px;
}

.deco-2 {
    bottom: -60px;
    left: -70px;
    width: 240px;
    transform: rotate(18deg);
}

/* ── Animations ─────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Mobile ─────────────────────────────── */
@media (max-width: 480px) {
    .site-header {
        padding: 1.5rem 1.5rem 0;
    }

    .hero {
        padding: 3.5rem 1.25rem 3rem;
    }

    .hero-rule {
        height: 36px;
        margin-bottom: 2rem;
    }

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

    .form-input {
        border-bottom: 1px solid var(--cream-200);
        padding: 0.9rem 1rem;
        text-align: center;
    }

    .form-btn {
        padding: 0.9rem 1rem;
        text-align: center;
        font-size: 0.9rem;
    }

    .stats-inner {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.875rem;
    }
}

@media (max-width: 360px) {
    .hero-headline {
        font-size: 2.4rem;
    }
}