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

/* Self-hosted Lora for headings */
@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/lora/lora-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Lora';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/lora/lora-bold-italic-latin.woff2') format('woff2');
}

:root {
    --primary: #157a50;
    --primary-dark: #116340;
    --primary-light: #e6f4ed;
    --font-heading: 'Lora', Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --text: #1e293b;
    --text-secondary: #475569;
    --bg: #FFFFFF;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --radius: 6px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ── */
.hero {
    background: #157a50;
    color: #fff;
    text-align: center;
    padding: 6rem 1.5rem 5rem;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero h1 em {
    font-style: italic;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 6px;
    text-decoration-thickness: 3px;
}

.hero-sub {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 540px;
    margin: 0 auto;
}

/* ── Sections ── */
.section {
    padding: 5rem 1.5rem;
}

.section--alt {
    background-color: var(--bg-alt);
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
}

.section-narrow {
    max-width: 640px;
}

.section h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.section p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.section p:last-child {
    margin-bottom: 0;
}

.section-sub {
    text-align: center;
    margin-bottom: 2rem !important;
}

/* ── Testimonials ── */
.testimonials-heading {
    text-align: center;
}

.testimonials {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial {
    border-left: 3px solid var(--primary);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial cite {
    font-size: 0.9375rem;
    font-style: normal;
    color: var(--text-secondary);
}

.testimonial cite strong {
    color: var(--text);
}

/* Signup section gets elevated treatment */
.section--cta {
    background: var(--primary);
    color: #fff;
    padding: 4rem 1.5rem;
}

.section--cta h2 {
    color: #fff;
    text-align: center;
}

.section--cta p {
    color: rgba(255, 255, 255, 0.9);
}

.section--cta .form-disclosure {
    color: rgba(255, 255, 255, 0.7);
}

.section--cta .form-row input[type="email"] {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.section--cta .form-row input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.section--cta .form-row input[type="email"]:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.section--cta .form-row button {
    background-color: #fff;
    color: var(--primary);
}

.section--cta .form-row button:hover {
    background-color: var(--primary-light);
}

/* ── Signup Form ── */
.signup-form {
    margin-top: 2rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.form-row input[type="email"] {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

.form-row input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row input[type="email"]:focus:valid {
    border-color: #10B981;
}

.form-row input[type="email"]:focus:invalid {
    border-color: #EF4444;
}

.form-row button {
    padding: 0.875rem 1.75rem;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s;
}

.form-row button:hover {
    background-color: var(--primary-dark);
}

.form-row button:active {
    transform: scale(0.98);
}

.form-row button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.section a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form-disclosure {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}


/* ── Footer ── */
.footer {
    background: var(--bg-dark);
    color: #94a3b8;
    text-align: center;
    padding: 3rem 1.5rem;
}

.footer-inner {
    max-width: 640px;
    margin: 0 auto;
}

.footer-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-connect {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.footer-connect a {
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px solid #475569;
    transition: color 0.2s, border-color 0.2s;
}

.footer-connect a:hover {
    color: #fff;
    border-color: #fff;
}

.footer-connect a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.footer-sep {
    margin: 0 0.5rem;
    color: #475569;
}

.footer-attribution {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.footer-attribution a {
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px solid #475569;
    transition: color 0.2s, border-color 0.2s;
}

.footer-attribution a:hover {
    color: #fff;
    border-color: #fff;
}

.footer-attribution a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.footer-copy {
    font-size: 0.8125rem;
    margin-top: 1rem;
    color: #64748b;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero {
        padding: 4rem 1.25rem 3.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-sub {
        font-size: 1.0625rem;
    }

    .section {
        padding: 3.5rem 1.25rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .section--cta {
        padding: 3rem 1.25rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row button {
        width: 100%;
    }

}

/* ── Form states ── */
.signup-form button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.signup-form.submitting button {
    position: relative;
    color: transparent;
}

.signup-form.submitting button::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

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

/* ── Thank You page ── */
.thank-you {
    text-align: center;
}

.confirmation-message {
    font-size: 1.25rem;
    margin: 2rem 0;
}

.next-steps {
    margin: 3rem auto;
    text-align: left;
    max-width: 600px;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    margin: 1rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.next-steps li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.button-link {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background-color 0.2s;
}

.button-link:hover {
    background-color: var(--primary-dark);
}

.return-home {
    margin: 3rem 0;
}
