/* Public landing at / (signed out). Tokens match static/login.css (paper, ink, forest, Ledger stage);
   no hairline rules, shadows or gradients. Running text stays in full ink; the hero is the one dark field. */
:root {
    --font-display: "Fraunces", Georgia, serif;
    --font-ui: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ground: #f5f3ed;
    --ground-deep: #ebe8df;
    --ink: #26322e;
    --muted: #4f5a53;
    --accent: #173d32;
    --on-accent: #fbfaf6;
    --gold: #d9b877;
    --stage: #0d1410;
    --stage-ink: #f1efe6;
    --stage-mute: #b3bfb4;
    --gutter: clamp(16px, 4.4vw, 56px);
    --measure: 1200px;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

:root:not([data-theme="light"]) {
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground: #101814;
        --ground-deep: #17231c;
        --ink: #eef1e8;
        --muted: #b3bcb2;
        --accent: #9fd3b8;
        --on-accent: #102e26;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --ground: #101814;
    --ground-deep: #17231c;
    --ink: #eef1e8;
    --muted: #b3bcb2;
    --accent: #9fd3b8;
    --on-accent: #102e26;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 17px;
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--gold);
    color: var(--stage);
    padding: 10px 14px;
    z-index: 10;
}
.skip:focus { left: 16px; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* header */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px var(--gutter);
    max-width: var(--measure);
    margin: 0 auto;
}
.mark {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.links a { color: var(--ink); text-decoration: none; font-size: 0.98rem; }
.links a:hover { text-decoration: underline; }
.links .sign-in {
    background: var(--accent);
    color: var(--on-accent);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
}
.links .sign-in:hover { text-decoration: none; opacity: .9; }

/* hero: the one dark field, full width (overrides the centred `main section` measure) */
.hero {
    max-width: none;
    margin: 0;
    background: var(--stage);
    color: var(--stage-ink);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    padding-block: clamp(56px, 9vw, 128px);
    padding-inline: calc(max(0px, (100% - var(--measure)) / 2) + var(--gutter));  /* the header's own edge: centred measure plus gutter */
}
.hero-copy { max-width: 640px; justify-self: start; }
.hero h1 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.8rem, 6.6vw, 6.2rem);
    line-height: .96;
    letter-spacing: -0.035em;
    margin: 0 0 28px;
    color: var(--stage-ink);
}
.hero .lede {
    font-size: clamp(1.1rem, 1.6vw, 1.32rem);
    line-height: 1.5;
    margin: 0 0 36px;
    color: var(--stage-ink);
    max-width: 26em;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold); color: var(--stage); }
.btn.ghost { color: var(--stage-ink); box-shadow: inset 0 0 0 1.5px rgba(241, 239, 230, .45); }

.globe {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1;
    justify-self: end;
    display: block;
}

/* sections */
main section {
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(72px, 10vw, 150px) var(--gutter) 0;
}
h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.1rem, 4.2vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
}
h3 {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px;
}
.intro { font-size: 1.12rem; max-width: 24em; margin: 0 0 36px; color: var(--ink); }
.note, .meta, .figure { color: var(--muted); font-size: 0.95rem; max-width: 24em; }
.more { margin: 28px 0 0; font-weight: 600; }

/* registries table: real table, no lines */
.registry-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
}
.registry-table th, .registry-table td {
    text-align: right;
    padding: 18px 12px;
    vertical-align: baseline;
}
.registry-table thead th {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    padding-top: 0;
}
.registry-table tbody tr:nth-child(odd) { background: var(--ground-deep); }
.registry-table th[scope="row"], .registry-table thead th:first-child { text-align: left; }
.registry-table th[scope="row"] { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; }
.registry-table th[scope="row"] a { text-decoration: none; }
.registry-table th[scope="row"] a:hover { text-decoration: underline; }
.registries .note { margin-top: 22px; }

/* country split */
.split {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 40px clamp(40px, 6vw, 110px);
    align-items: start;
}
.plain-list, .type-list, .article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.plain-list li, .type-list li, .article-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 12px 0;
    font-size: 1.1rem;
}
.plain-list li a, .type-list li a { font-weight: 600; }
.plain-list li:nth-child(odd), .type-list li:nth-child(odd) { background: var(--ground-deep); padding-left: 14px; padding-right: 14px; }

