:root {
  --paper: #f7f9f6;
  --ink: #1d2921;
  --muted: #59645d;
  --accent: #018d36;
  /* Tmavší odstín pro čitelný drobný text a bílé popisky tlačítek. */
  --accent-strong: #00752d;
  --highlight: #dcefe1;
  --line: #d5ded6;
  --surface: #e4ede5;
  --max-width: 1140px;
  --gallery-gap: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; cursor: pointer; }
button[hidden] { display: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(var(--max-width), calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: .6rem 1rem; background: var(--paper); z-index: 10; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.masthead { display: flex; align-items: center; justify-content: space-between; padding-block: 30px; border-bottom: 1px solid var(--line); gap: 1rem; }
.name { font-weight: 750; font-size: 1.3rem; text-decoration: none; letter-spacing: -.04em; white-space: nowrap; flex-shrink: 0; }
.name-domain { color: var(--accent); }
/* Zachová původní znak š; šedou obarví jen jeho horní část s háčkem. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .name-diacritic { display: inline-block; background: linear-gradient(to bottom, #8b928d .6em, var(--ink) .6em); background-clip: text; -webkit-background-clip: text; color: transparent; }
}
@media (forced-colors: active) {
  .name-diacritic { background: none; color: LinkText; }
}
.masthead-note, .eyebrow, .project-number { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 650; }
.masthead-note { color: var(--muted); }
.intro { padding-block: 84px 66px; }
.eyebrow { color: var(--accent-strong); margin: 0 0 26px; }
.intro-bottom { margin-top: 32px; }
.intro-copy { max-width: 920px; font-size: clamp(1.8rem, 4.2vw, 3.4rem); font-weight: 500; line-height: 1.22; letter-spacing: -.035em; margin: 0; color: var(--ink); }
.work { padding-block: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-block: 24px; }
.section-heading h2 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin: 0; }
.motion-toggle, .clip-toggle { background: var(--accent-strong); color: #fff; border: 1px solid var(--accent-strong); border-radius: 5px; padding: 8px 12px; font-size: .78rem; min-height: 44px; }
.motion-toggle:hover { background: var(--ink); border-color: var(--ink); }
.motion-toggle[aria-pressed="false"] { background: transparent; color: var(--accent-strong); }
.project { margin-block: 0 76px; }
/* Obsah je bez JS viditelný. Tuto třídu dostanou až sekce pod obrazovkou. */
.reveal-pending { opacity: 0; transform: translateY(28px); }
[data-reveal] { transition: opacity .65s ease, transform .65s cubic-bezier(.2, .65, .3, 1); }
.project-media { position: relative; background: var(--surface); border-radius: 7px; overflow: hidden; }
.project-media img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; display: block; }
.project-media video { width: 100%; height: auto; object-fit: contain; display: block; background: var(--ink); }
/* Čtvercový klip má vlastní plochu 1:1; poměr ostatních určují rozměry v HTML. */
.project-media--square { aspect-ratio: 1 / 1; }
.project-media--square video { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; gap: var(--gallery-gap); }
.gallery-item { display: block; min-width: 0; background: var(--surface); border-radius: 7px; overflow: hidden; }
.gallery-item img { display: block; width: 100%; height: auto; border-radius: inherit; }
.project-gallery--festival { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.project-gallery--festival .gallery-item { grid-column: span 2; }
/* Pět stejně velkých fotek: tři nahoře, dvě uprostřed dole. Šestá doplní 3×2. */
@media (min-width: 761px) {
  .project-gallery--festival .gallery-item:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
  .project-gallery--festival .gallery-item:nth-child(5):last-child { grid-column: 4 / span 2; }
}
.project-gallery--night { grid-template-columns: minmax(0, 1fr); }
.night-feature, .night-details { display: grid; align-items: start; gap: var(--gallery-gap); }
.night-feature { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.night-details { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr); }
.clip-toggle { position: absolute; left: 14px; bottom: 14px; background: var(--highlight); color: var(--ink); border-color: var(--highlight); box-shadow: 0 2px 12px #0002; }
.clip-toggle:hover { background: var(--paper); border-color: var(--paper); }
.clip-toggle:disabled { cursor: default; opacity: .8; }
.project-caption { display: grid; grid-template-columns: 45px minmax(0, 1fr); column-gap: 28px; row-gap: 12px; padding-block: 0 24px; }
.project + .project .project-caption { border-top: 1px solid var(--line); padding-top: 28px; }
.project-number { color: var(--accent-strong); padding-top: 4px; }
.project-caption h3, .closing h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.2; font-weight: 500; margin: 0; letter-spacing: -.025em; }
.project-description { grid-column: 2; }
.project-description, .closing-copy { min-width: 0; font-size: .94rem; line-height: 1.7; overflow-wrap: anywhere; }
.project-description p, .closing-copy p { margin: 0; text-align: justify; text-align-last: start; hyphens: auto; }
.project-description p + p, .closing-copy p + p { margin-top: 1em; }
.closing { border-top: 1px solid var(--line); padding-block: 40px 56px; }
.closing-copy { margin-top: 16px; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 70px; border-top: 1px solid var(--line); padding-block: 58px 76px; }
.about .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.about h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.13; letter-spacing: -.04em; font-weight: 500; margin: 0; }
.about-copy p { margin: 0 0 22px; }
.contact { font-weight: 600; }
footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 24px 32px; font-size: .75rem; color: var(--muted); }
@media (max-width: 760px) {
  :root { --gallery-gap: 16px; }
  .wrap { width: calc(100% - 40px); }
  .masthead { padding-block: 22px; }
  .masthead-note { max-width: 160px; text-align: right; font-size: .62rem; }
  .intro { padding-block: 58px 44px; }
  .intro-bottom { margin-top: 24px; }
  .project-gallery { grid-template-columns: minmax(0, 1fr); }
  .project-gallery--festival { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-gallery--festival .gallery-item { grid-column: auto; }
  .project-gallery--festival .gallery-item:first-child:nth-last-child(5) { grid-column: 1 / -1; }
  .night-feature, .night-details { grid-template-columns: minmax(0, 1fr); }
  .night-details .gallery-item--portrait { width: min(100%, 340px); justify-self: center; }
  .gallery-item img { max-height: 80vh; object-fit: contain; }
  .project-caption { grid-template-columns: 28px minmax(0, 1fr); column-gap: 18px; }
  .project-description p, .closing-copy p { text-align: start; hyphens: manual; }
  .project { margin-bottom: 42px; }
  .section-heading { align-items: start; flex-direction: column; }
  .closing { padding-block: 32px 42px; }
  .about { grid-template-columns: 1fr; padding-block: 42px; }
  footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; }
  .reveal-pending { opacity: 1; transform: none; }
}
