/* ==========================================================================
   FOTO JUVENA — Lubomír Kotík, fotograf
   Ruční CSS, žádný framework a žádný build. Soubor se dělí na:
     1. proměnné (barvy, fonty, rozměry)   5. horní lišta a spodní navigace
     2. reset a základ                      6. sekce Úvod
     3. sdílené prvky (odkaz, meta, zrno)   7. sekce Galerie
     4. scrollovací scéna a animace         8. sekce Kontakt
                                            9. detail snímku
   Barvy jsou zapsané v oklch a nikde v HTML se neopakují — mění se jen tady
   nahoře v :root.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. tokeny */

:root {
  /* paleta: papír / inkoust / jantar */
  --paper: oklch(0.958 0.008 84);
  --ink: oklch(0.19 0.006 60);
  --ink-soft: oklch(0.55 0.012 70);
  --rule: oklch(0.874 0.011 80);
  --amber: oklch(0.5 0.152 38);
  --plate: oklch(0.895 0.01 82);

  /* poloprůhledné varianty (pro rámečky a tlumený text) */
  --ink-25: oklch(0.19 0.006 60 / 0.25);
  --ink-soft-70: oklch(0.55 0.012 70 / 0.7);

  --f-display: "Anton", "Haettenschweiler", "Arial Narrow", sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;

  --pad: clamp(18px, 3.4vw, 52px);
  --maxw: 1600px;
  --ease: cubic-bezier(0.16, 0.84, 0.34, 1);
}

/* ------------------------------------------------------- 2. reset a základ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* místo pro posuvník zůstává rezervované, takže zamknutí scrollu
     (otevřený detail snímku) neposune layout do strany */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(15px, 1.02vw, 17px);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
figure,
dl,
dd,
dt,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Atributy width/height v HTML si prohlížeč bere jako rozměr. Bez height:auto
   by se obrázek, kterému šířku určuje CSS (podpis v kontaktech), roztáhl na
   výšku podle atributu. Takhle se výška dopočítá z poměru stran — a atributy
   přitom dál drží místo, takže stránka při načítání neposkakuje. */
img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* --------------------------------------------------------- 3. sdílené prvky */

/* filmové zrno přes celou stránku */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* odkaz s linkou, která se při najetí zatáhne doprava */
.lnk {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}

.lnk::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform-origin: right center;
  transition: transform 0.45s var(--ease);
}

.lnk:hover::after,
.lnk:focus-visible::after {
  transform: scaleX(0);
}

.lnk:hover,
.lnk:focus-visible {
  color: var(--amber);
}

/* drobný popisek: mono, prostrkaný, verzálky */
.meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------- 4. scrollovací scéna a animace .el */

/* Neviditelná dráha, po které se scrolluje. Každý slot = jedna obrazovka;
   sekce samotné stojí na místě ve .stage-view a jen se přepínají. */
.stage-track {
  position: relative;
  z-index: 1;
}

.stage-slot {
  height: 100svh;
  scroll-snap-align: start;
}

.stage-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 2;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: clamp(74px, 12vh, 150px) var(--pad) clamp(76px, 10vh, 104px);
  pointer-events: none;
}

.panel[data-state="active"] {
  pointer-events: auto;
}

.panel[data-state="hidden"] {
  visibility: hidden;
}

.panel-inner {
  margin-inline: auto;
  width: 100%;
  max-width: var(--maxw);
}

/* Sekce mimo scénu zůstávají úplně složené, aby při návratu neproblikly. */
.panel[data-state="hidden"] .el {
  opacity: 0;
  transform: translate3d(0, 22vh, 0) scale(0.94);
  filter: blur(6px);
  transition: none;
}

.panel[data-state="hidden"] .el-plate {
  clip-path: inset(100% 0 0 0);
  transform: none;
  filter: none;
  transition: none;
}

/* Dokud stránka nabíhá, jsou přechody vypnuté. V HTML je natvrdo zapsané,
   že aktivní je první sekce; když se web přenačte uprostřed, app.js to hned
   opraví — a bez tohohle pravidla by ta oprava proběhla jako animace a bylo
   by vidět, jak prvky sousední sekce odjíždějí pryč. Třídu sundá app.js,
   jakmile je správná sekce jednou vykreslená. */
.pred-startem .el,
.pred-startem .el-plate,
.pred-startem .vword span {
  transition: none !important;
}

