/* tempmail.nl theme ("the letterbox by the door"). Ink navy, post red for actions only, brass for live status.
 * Signature: airmail stripe edge + a postmark that stamps the address with its expiry time.
 * Archivo (sturdy label face) + Karla, self-hosted from the zonderslop kit. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/karla-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/karla-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/karla-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --bg: #f8f4ec;
    --surface: #ffffff;
    --surface-alt: #efe6d6;
    --text: #1c2a3a;
    --muted: #55606e;
    --border: #e1d7c5;
    --brand: #1c2a3a;
    --brand-deep: #121c27;
    --on-brand: #f3eee4;
    --accent: #b8321c;          /* post red: buttons and link hover only (white text 5.6:1) */
    --accent-hover: #962816;
    --accent-text: #ffffff;
    --airmail-blue: #2a5298;
    --brass: #c99a3b;           /* live status only */
    --picto-bg: #1c2a3a;
    --unread: #fbf1df;
    --error: #b42318;
    --link: #1f4f8f;
    --radius: 10px;
    --radius-sm: 6px;
    --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #11171f;
        --surface: #19212c;
        --surface-alt: #1f2935;
        --text: #ece6da;
        --muted: #a2abb7;
        --border: #2c3744;
        --unread: #2a2a22;
        --error: #f97066;
        --link: #8fb4ea;
        --picto-bg: #2a3c52;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.55 var(--font-body);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 3.2vw + 1rem, 3.1rem); margin: 0 0 .4em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.35rem, 1vw + 1rem, 1.75rem); margin: 0 0 .8em; }
h3 { font-size: 1.1rem; margin: 0 0 .35em; }
p { margin: 0 0 .8em; }

a { color: var(--link); }
a:hover { color: var(--accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 40px; padding-bottom: 56px; }
.page--narrow { max-width: 820px; }

/* ---------- Header ---------- */
.site-header { background: var(--brand); color: var(--on-brand); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.logo { font: 700 1.45rem/1 var(--font-display); color: inherit; text-decoration: none; margin: 0; }
.logo span { color: var(--brass); }
.site-header nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-weight: 600; }
.site-header nav a { color: var(--on-brand); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass); }

