/* Néray Katalin digitális archívum — after the conference identity
   (workspace/design): black on white, Fustat, DM Mono for numbers, thin rules
   between rows. Wide screens put a page's sections side by side; below 700px
   everything is one column. */

@font-face { font-family: "Fustat"; src: url("fonts/Fustat-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Fustat"; src: url("fonts/Fustat-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fustat"; src: url("fonts/Fustat-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fustat"; src: url("fonts/Fustat-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fustat"; src: url("fonts/Fustat-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face {
    font-family: "DM Mono";
    src: url("fonts/DMMono-Light.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "DM Mono";
    src: url("fonts/DMMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --text: #000;
    --muted: #555;
    --bg: #fff;
    --line: 1px solid #000;
    --rule: 4px solid #000;
    --sans: "Fustat", system-ui, sans-serif;
    --mono: "DM Mono", ui-monospace, monospace;
    --gutter: 40px;
    --width: 1200px;
    --label: 128px;    /* year / abbreviation column in list rows */
    --col-gap: 72px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/24px var(--sans);
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

.sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.site-header,
.site-main,
.site-footer {
    max-width: var(--width);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* Header: site name and language on one line, the numbered menu below it,
   a heavy rule under both. */
.site-header { padding-top: 20px; }
.site-header::after { content: ""; display: block; border-bottom: var(--rule); margin-top: 16px; }
.home .site-header::after { margin-top: 20px; }

.site-bar { display: flex; align-items: baseline; gap: 24px; }
.site-title { font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-right: auto; }

.lang-switcher { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; font: 300 11px/16px var(--mono); }
.lang-switcher [aria-current] { font-weight: 400; text-decoration: underline; text-underline-offset: .25em; }

.site-nav { margin-top: 20px; }
.site-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.site-nav a { display: block; font-size: 13px; line-height: 20px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.site-nav .szam { font: 300 11px/20px var(--mono); margin-right: 4px; }
.site-nav .current a { text-decoration: underline; text-underline-offset: .3em; }

.nav-toggle, .nav-close, .nav-backdrop { display: none; }
.nav-toggle, .nav-close { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }

/* Breadcrumbs */
.breadcrumbs ol { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: .02em; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; }

/* Page title: section number, then the title in large capitals. */
.site-main { padding-bottom: 96px; }
.page-head { display: flex; align-items: baseline; gap: 0 48px; padding: 80px 0 64px; }
.page-head .szam { flex: none; font: 300 13px/20px var(--mono); }
/* --cim is the title size; the subtitle (alcim) is sized from it. */
body { --cim: 24px; }
.tpl-szoveg, .tpl-tetel, .tpl-galeria { --cim: 20px; }
h1 { margin: 0; font-size: var(--cim); line-height: 1.17; font-weight: 500; letter-spacing: -.023em; text-transform: uppercase; overflow-wrap: anywhere; hyphens: auto; }
.tpl-szoveg h1, .tpl-tetel h1, .tpl-galeria h1 { text-transform: none; line-height: 1.2; letter-spacing: -.02em; }
.breadcrumbs + .page-head { padding-top: 40px; }

.bevezeto { max-width: 720px; margin-bottom: 48px; }
.bevezeto > :first-child { margin-top: 0; }
.bevezeto > :last-child { margin-bottom: 0; }

.meta { margin: 4px 0 0; font-size: 13px; line-height: 20px; }
article > .meta { margin: -40px 0 40px; }
.leiras { margin: 4px 0 0; font-size: 13px; line-height: 20px; }
.hivatkozas { margin: 2em 0 0; font-style: italic; }
.hivatkozas cite { font-style: inherit; }
.lang-note { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }

/* Text pages */
article { max-width: 720px; }
article p, .bevezeto p { margin: 0 0 1em; }
article h2, article h3 { font-size: 15px; line-height: 24px; font-weight: 700; margin: 2em 0 .5em; }

/* Sections of a page: small capitals over a rule, side by side when wide.
   `columns` lets a short section and a long one share a column, as in the
   design (memberships + trusteeships left, awards right). */
.szakaszok { margin-top: 16px; }
.szakaszok--hasab { columns: 2; column-gap: var(--col-gap); }
.szakasz { break-inside: avoid; margin: 0 0 80px; }
.szakasz:last-child { margin-bottom: 0; }
.szakaszok--hasab .szakasz { display: inline-block; width: 100%; margin-bottom: 80px; } /* Safari ignores break-inside on blocks */
.szakasz-cim, .csoport-cim, .galeria-cim {
    margin: 0 0 28px;
    font-size: 11px; line-height: 16px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .02em;
}
.szakasz-cim { padding-top: 4px; }
.szakasz .bevezeto { margin-bottom: 28px; }

.csoport + .csoport, .lista + .csoport { margin-top: 48px; }

/* List rows */
.lista { list-style: none; margin: 0; padding: 0; }
.elem { border-top: var(--line); padding: 14px 0 15px; }
.lista--jeles .elem { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); gap: 0 16px; }
.elem-jel { font-size: 13px; line-height: 24px; font-weight: 300; overflow-wrap: anywhere; }
.elem-cim { margin: 0; font-weight: 500; }
.page-head .alcim { margin: 0; font-size: calc(var(--cim) * .5); line-height: 1.25; }
.elem .alcim { font-size: 13px; line-height: 20px; font-weight: 300; margin-top: 4px; }
.elem .dokumentumok { margin-top: 6px; }
.elem .hivatkozas { display: none; } /* in the markup, not shown in lists for now */

/* Icons to a row's text, documents and photos */
.ikonok { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ikonok a { display: block; padding: 2px; }
.ikonok a:hover { text-decoration: none; background: #000; color: #fff; }
.ikonok svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linejoin: round; }
.ikonok svg text { fill: currentColor; stroke: none; font: 600 4.2px var(--sans); letter-spacing: .02em; }
.ikonok svg circle { fill: currentColor; stroke: none; }

/* Sub-pages as rows (separate lists, the home menu): title, count right. */
.rovatok { list-style: none; margin: 0 0 64px; padding: 0; border-bottom: var(--line); }
.rovatok li { border-top: var(--line); }
.rovatok a { display: flex; align-items: baseline; gap: 8px 32px; padding: 28px 0 32px; font-weight: 500; }
.rovatok .title { margin-right: auto; }
.szamlalo, .alrovatok { font-size: 13px; line-height: 20px; font-weight: 300; text-align: right; }

/* Documents */
.dokumentumok { list-style: none; margin: 0 0 24px; padding: 0; font-size: 13px; line-height: 20px; }
.dokumentumok li { padding: 2px 0; }
.dokumentumok a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.dokumentumok small { font: 300 11px/16px var(--mono); }
article .dokumentumok { margin-top: 32px; }

/* Photos: edge-to-edge tiles with a hairline between. A strip (gallery
   section of a list) shows the first few without captions, and a gallery
   page shows a mosaic of square thumbnails; the caption is still read by
   the lightbox. */
.fotok {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2px;
    margin: 32px 0 0;
}
article .fotok, .tpl-galeria .fotok { max-width: none; }
.fotok figure { margin: 0; }
.fotok a { display: block; }
.fotok img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #eee; }
.fotok figcaption { font-size: 13px; line-height: 20px; margin: 8px 0 16px; }
.fotok .credit { display: block; font-weight: 300; }
.fotok--csik { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.fotok--csik figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fotok--mozaik { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.fotok--mozaik img { aspect-ratio: 1; }
.fotok--mozaik figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.js .fotok a { cursor: zoom-in; }

/* Videos: 16:9 frames, two or three to a row. A YouTube video is embedded;
   anything else (NAVA) is a cover-image card linking out, named by its host. */
.videok {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px 16px;
    margin: 32px 0 0;
}

/* Within a text (and on default pages like Konferencia) one to a row; only
   galleries put them side by side. In the body at a [videok] marker they need
   room below too. */
article .videok, .tpl-default .videok { grid-template-columns: minmax(0, 1fr); }
.bevezeto .videok { margin-bottom: 32px; }

.video { margin: 0; }
.video-keret { position: relative; display: block; aspect-ratio: 16 / 9; background: #eee; }
.video-keret iframe, .video-keret img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-forras { position: absolute; left: 0; bottom: 0; padding: 4px 8px; background: #000; color: #fff; font: 300 11px/16px var(--mono); }
.video-kulso:hover .video-forras { text-decoration: underline; text-underline-offset: .2em; }
.video figcaption { font-size: 13px; line-height: 20px; margin: 8px 0 0; }
.video .title { font-weight: 500; }

.galeria-blokk { margin: 0 0 64px; }
.galeria-blokk .galeria-cim { font-size: 15px; line-height: 24px; text-transform: none; letter-spacing: 0; margin-bottom: 16px; }
.szakasz .galeria-blokk .galeria-cim { font-size: 15px; }
.tovabb { margin: 12px 0 0; font-size: 13px; line-height: 20px; }
.tovabb a { text-decoration: underline; text-underline-offset: .2em; }

/* Lightbox (css/vendor/baguetteBox.min.css): the caption is the figcaption above. */
#baguetteBox-overlay .full-image figcaption { font: 400 13px/20px var(--sans); padding: 6px 8px; }
#baguetteBox-overlay .credit { display: block; font-weight: 300; opacity: .8; }

/* Home: the N and K strokes side by side, the name in the lower triangle of
   the N, then the sections. --n is the width of the N; the K is drawn at the
   same height, and the name is sized in cqw so it scales with the N. */
.logo { --n: min(440px, 46%); display: flex; align-items: flex-end; gap: 6%; padding: 72px 0 64px; }
.logo svg { display: block; width: 100%; height: auto; fill: none; stroke: #000; stroke-width: 4px; vector-effect: non-scaling-stroke; overflow: visible; }
.logo svg path { vector-effect: non-scaling-stroke; }
.logo-n { position: relative; flex: none; width: var(--n); container-type: inline-size; }
.logo .logo-k { flex: none; width: calc(var(--n) * .944); }
.logo-szoveg { position: absolute; left: 7cqw; bottom: 0; font-size: 8cqw; line-height: 1.1; letter-spacing: -.02em; }
.logo-szoveg span { display: block; }
.logo-szoveg .evek { max-width: 62cqw; margin-top: 3cqw; font-size: max(11px, 3cqw); line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none; }
.home-head .bevezeto { margin: 0 0 64px; }

.fomenu .rovatok a { display: grid; grid-template-columns: var(--label) auto minmax(0, 1fr); align-items: baseline; gap: 8px 16px; }
.fomenu .szam { font: 300 13px/20px var(--mono); }
.fomenu .title { font-size: 28px; line-height: 32px; text-transform: uppercase; letter-spacing: -.4px; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-bottom: 56px; font-size: 11px; line-height: 16px; }
.site-footer::before { content: ""; flex-basis: 100%; border-top: var(--rule); margin-bottom: 24px; }
.site-footer p { margin: 0; }
.site-footer .intezmeny { font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }

/* Narrow screens: one column. With JavaScript (js/neray.js sets .js on
   <html>) the menu becomes a sidebar opened by the header button; without
   it, the menu stays in the header as a wrapped list. */
@media (max-width: 700px) {
    :root { --gutter: 16px; --label: 64px; }

    .page-head { flex-direction: column; gap: 8px; padding: 48px 0 40px; }
    body { --cim: 24px; }
    .tpl-szoveg, .tpl-tetel, .tpl-galeria { --cim: 20px; }
    h1 { line-height: 1.1; }
    article > .meta { margin: -24px 0 32px; }

    .szakaszok--hasab { columns: 1; }
    .szakasz, .szakaszok--hasab .szakasz { margin-bottom: 56px; }

    .fotok { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fotok--csik, .fotok--mozaik { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .videok { grid-template-columns: minmax(0, 1fr); }

    .rovatok a { padding: 20px 0 22px; flex-wrap: wrap; }
    .fomenu .title { font-size: 22px; line-height: 28px; }
    .fomenu .rovatok a { grid-template-columns: 40px minmax(0, 1fr); }
    .alrovatok { grid-column: 2; text-align: left; }

    /* The triangle is too small for three lines: the subtitle goes under the N. */
    .logo { --n: 48%; gap: 4%; padding: 40px 0 72px; }
    .logo-szoveg { font-size: 9.5cqw; }
    .logo-szoveg .evek { position: absolute; top: 100%; margin-top: 16px; max-width: none; white-space: nowrap; }

    .site-footer p { flex-basis: 100%; }

    .js .nav-toggle { display: block; font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
    .js .nav-close { display: block; margin: 0 0 16px auto; font-size: 28px; line-height: 1; }

    .js .site-nav {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 20;
        width: min(20rem, 85vw);
        margin: 0;
        padding: 16px 20px 32px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg);
        border-left: var(--rule);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s .25s;
    }
    .js .site-nav ol { display: block; }
    .js .site-nav li { border-top: var(--line); }
    .js .site-nav li:last-child { border-bottom: var(--line); }
    .js .site-nav a { padding: 14px 0; font-size: 15px; }
    .js .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 19;
        background: rgba(0, 0, 0, .4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility 0s .25s;
    }
    .nav-open .site-nav { transform: none; visibility: visible; transition-delay: 0s; }
    .nav-open .nav-backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }
    .nav-open body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav, .nav-backdrop { transition: none !important; }
}