/* Každý animovaný prvek nese --i, podle kterého se řadí za sebe. */
.el {
  --i: 0;
  transition:
    opacity 0.62s var(--ease),
    transform 0.86s var(--ease),
    filter 0.62s var(--ease);
  will-change: transform, opacity;
}

.panel[data-state="active"] .el {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition-delay: calc(var(--i) * 70ms + 90ms);
}

.panel[data-state="after"] .el {
  opacity: 0;
  transform: translate3d(0, 22vh, 0) scale(0.94);
  filter: blur(6px);
  transition-delay: calc(var(--i) * 34ms);
}

.panel[data-state="before"] .el {
  opacity: 0;
  transform: translate3d(0, -22vh, 0) scale(0.94);
  filter: blur(6px);
  transition-delay: calc(var(--i) * 34ms);
}

/* postranní prvky neodjíždějí nahoru/dolů, ale do stran */
.panel[data-state="after"] .el-left,
.panel[data-state="before"] .el-left {
  transform: translate3d(-42vw, 0, 0);
}

.panel[data-state="after"] .el-right,
.panel[data-state="before"] .el-right {
  transform: translate3d(42vw, 0, 0);
}

/* fotka se skládá zpátky oponou zdola nahoru */
.el-plate {
  clip-path: inset(0 0 0 0);
  transition:
    clip-path 1s var(--ease),
    opacity 0.6s var(--ease),
    transform 0.9s var(--ease);
}

.panel[data-state="after"] .el-plate {
  clip-path: inset(0 0 100% 0);
  transform: none;
  filter: none;
}

.panel[data-state="before"] .el-plate {
  clip-path: inset(100% 0 0 0);
  transform: none;
  filter: none;
}

/* svislý nápis FOTO JUVENA — písmena naskakují po jednom */
.vword {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--f-body);
  font-weight: 800;
  font-size: clamp(30px, min(10vw, 14svh), 168px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.vword span {
  display: inline-block;
  transition:
    opacity 0.5s var(--ease),
    transform 0.8s var(--ease);
}

.panel[data-state="active"] .vword span {
  opacity: 1;
  transform: none;
}

.panel:not([data-state="active"]) .vword span {
  opacity: 0;
  transform: translateY(46px);
}

/* ------------------------------------------- 5. horní lišta, navigace, patka */

/* Do 1024 px se plné popisky menu (Úvod/Galerie/Kontakt) nevejdou do stejného
   řádku vedle e-mailu a telefonu/portfolia — proto tam lišta roste na dva
   řádky: e-mail a kontakty nahoře, menu na celou šířku pod nimi. Od 1024 px
   (ověřeno na skutečných rozměrech, viz .rail níž) je místa dost a menu se
   vrátí doprostřed jednoho řádku. */
.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "email right"
    "rail  rail";
  align-items: start;
  row-gap: 30px;
  column-gap: 0.75rem;
  padding: clamp(12px, 2vw, 26px) var(--pad);
  max-width: calc(var(--maxw) + 2 * var(--pad));
  font-size: clamp(13px, 3.4vw, 20px);
}

@media (min-width: 1024px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "email rail right";
  }
}

/* Dvouřádková lišta je vyšší, než na co je dimenzovaná horní mezera panelů
   (.panel, sekce 4) — v nejhorším případě (těsně pod 1024 px) měří kolem
   163 px. Do 1024 px proto mezera nesmí klesnout pod bezpečných 170 px, jinak
   obsah panelu (nadpis, u Galerie i delší úvodní text) zajíždí pod lištu. */
@media (max-width: 1023.98px) {
  .panel {
    padding-top: clamp(170px, 14vh, 190px);
  }
}

.topbar-email {
  grid-area: email;
  min-width: 0;
}

.topbar-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 9px;
}

.topbar-right .topbar-label {
  text-align: right;
}

.topbar-link {
  font-weight: 500;
}

.topbar-email .topbar-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  grid-area: right;
  display: flex;
  flex: none;
  justify-self: end;
  gap: clamp(14px, 2.6vw, 44px);
  text-align: right;
}

.topbar-phone {
  white-space: nowrap;
}

.topbar-portfolio {
  display: none;
}

@media (min-width: 640px) {
  .topbar-label {
    margin-bottom: 0.375rem;
    font-size: 11px;
  }

  .topbar-portfolio {
    display: block;
  }
}

/* menu sekcí — do 1024 px vlastní řádek na celou šířku pod e-mailem a
   telefonem/portfoliem, od 1024 px uprostřed jednoho řádku mezi nimi
   (viz .topbar výš) */