/* ---------- Hero: real photo, text bottom-left, the address card is part of it ---------- */
.hero { position: relative; isolation: isolate; color: #fff; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(to right, color-mix(in srgb, var(--brand-deep) 86%, transparent) 0%, color-mix(in srgb, var(--brand-deep) 55%, transparent) 55%, color-mix(in srgb, var(--brand-deep) 20%, transparent) 100%),
        linear-gradient(to top, color-mix(in srgb, var(--brand-deep) 60%, transparent), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 48px; align-items: end; padding-top: 72px; padding-bottom: 64px; }
.hero__grid--single { grid-template-columns: minmax(0, 1fr); }
.hero--compact .hero__grid { padding-top: 96px; padding-bottom: 48px; }
.hero__text { max-width: 36rem; }
.hero h1 { color: #fff; }
.hero__lead { font-size: clamp(1.05rem, .4vw + 1rem, 1.25rem); opacity: .95; }
.hero__credit { position: absolute; right: 12px; bottom: 6px; margin: 0; font-size: .72rem; opacity: .75; }

.trust { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 28px 0 0; padding: 16px 0 0; border-top: 1px solid rgb(255 255 255 / .35); }
.trust div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.trust dt { font-size: .88rem; opacity: .85; }
.trust dd { margin: 0; font: 700 1.8rem/1.1 var(--font-display); }

/* ---------- Address card: an envelope with an airmail edge and a postmark ---------- */
.address-card {
    position: relative;
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 30px 24px 22px;
    box-shadow: 0 18px 40px rgb(0 0 0 / .28);
    overflow: hidden;
}
.address-card::before, .site-footer::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
    background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, transparent 14px 20px, var(--airmail-blue) 20px 34px, transparent 34px 40px);
}
.postmark { position: absolute; bottom: 10px; right: 10px; width: 100px; height: 100px; color: var(--accent); opacity: .55; transform: rotate(-14deg); pointer-events: none; font-family: var(--font-display); }
.label { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); margin: 0 0 10px; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.address-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.address-card .meta, .address-card .recovery { padding-right: 100px; }
.address-card .recovery[open] { padding-right: 0; }
.address-row code { font: 700 clamp(1.2rem, 1.2vw + 1rem, 1.55rem)/1.25 var(--font-display); overflow-wrap: anywhere; }
code.small { font-size: .8rem; overflow-wrap: anywhere; display: block; margin-bottom: 8px; }
.recovery { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.recovery summary { cursor: pointer; color: var(--link); font-size: .92rem; font-weight: 600; }

/* ---------- Buttons and forms ---------- */
.button {
    font: inherit; font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    cursor: pointer;
}
.button:hover { border-color: var(--text); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.small { padding: 4px 10px; font-size: .875rem; }
.button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.address-input { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.address-input input, .address-input select {
    font: inherit;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    min-width: 0;
}
.address-input input { flex: 1 1 160px; }
.error { color: var(--error); margin: 0 0 12px; }

/* ---------- Panels (inbox, message, docs) ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.panel h2 { display: flex; align-items: center; gap: 10px; }

.message-list { list-style: none; margin: 0; padding: 0; }
.message-list li { border-top: 1px solid var(--border); }
.message-list li:first-child { border-top: 0; }
.message-list li.unread { background: var(--unread); font-weight: 700; }
.message-list li.empty { color: var(--muted); padding: 14px 0; }
.message-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 10px; color: inherit; text-decoration: none; }
.message-list a:hover { background: var(--surface-alt); }
.message-list .from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-list .subject { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 400; }
.message-list time { grid-row: 1; grid-column: 2; color: var(--muted); font-size: .875rem; font-weight: 400; }
.poll-status { font: 400 .85rem var(--font-body); color: var(--muted); }

.back { margin: 0 0 16px; }
.message-body { width: 100%; min-height: 60vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.attachments { padding-left: 20px; }

/* ---------- Pictograms: white on an ink tile ---------- */
.picto { width: 56px; height: 56px; flex: none; padding: 9px; border-radius: 12px; background: var(--picto-bg); color: #fff; }
.picto--small { width: 34px; height: 34px; padding: 6px; border-radius: 8px; }

/* ---------- Content blocks ---------- */
.block { margin: 56px 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; }
.steps li .picto { margin-bottom: 14px; }
.steps li::before {
    content: counter(step);
    position: absolute; left: 44px; top: -8px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brass); color: var(--brand-deep);
    font: 700 .85rem/26px var(--font-display); text-align: center;
}
.steps p { color: var(--muted); margin: 0; }
.steps--api { margin-bottom: 40px; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--muted); margin: 0; }
.card--link { border-color: var(--brand); }
.card--link:hover { box-shadow: 0 10px 24px rgb(28 42 58 / .16); color: inherit; }
.card__more { margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--accent); }

.facts { background: var(--surface-alt); border-radius: var(--radius); padding: 32px 28px; }
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; }
.fact-list li { display: flex; gap: 16px; align-items: flex-start; }
.fact-list p { margin: 0; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.faq details p { margin: 10px 0 0; color: var(--muted); max-width: 46rem; }

/* ---------- Docs ---------- */
.doc h2 { margin-top: 1.6em; }
.doc h2:first-child { margin-top: 0; }
.doc .meta { color: var(--muted); font-size: .9rem; }
.doc li { margin-bottom: 6px; }
.notice { background: var(--surface-alt); border-left: 4px solid var(--brass); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 1.4em; }
.doc pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; font-size: .85rem; }
.doc code { font-size: .9em; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 8px; border-top: 1px solid var(--border); vertical-align: top; }

.credits { list-style: none; padding: 0; margin: 0; }
.credits li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.credits img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); flex: none; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--brand); color: var(--on-brand); padding: 40px 0 32px; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--on-brand); }
.site-footer a:hover { color: #fff; }
.site-footer address { font-style: normal; opacity: .9; }
.site-footer address p { margin: 0 0 10px; }
.site-footer .logo { margin-bottom: 10px; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
    .hero__grid { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 40px; }
    .steps, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero::before { background: linear-gradient(to top, color-mix(in srgb, var(--brand-deep) 92%, transparent) 0%, color-mix(in srgb, var(--brand-deep) 72%, transparent) 60%, color-mix(in srgb, var(--brand-deep) 50%, transparent) 100%); }
    .hero__grid { padding-top: 32px; }
    .trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
    .trust dd { font-size: 1.4rem; }
    .trust dt { font-size: .82rem; line-height: 1.3; }
    .address-card { padding: 26px 18px 18px; }
    .postmark { width: 76px; height: 76px; bottom: 8px; right: 6px; }
    .address-card .meta, .address-card .recovery { padding-right: 76px; }
    .steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; }
    .steps li .picto { grid-row: span 2; margin: 0; }
    .steps li::before { left: 36px; }
    .steps, .fact-list { grid-template-columns: minmax(0, 1fr); }
    .cards { grid-template-columns: minmax(0, 1fr); }
    .card img { aspect-ratio: 16 / 9; }
    .facts { padding: 24px 18px; }
    .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
    .panel { padding: 18px; }
}
