/* loicader.com — dark gallery theme (fonts self-hosted, no third-party request) */
@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url("fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #0F0E0C; --surface: #1A1916; --line: #2E2C27; --line-strong: #3A3832;
  --text: #EEEAE3; --text-soft: #D9D4CB; --muted: #A8A296; --accent: #7FD9B0;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1360px; --pad: clamp(20px, 3vw, 40px);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
html.no-scroll { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }
.label { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.wordmark { font-size: 21px; font-weight: 600; letter-spacing: .01em; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; min-height: 44px; align-content: center; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 15px; }
@media (max-width: 640px) {
  .top { gap: 4px 16px; padding-top: 12px; padding-bottom: 8px; }
  .nav { margin-left: -10px; }
  .nav a { padding: 0 10px; }
  .nav-long { display: none; }
}

/* hero + intro */
.hero { margin: 0; }
.hero img { display: block; width: 100%; height: clamp(240px, 56vw, 640px); object-fit: cover; background: var(--surface); }
.hero figcaption { padding-top: 12px; padding-bottom: 12px; }
.intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px 48px; align-items: end; padding-top: 64px; padding-bottom: 48px; }
.intro h1 { margin: 0; font-size: clamp(52px, 8vw, 116px); font-weight: 600; line-height: .92; letter-spacing: -.035em; }
.stats { margin: 0; display: flex; flex-wrap: wrap; gap: 40px; }
.stats div { display: flex; flex-direction: column; gap: 6px; }
.stats dd { margin: 0; font-size: 30px; font-weight: 600; }

/* series filters (shown only when JavaScript is available) */
.chips { display: none; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 32px; }
html.js .chips { display: flex; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.chip .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.chip[aria-pressed="true"] .count { color: var(--bg); }

/* gallery: justified rows read left to right, in catalogue order. Every card grows in
   proportion to its photo's width/height ratio (--r, from ratios.css), so the photos of
   a row share the same height and none is cropped. */
#galerie { padding-top: 8px; padding-bottom: 96px; }
.grid { display: flex; flex-wrap: wrap; gap: 36px 24px; }
.grid::after { content: ""; flex: 1000 1 0; }  /* the last row keeps its natural size */
.card { --r: 1.5; flex: var(--r) 1 calc(var(--r) * 250px); min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 640px) {
  .card { flex-basis: 100%; }
  .grid::after { display: none; }
}
.card[hidden] { display: none; }
.thumb { display: block; }
.thumb img { display: block; width: 100%; height: auto; background: var(--surface); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.card-title { font-size: 16px; font-weight: 500; line-height: 1.3; }
.icon-btn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* footer */
.footer { border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 40px; padding-top: 56px; padding-bottom: 72px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { margin: 0; }
.footer-col p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-soft); }

/* photo page */
.top-photo { padding-left: var(--pad); padding-right: var(--pad); padding-top: 14px; padding-bottom: 14px; }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.counter { min-width: 64px; text-align: right; font-size: 13px; }
.photo-layout { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
.photo-stage { flex: 999 1 640px; min-width: 0; margin: 0; background: #000; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 2.5vw, 32px); min-height: min(560px, 60vh); }
.photo-stage img { display: block; max-width: 100%; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.photo-panel { flex: 1 1 340px; min-width: 0; padding: 40px var(--pad) 48px; display: flex; flex-direction: column; gap: 32px; border-left: 1px solid var(--line); }
.photo-head { display: flex; flex-direction: column; gap: 12px; }
.photo-head h1 { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.downloads { display: flex; flex-direction: column; gap: 12px; }
.downloads p { margin: 4px 0 0; }
.btn-primary, .btn-secondary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { color: var(--bg); filter: brightness(1.08); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--text); font-weight: 500; }
.prevnext { display: flex; gap: 12px; margin-top: auto; }
.prevnext a { flex: 1; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
@media (max-width: 1080px) {
  .photo-panel { border-left: 0; border-top: 1px solid var(--line); }
  .photo-stage { min-height: 0; }
  .photo-stage img { max-height: 75vh; }
}

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 50; background: #050505; display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-top, .viewer-bottom { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px 12px 28px; }
.viewer-top .icon-btn { border-color: transparent; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: stretch; }
.viewer-stage img { flex: 1; min-width: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-nav { flex: none; width: clamp(48px, 7vw, 88px); border: 0; background: transparent; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.viewer-nav:hover { color: var(--accent); }
.viewer-title { font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.viewer-actions { display: flex; gap: 10px; flex: none; }
.btn-outline { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 15px; }
.btn-outline.accent { border-color: var(--accent); color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
  .viewer-bottom { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; }
  .viewer-actions { justify-content: stretch; }
  .viewer-actions a { flex: 1; justify-content: center; }
  .viewer-nav { width: 44px; }
}

/* 404 */
.notfound { padding-top: 80px; padding-bottom: 120px; }
.notfound h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 12px; }
.notfound .btn-primary { display: inline-flex; margin-top: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .thumb img { transition: opacity .2s ease; }
  .thumb:hover img { opacity: .88; }
}

/* links inside running text must look like links */
.footer-col p a, .downloads p a { text-decoration: underline; text-underline-offset: 3px; }
a[rel="license"] { white-space: nowrap; }

/* language switch */
.top-end { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; color: var(--text-soft); }
.lang-switch:hover { color: var(--accent); }
