:root {
    --cream: #faf7f2;
    --paper: #ffffff;
    --ink: #1a1a1a;
    --muted: #5a5a5a;
    --rule: #d9d2c4;
    --navy: #1e3a5f;
    --navy-dark: #142a46;
    --bronze: #8a6a3a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.ui-font {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container--wide {
    max-width: 960px;
}

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy-dark); }

header.site {
    border-bottom: 1px solid var(--rule);
    padding: 1rem 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

header.site .container { display: flex; justify-content: space-between; align-items: center; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 1.25rem; }
header.site nav a:hover { color: var(--navy); }
header.site .brand { color: var(--ink); letter-spacing: 0.12em; }

.hero {
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--rule);
}

.hero .eyebrow {
    font-family: system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.05;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
    font-weight: 700;
}

.hero .subtitle {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    color: var(--muted);
    font-style: italic;
    margin: 0 0 2rem;
    max-width: 32ch;
}

.hero .hook {
    font-size: 1.15rem;
    line-height: 1.55;
    max-width: 58ch;
    color: var(--ink);
    border-left: 3px solid var(--navy);
    padding-left: 1.25rem;
    margin: 0 0 2.5rem;
}

.signup {
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.signup h3 {
    margin: 0 0 0.35rem;
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.signup p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

.signup form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.signup input[type=email] {
    flex: 1 1 240px;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--rule);
    background: var(--cream);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    border-radius: 2px;
}
.signup input[type=email]:focus {
    outline: 2px solid var(--navy);
    outline-offset: -1px;
    background: var(--paper);
}
.signup button {
    padding: 0.75rem 1.4rem;
    background: var(--navy);
    color: var(--paper);
    border: 0;
    font-family: system-ui, sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
}
.signup button:hover { background: var(--navy-dark); }
.signup .hp { position: absolute; left: -9999px; }
.signup .msg { margin-top: 0.75rem; font-size: 0.9rem; }
.signup .msg.ok { color: #2b6144; }
.signup .msg.err { color: #8a1f1f; }

section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--rule);
}

section:last-of-type { border-bottom: 0; }

.section-label {
    font-family: system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    margin: 0 0 2rem;
    letter-spacing: -0.01em;
}

.prose h1 { display: none; }
.prose h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.005em;
}
.prose h3 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.prose p { margin: 0 0 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; padding: 0; }
.prose li { margin-bottom: 0.35rem; }
.prose hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 2.5rem auto;
    width: 40%;
}
.prose .cite {
    font-family: system-ui, sans-serif;
    font-size: 0.78rem;
    color: var(--muted);
    font-style: normal;
}
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem 1rem;
    margin: 1.5rem 0 2rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    font-family: Georgia, serif;
    font-size: 1.1rem;
    flex-wrap: wrap;
}
.formula .op { color: var(--muted); }
.formula .frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.formula .frac .num { border-bottom: 1px solid var(--ink); padding: 0 0.5rem 0.15rem; }
.formula .frac .den { padding: 0.15rem 0.5rem 0; }

.author {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: start;
}
.author-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 2px;
    border: 1px solid var(--rule);
    background: var(--paper);
}
.author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(1.02);
}
.author .bio { font-size: 1rem; }
.author .bio p { margin: 0 0 1rem; }
.author .bio p:first-child strong { font-size: 1.1rem; }

@media (max-width: 600px) {
    .author { grid-template-columns: 1fr; gap: 1.5rem; }
    .author-photo { max-width: 220px; }
    .hero { padding: 3rem 0 2.5rem; }
}

.gate {
    max-width: 560px;
    margin: 3rem auto 1rem;
    padding: 2.25rem 2rem;
    background: var(--paper);
    border: 1px solid var(--navy);
    border-top: 3px solid var(--navy);
    border-radius: 2px;
    text-align: center;
}
.gate .gate-label {
    font-family: system-ui, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 0.75rem;
}
.gate h3 {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0 0 0.9rem;
    color: var(--navy-dark);
    font-weight: 700;
}
.gate p {
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 0.98rem;
}
.gate form { justify-content: center; }
.gate form input[type=email] { flex: 1 1 260px; }
.gate .msg { text-align: center; }

.unlock-note {
    margin: 2.5rem auto 2rem;
    max-width: 560px;
    padding: 0.9rem 1.25rem;
    background: #eef2ee;
    border-left: 3px solid #2b6144;
    color: #2b6144;
    font-family: system-ui, sans-serif;
    font-size: 0.92rem;
    border-radius: 2px;
}

footer.site {
    padding: 3rem 0 4rem;
    background: var(--navy);
    color: var(--paper);
}
footer.site .container { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { footer.site .container { grid-template-columns: 1fr; } }
footer.site h4 {
    font-family: system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    color: #c9b78a;
    font-weight: 600;
}
footer.site p { margin: 0 0 1rem; color: #d6dae2; font-size: 0.95rem; }
footer.site a { color: var(--paper); }

footer.site .signup { background: transparent; border-color: rgba(255,255,255,0.2); padding: 0; }
footer.site .signup input[type=email] {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: var(--paper);
}
footer.site .signup input[type=email]::placeholder { color: rgba(255,255,255,0.5); }
footer.site .signup button { background: #c9b78a; color: var(--navy-dark); }
footer.site .signup button:hover { background: #e0cfa3; }

footer.site .colophon {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.5rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
