/* Fotografie Tomáše Benešla – ambientní web: barvu stránky určuje fotka, na kterou se díváš. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #1f2326; --bg2: #2a2f33; --fg: #eceeef; --soft: #a9b1b6; --accent: #9fc4d8;
  --pad: clamp(18px, 5vw, 72px);
  --display: "Archivo", "Arial Narrow", sans-serif;
  --tween: 1.1s cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font: 400 17px/1.55 "Archivo", system-ui, sans-serif;
  transition: background-color var(--tween), color var(--tween);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------------------------------------------------------------- záhlaví */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad); color: var(--fg); pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--bg) 55%, transparent), transparent);
  transition: background-color .4s, padding .3s, color var(--tween);
}
.site-head.scrolled {
  padding-block: 10px; background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.site-head > * { pointer-events: auto; }
.wordmark { display: inline-block; line-height: 0; }
.wordmark .logo {
  display: block; height: 44px; aspect-ratio: 5.2494; background: currentColor;
  -webkit-mask: url(assets/brand/logo-horizontal.svg) center / contain no-repeat; mask: url(assets/brand/logo-horizontal.svg) center / contain no-repeat;
}
@media (max-width: 420px) { .wordmark .logo { height: 36px; } }
.lang { background: none; border: 1px solid currentColor; border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.lang:hover { background: var(--fg); color: var(--bg); }

main { flex: 1; }

/* ---------------------------------------------------------------- úvod */
.intro { min-height: 92vh; display: grid; align-content: end; padding: 120px var(--pad) 9vh; }
.intro h1 {
  margin: 0; font-family: var(--display); font-stretch: 62%; font-weight: 800;
  font-size: clamp(4.4rem, 17vw, 17rem); line-height: .8; letter-spacing: -0.02em;
}
.intro p { margin: 28px 0 0; max-width: 34ch; font-size: clamp(18px, 1.6vw, 22px); color: var(--soft); }
.scroll-cue { margin-top: 44px; width: 1px; height: 64px; background: linear-gradient(var(--soft), transparent); }

/* ---------------------------------------------------------------- kapitoly (alba na úvodní stránce) */
.chapter {
  min-height: 100vh; display: grid; align-items: center; padding: 10vh var(--pad) 16vh;
  grid-template-columns: repeat(12, 1fr); column-gap: 16px;
}
.chapter .frame { grid-column: 1 / span 8; grid-row: 1; position: relative; text-decoration: none; display: block; }
.chapter .frame img { width: 100%; height: min(78vh, 62vw); object-fit: cover; background: var(--bg2); }
.chapter .words { grid-column: 7 / -1; grid-row: 1; position: relative; z-index: 2; align-self: end; margin-bottom: 7vh; pointer-events: none; }
.chapter.flip .frame { grid-column: 5 / -1; }
.chapter.flip .words { grid-column: 1 / span 6; }
.chapter h2 {
  margin: 0; font-family: var(--display); font-stretch: 62%; font-weight: 800;
  font-size: clamp(3.4rem, 9.5vw, 10rem); line-height: .84; letter-spacing: -0.015em; text-wrap: balance;
}
.chapter h2 a { text-decoration: none; pointer-events: auto; }
.chapter h2 a:hover { color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--soft); font-size: 15px; }
.facts li { white-space: nowrap; }
.chapter.flip .facts { justify-content: flex-start; }
@media (max-width: 760px) {
  .chapter, .chapter.flip { display: block; min-height: auto; padding: 6vh var(--pad); }
  .chapter .frame img { height: 62vh; }
  .chapter .words { margin: -2.2em 0 0; }
}

/* ---------------------------------------------------------------- dok s filtrem */
.dock {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 25;
  display: flex; gap: 2px; padding: 5px; border-radius: 99px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  transition: background-color var(--tween), transform .35s ease, opacity .35s;
}
.dock.away { transform: translate(-50%, 140%); opacity: 0; }
.dock button { flex: none; border: 0; background: none; border-radius: 99px; padding: 8px 16px; font-size: 15px; cursor: pointer; color: var(--soft); }
.dock button:hover { color: var(--fg); }
.dock button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* ---------------------------------------------------------------- stránka alba */
.album-hero { position: relative; height: 92vh; min-height: 420px; overflow: hidden; }
.album-hero img { width: 100%; height: 100%; object-fit: cover; }
.album-hero::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--bg)); transition: background var(--tween); }
.album-hero .words { position: absolute; left: var(--pad); right: var(--pad); bottom: 6vh; z-index: 2; }
.album-hero h1 {
  margin: 0; font-family: var(--display); font-stretch: 62%; font-weight: 800;
  font-size: clamp(3.6rem, 12vw, 12.5rem); line-height: .82; letter-spacing: -0.02em; text-wrap: balance; max-width: 14ch;
}
.album-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; padding: 4vh var(--pad) 6vh; align-items: start; }
.album-meta p { margin: 0; max-width: 62ch; font-size: 19px; color: var(--soft); }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--soft); font-size: 15px; }
.back:hover { color: var(--fg); }
@media (max-width: 760px) { .album-meta { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- zarovnané řady */
.grid { padding: 0 var(--pad) 140px; }
.jrow { display: flex; gap: 6px; margin-bottom: 6px; }
.jitem { flex: none; position: relative; overflow: hidden; background: var(--bg2); border: 0; padding: 0; cursor: zoom-in; }
.jitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .5s; }
.jitem img.loading { opacity: 0; }
.jitem:hover img { transform: scale(1.025); }

/* ---------------------------------------------------------------- prohlížeč */
dialog.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--vbg, var(--bg)); color: var(--fg); transition: background-color .7s ease;
}
dialog.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
dialog.viewer::backdrop { background: rgba(0, 0, 0, .6); }
.v-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 15px; color: var(--soft); }
.v-top button { background: none; border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.v-top button:hover { background: var(--fg); color: var(--bg); }
.v-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 72px; touch-action: pan-y; }
.v-stage img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.v-nav {
  position: absolute; top: 0; bottom: 0; width: 72px; border: 0; background: none; cursor: pointer;
  font-family: var(--display); font-stretch: 62%; font-size: 52px; color: var(--soft);
}
.v-nav:hover { color: var(--fg); }
.v-prev { left: 0; } .v-next { right: 0; }
.v-foot { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 10px 18px 16px; }
.v-caption { font-size: 15px; color: var(--soft); min-width: 0; }
.v-caption strong { display: block; color: var(--fg); font-weight: 600; font-size: 17px; }
.v-strip { display: flex; gap: 4px; overflow-x: auto; max-width: 52vw; scrollbar-width: none; padding: 2px; }
.v-strip button { flex: none; width: 54px; height: 40px; padding: 0; border: 0; opacity: .45; cursor: pointer; background: var(--bg2); }
.v-strip button img { width: 100%; height: 100%; object-fit: cover; }
.v-strip button[aria-current="true"] { opacity: 1; outline: 2px solid var(--fg); outline-offset: 1px; }
@media (max-width: 760px) {
  .v-stage { padding: 0 6px; }
  .v-nav { display: none; }
  .v-strip { display: none; }
}

/* ---------------------------------------------------------------- stavy, patička */
.note { min-height: 70vh; display: grid; align-content: center; padding: 120px var(--pad) 60px; max-width: 70ch; }
.note h2 { font-family: var(--display); font-stretch: 75%; font-weight: 750; font-size: clamp(2rem, 5vw, 3.4rem); line-height: .95; margin: 0 0 14px; }
.note p { color: var(--soft); margin: 0; }
.site-foot { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: center; padding: 26px var(--pad) 90px; font-size: 14px; color: var(--soft); }
.site-foot a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-foot a:hover { color: var(--fg); }
.site-foot img { width: 18px; height: 18px; opacity: .8; }

/* ---------------------------------------------------------------- jediný vstupní moment */
.reveal { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .dock, dialog.viewer, .album-hero::after { transition: none; }
  .reveal { animation: none; }
  .jitem img { transition: none; }
}
