/* Impact Birmingham — Anthropic-style visual system */

:root {
    --ivory: #FAF9F5;
    --paper: #F0EEE6;
    --ink: #1F1E1D;
    --ink-soft: #57544D;
    --hairline: #E4E1D7;
    --clay: #D4805C;      /* sampled from the Impact Lab badge */
    --clay-deep: #BC5F38;
    --cream: #FDFCF8;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* faint paper grain */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: radial-gradient(var(--hairline) 0.5px, transparent 0.5px);
    background-size: 22px 22px;
    z-index: 0;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- header ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 24px;
    border-bottom: 1px solid var(--hairline);
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
}

.wordmark img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: block;
}

.wordmark span {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.event-chip {
    font-size: 13.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clay-deep);
    text-decoration: none;
    border: 1px solid var(--clay);
    border-radius: 999px;
    padding: 7px 16px;
    transition: background 0.18s ease, color 0.18s ease;
}

.event-chip:hover { background: var(--clay); color: var(--cream); }

/* ---------- landing hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 72px;
    align-items: center;
    padding: 88px 0 72px;
}

.kicker {
    font-size: 13.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--clay-deep);
    margin-bottom: 22px;
}

h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(42px, 5.4vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: 26px;
}

h1 em {
    font-style: italic;
    color: var(--clay-deep);
}

.lede {
    font-size: 19px;
    color: var(--ink-soft);
    max-width: 46ch;
    margin-bottom: 36px;
}

.event-line {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    border-top: 1px solid var(--hairline);
    padding-top: 26px;
    font-size: 15px;
    color: var(--ink-soft);
}

.event-line strong {
    display: block;
    font-family: var(--serif);
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

/* ---------- login card ---------- */

.login-card {
    background: var(--cream);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 40px 38px 36px;
    box-shadow: 0 24px 60px -36px rgba(31, 30, 29, 0.35);
}

.login-card .badge {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    display: block;
    margin: 0 auto 26px;
    box-shadow: 0 10px 28px -14px rgba(188, 95, 56, 0.55);
}

.login-card h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 24px;
    text-align: center;
    margin-bottom: 6px;
}

.login-card .hint {
    text-align: center;
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: 28px;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--ivory);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--clay);
    box-shadow: 0 0 0 3px rgba(212, 128, 92, 0.18);
}

.btn {
    width: 100%;
    font: inherit;
    font-weight: 600;
    color: var(--cream);
    background: var(--ink);
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.18s ease, transform 0.12s ease;
}

.btn:hover { background: var(--clay-deep); }
.btn:active { transform: scale(0.985); }

.error {
    background: rgba(188, 95, 56, 0.1);
    border: 1px solid rgba(188, 95, 56, 0.35);
    color: var(--clay-deep);
    border-radius: 10px;
    font-size: 14.5px;
    padding: 10px 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* ---------- interior (about) ---------- */

.article {
    max-width: 720px;
    padding: 72px 0 96px;
}

.article h1 { font-size: clamp(36px, 4.5vw, 52px); }

.article .kicker { margin-bottom: 18px; }

.article p {
    color: var(--ink-soft);
    margin-bottom: 22px;
    font-size: 18px;
}

.article .rule {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 40px 0;
}

.placeholder {
    background: var(--paper);
    border: 1px dashed var(--clay);
    border-radius: 14px;
    padding: 26px 28px;
    color: var(--ink-soft);
    font-size: 16px;
}

.placeholder strong { color: var(--clay-deep); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-actions .signed-in {
    font-size: 14.5px;
    color: var(--ink-soft);
}

.link-quiet {
    color: var(--clay-deep);
    font-size: 14.5px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.link-quiet:hover { border-color: var(--clay-deep); }

/* ---------- research paper ---------- */

.paper { max-width: 860px; }

.paper h1 {
    font-size: clamp(34px, 4.2vw, 48px);
    margin-top: 48px;
}

.paper h1 + h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: 20px;
    color: var(--ink-soft);
    margin: -14px 0 18px;
}

.paper h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 30px;
    letter-spacing: -0.01em;
    margin: 56px 0 18px;
    padding-top: 26px;
    border-top: 1px solid var(--hairline);
}

.paper h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    margin: 36px 0 12px;
}

.paper p { font-size: 17px; }

.paper ul, .paper ol {
    color: var(--ink-soft);
    margin: 0 0 22px 24px;
    font-size: 17px;
}

.paper li { margin-bottom: 10px; }

.paper li p { margin-bottom: 8px; }

.paper strong { color: var(--ink); }

.paper em { font-style: italic; }

.paper a {
    color: var(--clay-deep);
    text-decoration: none;
    border-bottom: 1px solid rgba(188, 95, 56, 0.35);
    transition: border-color 0.15s ease;
}

.paper a:hover { border-color: var(--clay-deep); }

.paper blockquote {
    background: rgba(212, 128, 92, 0.08);
    border: 1px solid rgba(188, 95, 56, 0.4);
    border-left: 4px solid var(--clay-deep);
    border-radius: 12px;
    padding: 22px 26px;
    margin: 0 0 28px;
}

.paper blockquote p {
    margin-bottom: 10px;
    font-size: 16px;
}

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

.paper hr {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 44px 0;
}

.paper h2 + hr, .paper hr + hr { display: none; }

.table-scroll {
    overflow-x: auto;
    margin: 0 0 26px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--cream);
}

.paper table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
    line-height: 1.45;
}

.paper th, .paper td {
    text-align: left;
    padding: 11px 16px;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
    min-width: 90px;
}

.paper th {
    font-family: var(--sans);
    font-size: 12.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: var(--paper);
}

.paper tr:last-child td { border-bottom: none; }

.paper code {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 1px 6px;
}

/* the in-document table of contents list */
.paper .toc-list { list-style: none; margin-left: 0; }

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--hairline);
    padding: 26px 0 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--ink-soft);
}

.site-footer a { color: var(--clay-deep); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- load animation ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.16s; }
.rise-3 { animation-delay: 0.27s; }
.rise-4 { animation-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
    .rise { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 56px 0;
    }
    .login-card { max-width: 460px; }
}

@media (max-width: 560px) {
    .page { padding: 0 20px; }
    .site-header { flex-direction: column; gap: 16px; }
    .event-line { gap: 18px; }
}
