/* transactology.org — Scandinavian institutional minimalism */

:root {
    --bg-light: #F4EFE6;       /* Birch cream */
    --bg-mid: #EAE4D8;         /* Oat warm */
    --bg-dark: #E0D8CA;        /* Linen shadow */
    --bg-footer: #D4CCC0;      /* Stone warm */
    --text-primary: #2A2620;   /* Institutional dark */
    --text-body: #4A4440;      /* Reading brown */
    --text-muted: #7A7470;     /* Muted gray */
    --accent-green: #8A9E7A;   /* Institutional green */
    --accent-forest: #5A7A6A;  /* Forest muted */
    --rule: #C4BAA8;           /* Birch line */

    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

    --content-max: 680px;
    --side-pad: 48px;
    --section-pad-y: 120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-body);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(244, 239, 230, 0.92);
    backdrop-filter: saturate(120%) blur(6px);
    -webkit-backdrop-filter: saturate(120%) blur(6px);
    transition: background 350ms ease, border-color 350ms ease;
    border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
    background: rgba(244, 239, 230, 0.96);
    border-bottom: 1px solid var(--rule);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px var(--side-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-mark {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.nav-links a {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 250ms ease;
    padding: 4px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 350ms ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* ---------- Bands ---------- */
.band {
    width: 100%;
    padding: var(--section-pad-y) 0;
    position: relative;
}

.band-identity   { background: var(--bg-light); padding-top: 200px; min-height: 100vh; display: flex; align-items: center; }
.band-about      { background: var(--bg-mid); }
.band-research   { background: var(--bg-light); }
.band-participation { background: var(--bg-dark); }
.band-footer     { background: var(--bg-footer); padding: 80px 0 48px; }

.band-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--side-pad);
    width: 100%;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Rules ---------- */
.rule {
    border: 0;
    height: 1px;
    background: var(--rule);
    margin: 28px 0;
    width: 100%;
}

.rule-thin {
    height: 1px;
}

/* ---------- Identity Band ---------- */
.band-label {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.band-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.band-lede {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.55;
    color: var(--text-body);
    margin: 28px 0 36px;
}

.band-meta {
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ---------- Common section heads ---------- */
.band-eyebrow {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.band-heading {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 36px;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.005em;
    margin-bottom: 8px;
}

.band-body {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-body);
    margin-bottom: 22px;
}

.band-body:last-of-type {
    margin-bottom: 0;
}

/* ---------- About Band Grid ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 56px;
    align-items: start;
    max-width: 920px;
}

.about-main {
    min-width: 0;
}

.about-sidebar {
    border-left: 3px solid var(--accent-green);
    padding-left: 24px;
    padding-top: 48px;
}

.sidebar-label {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.facts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fact-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
}

.fact-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.fact-row dt {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.fact-row dd {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ---------- Research Band ---------- */
.research-list {
    list-style: none;
    margin-top: 36px;
    border-top: 1px solid var(--rule);
}

.research-item {
    border-bottom: 1px solid var(--rule);
}

.research-toggle {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
        "num title more"
        "num lead lead";
    column-gap: 20px;
    row-gap: 6px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 28px 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: padding 300ms ease;
}

.research-toggle:hover {
    padding-left: 8px;
}

.research-num {
    grid-area: num;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-forest);
    padding-top: 4px;
    letter-spacing: 0.05em;
}

.research-title {
    grid-area: title;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.005em;
}

.research-lead {
    grid-area: lead;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-body);
}

.research-more {
    grid-area: more;
    align-self: start;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-forest);
    padding: 4px 0;
    position: relative;
    white-space: nowrap;
    transition: color 250ms ease;
}

.research-more::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 1px;
    background: var(--accent-forest);
    transform: scaleX(0.4);
    transform-origin: left;
    transition: transform 350ms ease;
}

.research-toggle:hover .research-more {
    color: var(--text-primary);
}

.research-toggle:hover .research-more::after {
    background: var(--text-primary);
    transform: scaleX(1);
}

.research-toggle[aria-expanded="true"] .research-more {
    color: var(--text-primary);
}

.research-toggle[aria-expanded="true"] .research-more::after {
    background: var(--text-primary);
    transform: scaleX(1);
}

.research-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 600ms ease, padding 400ms ease, opacity 500ms ease;
    opacity: 0;
    padding: 0 0 0 76px;
}

.research-item.is-open .research-body {
    max-height: 800px;
    opacity: 1;
    padding: 0 0 28px 76px;
}

.research-body p {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-body);
    max-width: 580px;
}

.research-body em {
    font-style: italic;
    color: var(--text-primary);
}

/* ---------- Participation Band ---------- */
.institute-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    margin-top: 32px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row-full {
    grid-column: 1 / -1;
}

.form-row label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule);
    padding: 8px 2px 10px;
    transition: border-color 250ms ease;
    width: 100%;
    font-weight: 400;
}

.form-row textarea {
    border: 1px solid var(--rule);
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.6;
    min-height: 120px;
}

.form-row select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 14px) 60%, calc(100% - 8px) 60%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 28px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent-green);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 12px;
    flex-wrap: wrap;
}

.form-submit {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--text-primary);
    padding: 8px 2px;
    cursor: pointer;
    transition: color 250ms ease, border-color 250ms ease, letter-spacing 350ms ease;
}

.form-submit:hover {
    color: var(--accent-forest);
    border-color: var(--accent-forest);
    letter-spacing: 0.18em;
}

.form-status {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--accent-forest);
    min-height: 18px;
}

.contact-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

.contact-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.contact-detail {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
}

/* ---------- Footer ---------- */
.band-footer .band-inner {
    max-width: 1100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--rule);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-mark {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-line {
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
}

.footer-base {
    margin-top: 40px;
    max-width: 1100px;
}

.footer-copy {
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-sidebar {
        padding-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .institute-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-pair {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .research-toggle {
        grid-template-columns: 40px 1fr;
        grid-template-areas:
            "num title"
            "num lead"
            "num more";
    }

    .research-more {
        justify-self: start;
        margin-top: 4px;
    }

    .research-body,
    .research-item.is-open .research-body {
        padding-left: 56px;
    }
}

@media (max-width: 640px) {
    :root {
        --side-pad: 24px;
        --section-pad-y: 80px;
    }

    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .nav-links {
        gap: 18px;
    }

    .band-identity {
        padding-top: 180px;
    }

    .band-title {
        font-size: 40px;
    }

    .band-lede {
        font-size: 18px;
    }

    .band-heading {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .research-title {
        font-size: 19px;
    }
}