.rail {
  grid-area: rail;
  display: flex;
  align-items: center;
  align-self: center;
  justify-self: center;
  gap: 0.625rem;
}

.rail-btn {
  padding-block: 0.375rem;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  transition:
    color 0.4s,
    font-weight 0.4s;
}

.rail-btn:hover {
  color: var(--ink);
}

.rail-btn[aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
}

/* oddělovací tečka mezi položkami menu — jen ozdobná, čtečky ji přeskočí */
.rail-sep {
  color: var(--ink-soft);
  font-size: 12px;
  user-select: none;
}

@media (min-width: 1024px) {
  .rail {
    gap: 0.875rem;
  }

  .rail-btn,
  .rail-sep {
    font-size: 13px;
  }
}

/* copyright — svítí jen nad sekcí Kontakt */
.copyright {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-soft-70);
}

.copyright[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .copyright {
    font-size: 10px;
    letter-spacing: 0.18em;
  }
}

@media (min-width: 768px) {
  .copyright {
    bottom: 2.5rem;
  }
}

/* ------------------------------------------------------------ 6. sekce Úvod */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.2vh, 26px);
}

.hero-name {
  order: 1;
  width: 100%;
  text-align: center;
}

.hero-name .meta {
  display: block;
  margin-bottom: 0.625rem;
}

.hero-name h1 {
  white-space: nowrap;
  font-size: clamp(18px, 5.4vw, 38px);
  font-weight: 300;
  text-transform: uppercase;
  line-height: 1;
}

.hero-center {
  order: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1px, 0.2vw, 4px);
}

.hero-vwords {
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  gap: 1px;
}

.hero-plate {
  position: relative;
  width: min(46vw, 220px);
  flex: none;
}

.plate-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--plate);
}

.plate-frame img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* jemný posun fotky za myší (--py nastavuje app.js) */
.hero-plate img {
  transform: translate3d(0, var(--py, 0px), 0) scale(1.08);
}

.hero-plate figcaption {
  position: absolute;
  left: 0;
  top: calc(100% + 9px);
  display: none;
  font-size: 10.5px;
}

.hero-genres {
  order: 3;
  width: 100%;
}

.hero-genres ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: clamp(10px, 3vw, 18px);
  row-gap: 0.25rem;
}

.hero-genres li {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 12px);
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 300;
  letter-spacing: -0.025em;
}

.hero-genres .dash {
  display: none;
  height: 1px;
  width: clamp(12px, 1.1vw, 18px);
  flex: none;
  background: var(--ink-soft);
}

.hero-social {
  order: 4;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
}

.social-btn {
  display: grid;
  aspect-ratio: 1;
  width: clamp(38px, 10vw, 52px);
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition:
    background-color 0.5s,
    color 0.5s;
}

.social-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.social-btn svg {
  height: auto;
  width: 44%;
  fill: currentColor;
}

.hero-quote {
  order: 5;
  display: none;
  max-width: min(24ch, 100%);
  text-align: center;
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 300;
  line-height: 1.375;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .hero-plate {
    width: min(52vw, 320px);
  }

  .hero-plate figcaption {
    display: block;
  }
}

@media (min-width: 768px) {
  .hero-quote {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    column-gap: clamp(12px, 2.4vw, 40px);
    row-gap: clamp(20px, 4vh, 40px);
  }

  /* na širokém displeji sedí všechno v jednom řádku mřížky */
  .hero > * {
    order: 0;
    grid-row-start: 1;
  }

  .hero-name {
    grid-column-start: 1;
    align-self: end;
    text-align: left;
  }

  .hero-name h1 {
    font-size: clamp(20px, 2.1vw, 38px);
  }

  .hero-center {
    grid-column-start: 2;
  }

  .hero-plate {
    width: min(600px, 40vw, 52svh);
  }

  .hero-genres {
    grid-column-start: 1;
    width: auto;
    align-self: center;
  }

  .hero-genres ul {
    display: block;
  }

  .hero-genres li {
    margin-bottom: 0.22em;
    font-size: clamp(15px, 1.18vw, 20px);
  }

  .hero-genres .dash {
    display: block;
  }

  .hero-social {
    grid-column-start: 3;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    align-self: center;
  }

  .social-btn {
    width: clamp(44px, 3.6vw, 58px);
  }

  .hero-quote {
    grid-column-start: 3;
    justify-self: end;
    align-self: end;
    text-align: right;
    font-size: clamp(15px, 1.18vw, 20px);
  }
}

