/* Hidden Department – Martin Motáček. Tmavý prezentačný web: veľká typografia, mriežka prác, prehliadač prezentácií. */
:root {
  --bg: #0c0c0d;
  --bg-2: #141416;
  --line: rgba(242, 239, 233, .12);
  --ink: #f2efe9;
  --muted: #8f8b83;
  --accent: #ff5b2e;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* jemné zrno cez celú stránku */
.grain { position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite; }
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); } 60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); } }

/* hlavička */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--pad); mix-blend-mode: difference; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.15; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink); }
.nav { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 14px; font-weight: 500; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* úvod */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--pad) clamp(32px, 6vh, 72px); position: relative; }
.hero::before { content: ""; position: absolute; width: 60vmax; height: 60vmax; right: -18vmax; top: -22vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 46, .28), rgba(255, 91, 46, 0) 65%); filter: blur(20px); pointer-events: none; animation: glow 14s var(--ease) infinite alternate; }
@keyframes glow { to { transform: translate(-8vmax, 10vmax) scale(1.15); } }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 clamp(18px, 3vh, 32px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 91, 46, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 91, 46, .55); } 70% { box-shadow: 0 0 0 12px rgba(255, 91, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 91, 46, 0); } }
.hero-title { margin: 0; font-weight: 500; font-size: clamp(56px, 13.5vw, 228px); line-height: .9; letter-spacing: -.045em; position: relative; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line.small { font-size: .32em; letter-spacing: -.02em; font-weight: 400; color: var(--muted); margin-top: .35em; }
.hero-title .w { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; }
.hero-title .line:nth-child(2) .w { animation-delay: .12s; }
.hero-title .line:nth-child(3) .w { animation-delay: .3s; }
.hero-title .serif { font-weight: 400; letter-spacing: -.02em; padding-right: .04em; }
.hero-title .comma { color: var(--accent); }
@keyframes rise { to { transform: translateY(0); } }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: clamp(28px, 5vh, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.lead { max-width: 640px; margin: 0; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.45; font-weight: 300; }
.lead em { font-family: var(--serif); font-size: 1.18em; color: var(--ink); }
.scroll-cue { display: flex; align-items: center; gap: 14px; font-size: 14px; white-space: nowrap; color: var(--muted); transition: color .3s; }
.scroll-cue:hover { color: var(--ink); }
.scroll-cue i { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.scroll-cue i::after { content: "↓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* bežiaci pás názvov */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; width: max-content; gap: 48px; animation: marquee 38s linear infinite; font-size: clamp(28px, 4vw, 56px); letter-spacing: -.02em; white-space: nowrap; }
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "✳"; color: var(--accent); font-size: .6em; }
.marquee-track .serif { color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* práce */
.work { padding: clamp(72px, 12vh, 140px) var(--pad); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(36px, 6vh, 72px); }
.section-head h2 { margin: 0; font-size: clamp(44px, 7vw, 112px); font-weight: 500; letter-spacing: -.04em; line-height: .95; }
.section-head p { max-width: 380px; margin: 0; color: var(--muted); font-size: 16px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px) clamp(16px, 2.4vw, 36px); }
.grid li:nth-child(even) { transform: translateY(clamp(0px, 8vw, 120px)); }
.tile { display: block; cursor: none; }
.tile-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: var(--bg-2); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease), filter .8s; filter: saturate(.92); user-select: none; -webkit-user-drag: none; }
.tile:hover .tile-media img, .tile:focus-visible .tile-media img { transform: scale(1.08); filter: saturate(1.05); }
.tile-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .45)); opacity: 0; transition: opacity .6s; }
.tile:hover .tile-media::after { opacity: 1; }
.tile-badge { position: absolute; left: 16px; bottom: 16px; z-index: 1; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: rgba(12, 12, 13, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transform: translateY(8px); transition: .5s var(--ease); }
.tile:hover .tile-badge, .tile:focus-visible .tile-badge { opacity: 1; transform: none; }
.tile-info { display: flex; align-items: baseline; gap: 16px; padding-top: 18px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.tile-no { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2ch; }
.tile-name { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.tile-kind { margin-left: auto; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.6vw, 22px); color: var(--muted); text-align: right; }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }

/* kurzor nad dlaždicami */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; pointer-events: none; transform: scale(0); transition: transform .35s var(--ease); }
.cursor.on { transform: scale(1); }

