/* ═══════════════════════════════════════════════════════════════════
   base.css — shared design foundation for all pages
   Extracted from the homepage (index.html) inline <style> block.

   Pages should:
     1. Load header.css (shared nav)
     2. Load base.css (this file)
     3. Load the homepage Google Fonts triplet (Newsreader, Plus Jakarta
        Sans, Caveat)
     4. Add a page-specific <style> block for layout/sections only.

   index.html now also loads base.css — this is the single source of
   truth for tokens, reset, utilities, buttons, and footer. No drift
   to maintain.
   Note: `.lede` is a top-level default here; index.html scopes `.lede`
   per section (e.g. `.hero-split .copy .lede`, `.paths-head .lede`).
   Section-scoped rules in index.html override this default, which is
   intended.

   Do NOT add dark-mode CSS here — the design is intentionally
   light-only. The header is dark-mode aware via header.css's own
   :root[data-theme="dark"] block; that's separate.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --primary-light: #ccf0fc;
    --primary: #22b5dd;
    --primary-deep: #1995b8;
    --secondary-light: #dbf4f9;
    --secondary: #4ec4e4;
    --accent: #dd4a22;
    --accent-soft: #f4cabd;
    --bg: #fbfbfe;
    --bg-warm: #f8f4ec;
    --paper: #ffffff;
    --ink: #050316;
    --ink-2: #2a2740;
    --muted: #4b5563;
    --muted-2: #7a7a8a;
    --line: rgba(5, 3, 22, 0.08);
    --line-strong: rgba(5, 3, 22, 0.14);

    --font-display: "Newsreader", "Lora", Georgia, serif;
    --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --font-script: "Caveat", "Newsreader", cursive;

    --max: 1200px;
    --rad-sm: 10px;
    --rad: 18px;
    --rad-lg: 28px;
    --rad-xl: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ─── Typography utilities ─────────────────────────────────────── */
.display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.05;
    text-wrap: balance;
}
.display em { font-style: italic; font-weight: 400; }
.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-deep);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--primary);
    display: inline-block;
}
.script {
    font-family: var(--font-script);
    font-weight: 500;
    color: var(--accent);
}
/* Sensible default; sections can override via .section .lede { ... } */
.lede {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.65;
    max-width: 640px;
}

/* ─── Button system ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--ink);
    color: var(--paper);
}
.btn-primary:hover {
    background: var(--primary-deep);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(34, 181, 221, 0.55);
}
.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.btn .arrow { display: inline-block; transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Footer ───────────────────────────────────────────────────── */
.footer {
    background: var(--ink);
    color: var(--paper);
    padding: 80px 28px 36px;
}
.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 56px;
}
.footer h5 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 18px;
}
.footer .brand-mark {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.footer .brand-mark em { font-style: italic; color: var(--secondary); }
.footer .brand-blurb {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 22px;
}
.footer .signup-row {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 360px;
}
.footer .signup-row input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--paper);
    font: inherit;
    padding: 10px 14px;
    font-size: 14px;
    min-width: 0;
}
.footer .signup-row input::placeholder { color: rgba(255, 255, 255, 0.45); }
.footer .signup-row button {
    background: var(--paper);
    color: var(--ink);
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
}
.footer .signup-row button:hover { background: var(--secondary); }
.footer .footer-subscribe {
    background: var(--paper);
    color: var(--ink);
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}
.footer .footer-subscribe:hover { background: var(--secondary); }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.2s ease;
}
.footer ul a:hover { color: var(--paper); }
.footer .legal {
    max-width: var(--max);
    margin: 56px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}
.footer .legal a { color: rgba(255, 255, 255, 0.65); text-decoration: none; margin-left: 18px; }
.footer .legal a:hover { color: var(--paper); }

@media (max-width: 980px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; }
}

/* Signup modal — injected by signups.js, triggered by .signup-trigger */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 22, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--paper);
    border-radius: var(--rad);
    width: 100%;
    max-width: 500px;
    padding: 36px 32px 32px;
    box-shadow: 0 30px 60px -20px rgba(5, 3, 22, 0.4);
    position: relative;
    transform: translateY(16px);
    transition: transform 0.25s ease;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: 0;
    color: var(--muted-2);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover {
    background: var(--bg-warm);
    color: var(--ink);
}
.modal-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 6px;
}
.modal-content > p {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 24px;
}
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-2);
}
.form-group input,
.form-group textarea {
    font: inherit;
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.form-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    display: none;
}
.form-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}
.btn-lg {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 12px;
    justify-content: center;
    align-self: stretch;
}
