/* ── Fonts (self-hosted) ─────────────────────────────────────────────────── */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-latin-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/inter-latin-800.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Serif Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-serif-display-latin-400.woff2') format('woff2');
}

/* ── Reset & base ───────────────────────────────────────────────────────── */

:root {
    --bg:           #fafafa;
    --bg-surface:   #ffffff;
    --border:       rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);

    --text:         #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted:   #9ca3af;

    --accent:       #22c55e;
    --accent-glow:  rgba(34, 197, 94, 0.12);
    --accent-hover: #16a34a;

    --success:      #22c55e;
    --error:        #ef4444;

    --radius:       10px;
    --radius-lg:    16px;
    --transition:   180ms ease;
}

*, *::before, *::after { 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: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Page ───────────────────────────────────────────────────────────────── */

.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Logo ───────────────────────────────────────────────────────────────── */

.logo {
    padding: 28px 0;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-muted);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 48px 0 40px;
    transition: opacity var(--transition);
}

.hero-headline {
    font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(34px, 7vw, 52px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--text);
}

.hero-sub {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.social-proof {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

/* ── Signup form ────────────────────────────────────────────────────────── */

#signup-form {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    transition: opacity 350ms ease, transform 350ms ease;
}

#signup-form.form-hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.email-row {
    display: flex;
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.email-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.email-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.email-input::placeholder { color: var(--text-muted); }
.email-input.input-error { color: var(--error); }

.subscribe-btn {
    padding: 14px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.subscribe-btn:hover { background: var(--accent-hover); }
.subscribe-btn:active { transform: scale(0.97); }
.subscribe-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Form messages ──────────────────────────────────────────────────────── */

.form-message {
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

.message-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.message-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ── Success state ──────────────────────────────────────────────────────── */

.hero-success .hero-headline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
}

.success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 20px;
    margin-right: 12px;
    vertical-align: middle;
    animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.hero-success .hero-sub {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.legal-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* ── Product sample ─────────────────────────────────────────────────────── */

.sample {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    max-width: 480px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s ease 0.3s forwards;
}

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

.sample-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
    text-align: center;
}

.sample-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: border-color var(--transition);
}

.sample-card:hover {
    border-color: var(--border-hover);
    border-left-color: var(--accent);
}

.sample-headline {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 8px;
}

.sample-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer p {
    font-size: 12px;
    color: var(--text-muted);
}

.footer a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .hero { padding: 32px 0; }
    .hero-headline { font-size: 30px; letter-spacing: -0.8px; }
    .hero-sub { font-size: 15px; margin-bottom: 16px; }

    .email-row { flex-direction: column; }
    .subscribe-btn { width: 100%; padding: 14px; border-radius: 8px; }
}

@media (max-width: 380px) {
    .page { padding: 0 16px; }
    .hero-headline { font-size: 26px; }
}