/* kontakt */
.contact { padding: clamp(80px, 14vh, 160px) var(--pad) clamp(56px, 9vh, 96px); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; width: 70vmax; height: 70vmax; left: -25vmax; bottom: -45vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 91, 46, .22), transparent 65%); pointer-events: none; }
.contact-title { margin: 0 0 clamp(40px, 7vh, 80px); font-size: clamp(44px, 8.4vw, 140px); font-weight: 500; letter-spacing: -.045em; line-height: .95; position: relative; }
.contact-title .serif { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; position: relative; }
.contact-big { position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: 18px; background: rgba(20, 20, 22, .6); overflow: hidden; transition: border-color .4s, transform .6s var(--ease); }
.contact-big::before { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateY(101%); transition: transform .7s var(--ease); z-index: 0; }
.contact-big > * { position: relative; z-index: 1; }
.contact-big:hover { border-color: var(--accent); }
.contact-big:hover::before { transform: translateY(0); }
.contact-big .k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.contact-big:hover .k { color: rgba(255, 255, 255, .8); }
.contact-big .v { font-size: clamp(22px, 3.1vw, 48px); font-weight: 500; letter-spacing: -.03em; overflow-wrap: anywhere; }
.contact-big .arr { position: absolute; right: clamp(20px, 3vw, 36px); top: clamp(20px, 3vw, 32px); font-size: clamp(22px, 2.6vw, 36px); transition: transform .5s var(--ease); }
.contact-big:hover .arr { transform: translate(4px, -4px) rotate(45deg); }
.contact-foot { display: flex; gap: clamp(32px, 8vw, 120px); margin-top: clamp(40px, 6vh, 64px); color: var(--muted); font-size: 15px; position: relative; }
.contact-foot strong { color: var(--ink); font-weight: 500; }
.foot { display: flex; justify-content: space-between; padding: 24px var(--pad); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* objavenie pri scrollovaní */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* prehliadač prezentácie */
.viewer { position: fixed; inset: 0; z-index: 200; background: #08080a; display: flex; flex-direction: column; animation: vin .5s var(--ease); }
.viewer[hidden] { display: none; }
@keyframes vin { from { opacity: 0; transform: scale(.985); } }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--pad); border-bottom: 1px solid var(--line); background: rgba(8, 8, 10, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.viewer-meta { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.viewer-no { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.viewer-meta h3 { margin: 0; font-size: clamp(17px, 2vw, 22px); font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-kind { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 18px; white-space: nowrap; }
.viewer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.viewer-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.vbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: background .3s, border-color .3s; }
.vbtn:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.vbtn.close:hover { background: var(--accent); border-color: var(--accent); }
.viewer-progress { height: 2px; background: var(--line); }
.viewer-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.viewer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(16px, 3vw, 40px) var(--pad) 80px; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2vw, 24px); outline: none; }
.slide { flex-shrink: 0; width: 100%; max-width: 1400px; background: var(--bg-2); border-radius: 4px; overflow: hidden; position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.slide img { width: 100%; height: auto; opacity: 0; transition: opacity .6s; pointer-events: none; -webkit-user-drag: none; }
.slide img.ok { opacity: 1; }
.slide.video { background: #000; }
.slide video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.slide-label { flex-shrink: 0; align-self: flex-start; max-width: 1400px; width: 100%; margin: 8px auto 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.viewer-end { flex-shrink: 0; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: .3s; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
body.locked { overflow: hidden; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .grid li:nth-child(even) { transform: none; }
  .section-head, .hero-foot { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .tile { cursor: pointer; }
  .tile-badge { opacity: 1; transform: none; }
  .viewer-kind, .viewer-count { display: none; }
  .viewer-bar { padding-top: max(14px, env(safe-area-inset-top)); }
}
@media (max-width: 520px) {
  .brand-name { display: none; }
  .contact-foot { flex-direction: column; gap: 16px; }
  .tile-info { flex-wrap: wrap; }
  .tile-kind { margin-left: calc(2ch + 16px); width: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-title .w { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