/* --------------------------------------------------------- 7. sekce Galerie */

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.4vh, 28px);
}

/* náhledy */
.thumbs {
  order: 3;
  display: grid;
  width: 100%;
  max-width: 520px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(4px, 1.4vw, 10px);
}

.thumb {
  display: block;
  width: 100%;
  cursor: pointer;
}

.thumb-frame {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--plate);
}

.thumb-frame img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition:
    opacity 0.7s,
    transform 0.7s;
}

.thumb:hover .thumb-frame img {
  opacity: 0.9;
  transform: scale(1.06);
}

.thumb[aria-current="true"] .thumb-frame img {
  opacity: 1;
}

.thumb-no {
  display: block;
  margin-top: 0.375rem;
  font-size: 9px;
  transition: color 0.2s;
}

.thumb[aria-current="true"] .thumb-no {
  font-weight: 500;
  color: var(--ink);
}

/* poslední dlaždice = odkaz na YouPic */
.thumb-more .thumb-frame {
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-25);
  transition:
    background-color 0.5s,
    color 0.5s;
}

.thumb-more:hover .thumb-frame {
  background: var(--ink);
  color: var(--paper);
}

.thumb-more svg {
  height: auto;
  width: 52%;
}

/* velká fotka */
.stage-fig {
  order: 2;
  width: min(52vw, 240px);
}

.stage-btn {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.stage-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--plate);
}

.stage-frame img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0;
  /* Skryté snímky leží přes sebe ve stejné ploše — bez tohoto by šlo přes ně
     (nejvýš v DOM pořadí, tedy poslední fotka v galerii) pravým tlačítkem
     "otevřít obrázek v nové kartě" i přes viditelnou fotku nad nimi. Aktivní
     snímek dostává pointer-events zpět v app.js (setShot). */
  pointer-events: none;
  transition:
    opacity 0.7s,
    transform 0.7s;
}

.stage-fig figcaption {
  margin-top: 0.625rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 10px;
}

.stage-cat {
  font-weight: 500;
  color: var(--ink);
}

/* text vlevo */
.gal-lead {
  order: 1;
  max-width: 44ch;
  text-align: center;
}

.gal-lead h2 {
  margin-bottom: 0.5em;
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.gal-lead p {
  display: none;
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 300;
  line-height: 1.625;
  color: var(--ink-soft);
}

/* citát vpravo */
.gal-quote {
  order: 4;
  display: none;
  max-width: 36ch;
  text-align: center;
}

.gal-quote p {
  margin-bottom: 0.875rem;
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 300;
  line-height: 1.625;
  color: var(--ink-soft);
}

/* výzva k objednání */
.gal-cta {
  order: 5;
  text-align: center;
}

.gal-cta .lnk {
  font-size: clamp(15px, 4.2vw, 20px);
  font-weight: 300;
  letter-spacing: -0.025em;
}

.gal-cta .meta {
  margin-top: 0.5rem;
  font-size: 10px;
}

@media (min-width: 640px) {
  .stage-fig {
    width: min(56vw, 300px);
  }

  .gal-lead p {
    display: block;
  }
}

@media (min-width: 1024px) {
  .gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    column-gap: clamp(16px, 3vw, 56px);
    row-gap: clamp(18px, 3.5vh, 40px);
  }

  .gallery > * {
    order: 0;
    grid-row-start: 1;
  }

  .thumbs {
    grid-column-start: 1;
    width: fit-content;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 16px);
    align-self: start;
  }

  .thumb {
    width: clamp(50px, 5vw, 76px);
  }

  .thumb-no {
    margin-top: 0.5rem;
    font-size: 11px;
  }

  .stage-fig {
    grid-column-start: 2;
    width: min(600px, 40vw, 52svh);
    justify-self: center;
  }

  .stage-fig figcaption {
    margin-top: 0.75rem;
    font-size: 11px;
  }

  .gal-lead {
    grid-column-start: 1;
    text-align: left;
    align-self: end;
  }

  .gal-lead h2 {
    margin-bottom: 0.7em;
    font-size: clamp(20px, 2vw, 33px);
  }

  .gal-quote {
    grid-column-start: 3;
    display: block;
    justify-self: end;
    align-self: start;
    text-align: left;
  }

  .gal-cta {
    grid-column-start: 3;
    justify-self: end;
    align-self: end;
    text-align: left;
  }

  .gal-cta .lnk {
    font-size: clamp(17px, 1.5vw, 25px);
  }

  .gal-cta .meta {
    margin-top: 0.625rem;
    font-size: 11px;
  }
}