/* types band: a field of the second tone */
.types {
    background: var(--ground-deep);
    margin-top: clamp(72px, 10vw, 150px);
    padding-bottom: clamp(72px, 10vw, 150px);
    max-width: none;
}
.types > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.types .intro, .types h2 { max-width: var(--measure); }
.type-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 48px;
    max-width: var(--measure);
}
.type-list li { border-bottom: 0; background: none; padding: 14px 0; }

/* features: prose, four blocks, no cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px clamp(40px, 6vw, 96px);
}
.feature-grid p { margin: 0; font-size: 1.08rem; max-width: 24em; }

/* Ledger list */
.article-list li { display: block; padding: 18px 0; }
.article-list li a { font-family: var(--font-display); font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.2; font-weight: 500; color: var(--ink); text-decoration: none; }
.article-list li a:hover { text-decoration: underline; }
.article-list .figure { display: block; margin-top: 6px; }

/* about, definitions, faq */
.about p { max-width: 24em; font-size: 1.08rem; }
.definitions {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 14px 28px;
    margin: 36px 0 28px;
    max-width: 32em;
}
.definitions dt { font-weight: 700; }
.definitions dd { margin: 0; color: var(--ink); }
.faq-list { margin: 0; max-width: 24em; }
.faq-list dt { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; margin: 36px 0 10px; line-height: 1.2; }
.faq-list dd { margin: 0; font-size: 1.05rem; }

/* footer: the name returns at full width */
.foot {
    margin-top: clamp(96px, 12vw, 180px);
    background: var(--stage);
    color: var(--stage-ink);
    padding: clamp(48px, 7vw, 96px) var(--gutter) 40px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 20px 0 28px; }
.foot a { color: var(--stage-ink); }
.foot .meta { color: var(--stage-mute); margin: 0; }
.mark-large {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 14vw, 13rem);
    line-height: .9;
    letter-spacing: -0.04em;
    margin: 0;
    word-break: break-word;
}

/* motion: the hero's copy rises once; without motion it simply shows */
@media (prefers-reduced-motion: no-preference) {
    .hero-copy > * { animation: rise .9s var(--ease) both; }
    .hero-copy > :nth-child(2) { animation-delay: .08s; }
    .hero-copy > :nth-child(3) { animation-delay: .16s; }
    .globe { animation: rise 1.1s var(--ease) .1s both; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* sections rise into view once. Hidden only when script has set .js, so with no script or reduced motion they simply show. */
@media (prefers-reduced-motion: no-preference) {
    .reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
    .js .reveal:not(.in) { opacity: 0; transform: translateY(24px); }
}

/* phone: one column, the registry table becomes stacked rows */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .globe { justify-self: center; max-width: 420px; order: 2; }
    .split, .feature-grid { grid-template-columns: 1fr; }
    .type-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .top { flex-direction: column; align-items: flex-start; padding-top: 16px; }
    .links { gap: 14px 18px; }
    .hero { padding-top: 44px; gap: 40px; }
    .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
    .actions .btn { flex: 1 1 100%; justify-content: center; }
    .registry-table thead { display: none; }
    .registry-table, .registry-table tbody, .registry-table tr, .registry-table th, .registry-table td { display: block; width: 100%; }
    .registry-table tbody tr { padding: 18px 14px; margin-bottom: 0; }
    .registry-table th[scope="row"] { padding: 0 0 8px; text-align: left; }
    .registry-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        text-align: right;
        padding: 4px 0;
        font-size: 1rem;
    }
    .registry-table td::before { content: attr(data-label); color: var(--muted); font-weight: 400; text-align: left; }
    .registry-table th[scope="row"] { font-size: 1.5rem; }
    .plain-list li, .type-list li { font-size: 1.02rem; }
    .definitions { grid-template-columns: 1fr; gap: 4px; }
    .definitions dt { margin-top: 14px; }
}
