@font-face {
  font-family: 'Oxanium';
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/oxanium-latin-ext-wght-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: 'Oxanium';
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/oxanium-latin-wght-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: #cbcbcb;
  --ink: #161616;
  --muted: #4a4a4a;
  --line: rgba(22, 22, 22, .55);
  --pad: clamp(20px, 3.2vw, 54px);
  --top: 92px;
  --side: 50vw;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: 'Oxanium', system-ui, sans-serif; font-weight: 400;
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- hlavička ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--top);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { font-size: clamp(24px, 2.2vw, 34px); font-weight: 500; text-decoration: none; letter-spacing: -.01em; }
.top-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 52px); font-size: 19px; font-weight: 500; }
.top-nav a { text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.top-nav a:hover, .top-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.lang { display: flex; gap: 2px; font-size: 14px; font-weight: 600; letter-spacing: .08em; }
.lang button { padding: 6px 8px; opacity: .45; }
.lang button:hover { opacity: .8; }
.lang button[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 -1.5px 0 var(--ink); }

/* ---------- titulní strana ---------- */
.hero {
  position: fixed; z-index: 10; left: var(--pad); top: 50%; transform: translateY(-58%);
  max-width: min(560px, 80vw); pointer-events: none;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.hero::before {
  content: ''; position: absolute; inset: -90px -160px -90px -120px; z-index: -1;
  background: radial-gradient(closest-side, rgba(212, 212, 212, .9), rgba(212, 212, 212, .55) 55%, rgba(212, 212, 212, 0));
}
.hero > * { pointer-events: auto; }
.eyebrow { font-size: 15px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.hero h1 { font-size: clamp(46px, 6.3vw, 104px); font-weight: 500; line-height: .98; letter-spacing: -.02em; }
.cta { display: inline-flex; align-items: center; gap: 16px; margin-top: 34px; font-size: 19px; font-weight: 500; padding: 8px 0; }
.cta svg { width: 34px; height: 12px; transition: transform .3s ease; }
.cta:hover svg { transform: translateX(8px); }
.hero-list { display: none; margin-top: 18px; }
.hero-list a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 19px; }

.hint {
  position: fixed; z-index: 10; left: var(--pad); bottom: 28px;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  transition: opacity .6s ease; pointer-events: none;
}
body:not(.is-home) .hero, body:not(.is-home) .hint { opacity: 0; visibility: hidden; transform: translate(-30px, -58%); transition: opacity .3s ease, transform .5s ease, visibility 0s .3s; }
body:not(.is-home) .hint { transform: none; }
.hint.is-off { opacity: 0; }

/* ---------- tlačítka kategorií na ploše ---------- */
.spots { position: fixed; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
.spot, .decor { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; transition: opacity .3s ease; }
.spot.is-hidden, .decor.is-hidden { opacity: 0; }
.spot.is-hidden button { pointer-events: none; }
.hero .eyebrow, .hero h1 { width: fit-content; }
.plus { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; pointer-events: none; }
.plus::before, .plus::after { content: ''; position: absolute; background: #fff; }
.plus::before { left: 8px; top: 1px; width: 2px; height: 16px; }
.plus::after { left: 1px; top: 8px; width: 16px; height: 2px; }
.decor .plus { opacity: .8; transform: scale(.8); }
.spot button {
  position: absolute; left: 63px; bottom: 30px; pointer-events: auto; white-space: nowrap;
  font-size: clamp(18px, 1.55vw, 25px); font-weight: 600; letter-spacing: -.005em; line-height: 1.2;
  text-shadow: 0 0 14px rgba(215, 215, 215, .9), 0 0 4px rgba(215, 215, 215, .9);
}
.spot .lead { position: absolute; right: 100%; top: 100%; margin-top: -1.5px; width: 54px; height: 30px; overflow: visible; }
.spot .lead path { fill: none; stroke: #fff; stroke-width: 1.5; }
.spot .lead circle { fill: #fff; }
.spot .label { display: block; padding: 0 4px 5px 4px; border-bottom: 1.5px solid #fff; transition: border-color .25s, padding .25s; }
.spot.is-left button { left: auto; right: 63px; }
.spot.is-left .lead { right: auto; left: 100%; transform: scaleX(-1); }
.spot button:hover .label, .spot.is-hover .label, .spot button:focus-visible .label { border-bottom-color: var(--ink); padding-right: 16px; }
.spot .plus { transition: transform .3s ease; }
.spot.is-hover .plus { transform: rotate(90deg) scale(1.25); }
.spots.is-pulse .spot .plus { animation: pulse 1.1s ease 2; }
@keyframes pulse { 50% { transform: scale(1.9) rotate(90deg); } }

/* ---------- stránka kategorie ---------- */
.page { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: var(--side) 1fr; pointer-events: none; }
.page[hidden] { display: none; }
.side {
  position: relative; align-self: center; padding: 0 60px 0 var(--pad); pointer-events: auto;
  max-height: calc(100vh - var(--top) - 20px); overflow-y: auto; scrollbar-width: none;
  animation: in-left .7s cubic-bezier(.2, .7, .2, 1) both;
}
.page::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 36vw; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 75% 46% at 34% 52%, rgba(214, 214, 214, .9), rgba(214, 214, 214, .55) 60%, rgba(214, 214, 214, 0));
}
.back { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.back svg { width: 26px; height: 12px; transition: transform .3s; }
.back:hover svg { transform: translateX(-6px); }
.side h1 { margin-top: 26px; font-size: clamp(40px, 5.2vw, 92px); font-weight: 500; line-height: 1; letter-spacing: -.02em; hyphens: manual; overflow-wrap: break-word; }
.side .intro { margin-top: 26px; font-size: 17px; color: #2c2c2c; max-width: 44ch; }
.toc { margin: 34px 0 0; padding: 0; list-style: none; max-width: 400px; }
.toc a { display: flex; gap: 14px; align-items: baseline; padding: 8px 0; text-decoration: none; font-weight: 500; font-size: 16px; border-bottom: 1px solid rgba(22, 22, 22, .25); transition: padding .25s, border-color .25s; }
.toc a span { font-size: 12px; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.is-active { padding-left: 10px; border-bottom-color: var(--ink); }

.content {
  margin-top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; pointer-events: auto;
  padding: 0 var(--pad) 90px 12px; outline: none;
  animation: in-up .8s .25s cubic-bezier(.2, .7, .2, 1) both;
  scrollbar-width: thin; scrollbar-color: rgba(22, 22, 22, .35) transparent;
}
@keyframes in-left { from { opacity: 0; transform: translateX(-30px); } }
@keyframes in-up { from { opacity: 0; transform: translateY(40px); } }

.project { padding-bottom: clamp(50px, 6vw, 90px); scroll-margin-top: 10px; }
.project-head { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin: 14px 0 22px; }
.project-head h2 { font-size: clamp(26px, 2.4vw, 38px); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.project-head .meta { margin-top: 8px; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.project-head .text { font-size: 16px; color: #2a2a2a; max-width: 62ch; }
.row { display: flex; gap: 16px; margin-bottom: 16px;  }
.shot { margin: 0; min-width: 0; position: relative; overflow: hidden; background: #bdbdbd; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .5s; opacity: 0; }
.shot img.is-loaded { opacity: 1; }
.shot:hover img { transform: scale(1.03); }
.shot button { position: absolute; inset: 0; width: 100%; cursor: zoom-in; }
.ph { flex: 1; aspect-ratio: 4 / 3; border: 1.5px dashed rgba(22, 22, 22, .4); display: grid; place-items: center; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* O mně / Kontakt */
.prose { max-width: 760px; padding-top: 26px; }
.prose p { font-size: clamp(17px, 1.25vw, 20px); line-height: 1.65; margin-bottom: 1.3em; }
.prose p:first-child { font-size: clamp(21px, 1.9vw, 30px); line-height: 1.4; font-weight: 500; letter-spacing: -.005em; }
.prose h2 { margin-top: 46px; font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.list { list-style: none; margin: 0 0 40px; padding: 0; }
.list li { padding: 13px 0; border-bottom: 1px solid rgba(22, 22, 22, .25); font-weight: 500; font-size: 18px; }
.rows { margin: 34px 0 0; border-top: 1px solid var(--line); }
.rows div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid rgba(22, 22, 22, .25); }
.rows dt { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.rows dd { margin: 0; font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; font-weight: 500; font-size: 19px; text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid var(--ink); }
.link-arrow svg { width: 34px; height: 12px; }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(18, 18, 18, .96); color: #f1f1f1; }
.lightbox::backdrop { background: rgba(18, 18, 18, .6); }
.lightbox[open] { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; }
.lightbox figure { margin: 0; height: 100vh; padding: 64px 0 22px; display: grid; grid-template-rows: 1fr auto; gap: 14px; min-width: 0; }
.lightbox img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 20px; font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.lightbox figcaption span:last-child { font-variant-numeric: tabular-nums; opacity: .7; }
.lb-btn { color: #f1f1f1; display: grid; place-items: center; width: 60px; height: 60px; justify-self: center; opacity: .8; }
.lb-btn:hover { opacity: 1; }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-btn svg { width: 34px; height: 12px; }
.lb-close { position: absolute; top: 10px; right: 16px; font-size: 22px; z-index: 2; }

/* ---------- menší displeje ---------- */
@media (max-width: 900px) {
  :root { --top: 68px; }
  .top-nav { font-size: 16px; gap: 14px; }
  .lang button { padding: 6px 5px; }
  .page { display: block; overflow-y: auto; pointer-events: auto; padding-top: var(--top); }
  .side { max-height: none; padding: 26px var(--pad) 10px; overflow: visible; }
  .page::before { display: none; }
  .side h1 { margin-top: 16px; }
  .toc { display: none; }
  .content { margin-top: 0; height: auto; overflow: visible; padding: 0 var(--pad) 70px; }
  .hint { display: none; }
}
@media (max-width: 640px) {
  .row { flex-direction: column; gap: 14px; margin-bottom: 14px; max-width: none; }
  .shot { flex: none !important; }
  .hero { top: 44%; }
  .spot button { font-size: 16px; }
  .rows div { grid-template-columns: 1fr; gap: 4px; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox figure { padding: 64px 14px 80px; }
  .lb-prev, .lb-next { position: absolute; bottom: 12px; }
  .lb-prev { left: 20px; } .lb-next { right: 20px; }
}
/* bez WebGL: kategorie jako seznam */
.no-webgl .hero-list { display: block; }
.no-webgl .spots, .no-webgl .hint, .no-webgl .cta { display: none; }
.no-webgl .content, .no-webgl .side { background: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* telefony: popisky na ploše nahradí seznam kategorií pod nadpisem */
@media (max-width: 700px) {
  .spot button { display: none; }
  .hero { top: 50%; transform: translateY(-50%); right: var(--pad); }
  .hero-list { display: block; margin-top: 28px; }
  .cta { display: none; }
}

/* větší aktivní plocha tlačítka kategorie: text + okolí + spojnice až ke křížku na polygonu */
.spot button::before { content: ''; position: absolute; left: -92px; right: -26px; top: -24px; bottom: -58px; }
.spot.is-left button::before { left: -26px; right: -92px; }
@media (max-width: 700px) { .spot button::before { display: none; } }

/* výrazné tlačítko s odkazem ven (Vyzkoušej zde / Hraj zde) */
.btn {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 34px; padding: 20px 30px;
  background: var(--ink); color: #f2f2f2; text-decoration: none; border: 2px solid var(--ink);
  font-size: 18px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.btn svg { width: 34px; height: 12px; transition: transform .3s ease; }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover svg { transform: translateX(8px); }

/* popisky kategorií jsou ve výchozím stavu schované; objeví se po najetí na polygon
   (nebo všechny najednou tlačítkem „Prozkoumejte mou tvorbu“). Bílý polygon s křížkem zůstává. */
.spot button { opacity: 0; pointer-events: none; transition: opacity .25s ease .15s; }
.spot .lead path { stroke-dasharray: 62; stroke-dashoffset: 62; transition: stroke-dashoffset .3s ease; }
.spot .lead circle { transform: scale(0); transform-origin: 3px 27px; transition: transform .2s ease; }
.spot .label { clip-path: inset(-8px 100% -6px 0); transition: clip-path .4s cubic-bezier(.2, .7, .2, 1), border-color .25s, padding .25s; }
.spot.is-left .label { clip-path: inset(-8px 0 -6px 100%); }
.spot.is-hover button, .spots.show-all .spot button, .spot:focus-within button { opacity: 1; pointer-events: auto; transition-delay: 0s; }
.spot.is-hover .lead path, .spots.show-all .lead path, .spot:focus-within .lead path { stroke-dashoffset: 0; }
.spot.is-hover .lead circle, .spots.show-all .lead circle, .spot:focus-within .lead circle { transform: scale(1); }
.spot.is-hover .label, .spots.show-all .label, .spot:focus-within .label { clip-path: inset(-8px -24px -6px -8px); transition-delay: .22s, 0s, 0s; }
.spot.is-hidden button { pointer-events: none !important; }
.cta[aria-pressed="true"] svg { transform: rotate(180deg); }