/* --------------------------------------------------------- 8. sekce Kontakt */

.contact {
  --contact-gap: clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--contact-gap);
}

.contact-main .meta {
  display: block;
  margin-bottom: 1.5rem;
}

.contact-main h2 {
  font-size: clamp(34px, 7vw, 120px);
  font-weight: 300;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.contact-lead {
  margin-top: clamp(18px, 3vh, 34px);
  max-width: 46ch;
  font-size: clamp(15px, 1.1vw, 19px);
  font-weight: 300;
  line-height: 1.625;
  color: var(--ink-soft);
}

.contact-mail {
  margin-top: clamp(20px, 3vh, 36px);
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 300;
  letter-spacing: -0.025em;
}

/* Podpis stojí svisle uprostřed a vodorovně kousek PŘED pravým okrajem
   levého sloupce (justify-self:end + kousek zpátky doleva) — ne uprostřed
   celého řádku. Matematický střed by kvůli velkému nadpisu vlevo a úzkému
   sloupci vpravo opticky vypadal jako posunutý doleva; přesně na okraji
   sloupce byl zas moc vpravo. Odzkoušeno vizuálně proti referenci.
   Zobrazuje se až od 1024 px; na užších displejích se sekce skládá pod
   sebe a žádná mezera uprostřed nevzniká. */
.contact-signature {
  --sig-w: clamp(180px, 17vw, 300px);
  display: none;
  width: var(--sig-w);
  user-select: none;
  align-self: center;
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  column-gap: clamp(20px, 3vw, 48px);
  row-gap: 1rem;
  align-self: stretch;
}

.contact-item {
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

.contact-item .meta {
  display: block;
  margin-bottom: 0.375rem;
}

.contact-value {
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 300;
}

@media (min-width: 640px) {
  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .contact {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .contact-main {
    grid-column-start: 1;
    grid-row-start: 1;
  }

  .contact-signature {
    display: block;
    grid-column: 1;
    grid-row-start: 1;
    justify-self: end;
    position: relative;
    left: calc(var(--contact-gap) * -2.5);
  }

  .contact-list {
    grid-column-start: 2;
    grid-row-start: 1;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1280px) {
  .contact-signature {
    --sig-w: clamp(220px, 26vw, 300px);
  }
}

/* ---------------------------------------------------------- 9. detail snímku */

/* Rozměry a pozice rámečku i textového sloupce počítá app.js a zapisuje je
   sem jako inline styly — proto tu jsou jen vlastnosti, které se nemění. */

.detail {
  position: fixed;
  inset: 0;
  z-index: 50;
  outline: none;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
  background: var(--paper);
  transition: opacity 0.5s;
}

.detail-fig {
  pointer-events: none;
  position: absolute;
  overflow: hidden;
  background: var(--plate);
}

.detail-fig img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.detail-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.detail-panel > h2 {
  margin-bottom: 0.75rem;
}

.detail-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  font-size: clamp(12px, 3.2vw, 15px);
}

.detail-specs > div {
  grid-column: span 2;
  display: grid;
  grid-template-columns: subgrid;
}

.detail-specs dt,
.detail-specs dd {
  border-bottom: 1px solid var(--rule);
  padding-block: 0.5rem;
}

.detail-specs dt {
  padding-right: clamp(14px, 3vw, 48px);
  font-weight: 500;
}

.detail-specs dd {
  font-weight: 300;
  color: var(--ink-soft);
}

.detail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1.25rem;
}

.detail-name {
  font-size: clamp(24px, 7vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.detail-back {
  flex-shrink: 0;
  color: var(--ink);
}

@media (min-width: 640px) {
  .detail-specs {
    font-size: clamp(13px, 1vw, 15px);
  }

  .detail-foot {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .detail-name {
    font-size: clamp(26px, 3.6vw, 68px);
  }
}

@media (min-width: 1024px) {
  .detail-panel > h2 {
    margin-bottom: 1rem;
  }

  .detail-specs dt,
  .detail-specs dd {
    padding-block: 0.625rem;
  }
}

/* ------------------------------------------- omezení pohybu podle nastavení */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .el,
  .el-plate,
  .vword span {
    transition-duration: 0.001ms !important;
    filter: none !important;
  }

  .detail-backdrop {
    transition-duration: 0.001ms;
  }
}
