/* Pavelka Design — scroll film */
:root {
  --paper: #F1ECE4;
  --ink: #16140F;
  --ink-2: #4A453C;
  --line: rgba(22, 20, 15, .14);
  --red: #D8432B;
  --yellow: #E9A92A;
  --cobalt: #2442A6;
  --pink: #E9A7B4;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--paper);
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); letter-spacing: -.02em; }
.loader__mark span, .nav__logo span { color: var(--red); }
.loader__bar { width: min(260px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s linear; }
.loader__pct { color: var(--ink-2); }

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--paper); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .06; 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='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* soft left veil so copy always reads on bright frames */
.stage__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(241,236,228,.78) 0%, rgba(241,236,228,.45) 30%, rgba(241,236,228,0) 55%);
  opacity: var(--veil, 1); transition: opacity .4s linear;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--pad);
}
.nav__logo { font-family: var(--serif); font-size: 28px; text-decoration: none; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { text-decoration: none; font-size: 14px; position: relative; }
.nav__links 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__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  font-size: 13px; text-decoration: none; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); transition: background .3s;
}
.nav__cta:hover { background: var(--red); }

/* ---------- Rail ---------- */
.rail {
  position: fixed; right: var(--pad); bottom: 28px; z-index: 20;
  display: flex; gap: 14px; align-items: stretch;
  padding: 14px 18px 14px 16px; border-radius: 16px;
  background: rgba(241,236,228,.62); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.6);
}
.rail { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.rail.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
.rail__track { width: 1px; background: var(--line); position: relative; }
.rail__track i { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--ink); }
.rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rail__list li {
  font-size: 12px; color: var(--ink-2); cursor: pointer; opacity: .55;
  transition: opacity .3s, transform .4s var(--ease); white-space: nowrap;
}
.rail__list li span { margin-right: 6px; font-size: 10px; }
.rail__list li.is-active { opacity: 1; color: var(--ink); transform: translateX(-4px); }

/* ---------- Track + panels ---------- */
.track { position: relative; z-index: 2; pointer-events: none; }
.panel {
  position: fixed; z-index: 10;
  left: var(--pad); top: 50%;
  width: min(560px, 44vw);
  transform: translateY(calc(-50% + var(--y, 0px)));
  opacity: 0; visibility: hidden; pointer-events: none;
  will-change: opacity, transform;
}
.panel.is-on { visibility: visible; pointer-events: auto; }

.eyebrow { margin: 0 0 22px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--red { background: var(--red); } .dot--yellow { background: var(--yellow); }
.dot--cobalt { background: var(--cobalt); } .dot--pink { background: var(--pink); }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 8.4vw, 132px); line-height: .92; letter-spacing: -.025em;
  margin: 0 0 26px;
}
.display em { font-style: italic; color: var(--red); }
.display--m { font-size: clamp(42px, 5.2vw, 82px); }
.display .line { display: block; overflow: hidden; padding-bottom: .06em; }
.display .line > span { display: inline-block; transform: translateY(var(--rise, 0%)); }

.lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 30em; margin: 0 0 34px; }
.panel p { max-width: 34em; }
.panel p a { text-underline-offset: 3px; }

.hero__cta { display: flex; align-items: center; gap: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 15px 26px; border-radius: 999px; font-size: 15px; font-weight: 500;
  transition: transform .5s var(--ease), background .3s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--red); transform: translateY(-2px); }
.scrollhint { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.scrollhint i { width: 1px; height: 34px; background: var(--line); position: relative; overflow: hidden; }
.scrollhint i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink);
  animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }

/* about */
.facts { display: flex; gap: 36px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts div { margin: 0; }
.facts dt { font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 14px; color: var(--ink-2); }

/* services */
.panel--services {
  width: min(640px, 48vw); padding: 34px 36px 30px; border-radius: 22px;
  background: rgba(241,236,228,.74); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.65); box-shadow: 0 30px 80px -40px rgba(40,30,20,.35);
}
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.services li {
  padding: 20px 20px 22px 0; border-bottom: 1px solid var(--line); position: relative;
  transform: translateY(var(--sy, 0px)); opacity: var(--so, 1);
}
.services li:nth-child(odd) { border-right: 1px solid var(--line); }
.services li:nth-child(even) { padding-left: 20px; }
.services li::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 34px; background: var(--c); }
.services li:nth-child(even)::before { left: 20px; }
.services h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.05; margin: 10px 0 6px; }
.services p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* work — projekty v rámoch na stenách */
.wall { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; overflow: hidden; }
.wall.is-on { pointer-events: auto; }
.wall__inner { position: absolute; inset: 0; opacity: 0; transition: opacity .35s linear; }
.wall.is-aligned .wall__inner { opacity: 1; }
.wall:not(.is-aligned) { pointer-events: none; }
/* odchod na podstránku */
html::after { content: ""; position: fixed; inset: 0; z-index: 200; background: var(--paper); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
html.is-leaving::after { opacity: 1; }
/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.art {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; display: block; overflow: hidden;
  background: #d9d2c6; text-decoration: none; color: #fff;
  opacity: var(--reveal, 0);
  backface-visibility: hidden;
}
.art img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  filter: saturate(.92) contrast(.96) brightness(.97);
  transform: scale(calc(1.12 - var(--reveal, 0) * .12));
  transition: filter .5s var(--ease);
}
/* jemné tieňovanie, aby obraz sedel do svetla scény */
.art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(40, 30, 20, .28);
  background: linear-gradient(180deg, rgba(255,245,230,.10), rgba(40,30,20,.10));
}
.art__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 90px 36px 34px; font-family: var(--serif); font-size: 58px; line-height: 1;
  background: linear-gradient(0deg, rgba(20,16,12,.72), rgba(20,16,12,0));
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.art__label .mono { display: block; font-size: 22px; margin-bottom: 12px; opacity: .8; }
.art:hover .art__label, .art:focus-visible .art__label { transform: translateY(0); }
.wall.has-hover .art:not(:hover):not(:focus-visible) img { filter: saturate(.5) brightness(.85); }
.art:focus-visible { outline: none; }

.panel--work {
  left: 50%; width: min(560px, 44vw); top: auto; bottom: clamp(24px, 5vh, 56px);
  transform: translate(-50%, var(--y, 0px)); text-align: center;
}
.panel--work .eyebrow { justify-content: center; margin-bottom: 12px; }
.panel--work .display { font-size: clamp(40px, 4vw, 64px); margin-bottom: 16px; }
.panel--work .work__info { text-align: left; }
.work__info {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; margin-bottom: 18px;
  background: rgba(241,236,228,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.6); min-height: 76px;
}
.work__info strong { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.work__info .mono { color: var(--ink-2); }
.work__info.is-project strong { color: var(--red); }
.work__all { display: inline-block; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* contact */
.contact__mail {
  display: inline-block; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 50px);
  text-decoration: none; border-bottom: 1px solid var(--ink); line-height: 1.15; margin-bottom: 30px;
  transition: color .3s, border-color .3s;
}
.contact__mail:hover { color: var(--red); border-color: var(--red); }
.contact__meta { display: grid; gap: 8px; margin-bottom: 36px; }
.contact__meta p { margin: 0; display: flex; gap: 16px; font-size: 15px; }
.contact__meta .mono { width: 64px; flex: none; color: var(--ink-2); padding-top: 3px; }
.foot { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); font-size: 10px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1024px) {
  .rail { display: none; }
  .panel { width: min(560px, 60vw); }
  .panel--services { width: min(620px, 70vw); }
}
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav__links { display: none; }
  .nav__cta { padding: 9px 14px; font-size: 12px; }
  .stage__veil { background: linear-gradient(0deg, rgba(241,236,228,.94) 0%, rgba(241,236,228,.82) 38%, rgba(241,236,228,0) 62%); }
  .panel, .panel--services { left: 20px; right: 20px; width: auto; top: auto; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateY(var(--y, 0px)); }
  .display { font-size: clamp(48px, 14vw, 72px); margin-bottom: 16px; }
  .display--m { font-size: clamp(36px, 10vw, 52px); }
  .lead { font-size: 16px; margin-bottom: 22px; }
  .eyebrow { margin-bottom: 14px; }
  .facts { gap: 22px; margin-top: 20px; padding-top: 16px; }
  .services li { padding: 14px 12px 14px 0; }
  .services li:nth-child(even) { padding-left: 12px; }
  .services li:nth-child(even)::before { left: 12px; }
  .services h3 { font-size: 20px; margin: 6px 0 2px; }
  .services p { display: none; }
  .panel--work { left: 20px; right: 20px; width: auto; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateY(var(--y, 0px)); text-align: left; }
  .panel--work .eyebrow { justify-content: flex-start; }
  .panel--work .display { font-size: 34px; margin-bottom: 10px; }
  .work__info { display: none; }
  .art__label { transform: none; font-size: 64px; }
  .panel--services { padding: 22px 20px 18px; border-radius: 18px; }
  .contact__meta p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .scrollhint i::after { animation: none; }
}

/* ---------- Mobilné menu ---------- */
.nav__burger { display: none; }
.mnav[hidden] { display: none; }
@media (max-width: 768px) {
  .nav { z-index: 60; }
  .nav__cta { display: none; }
  .nav__burger {
    display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; padding: 0; border: 0;
    border-radius: 50%; background: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background .3s;
  }
  .nav__burger span { display: block; width: 18px; height: 1.5px; background: var(--paper); transition: transform .5s var(--ease); }
  html.mnav-open .nav__burger { background: var(--red); }
  html.mnav-open .nav__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  html.mnav-open .nav__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  html.mnav-open, html.mnav-open body { overflow: hidden; }

  .mnav {
    position: fixed; inset: 0; z-index: 55; background: var(--paper);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: calc(100px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
    clip-path: circle(0% at calc(100% - 43px) 39px);
    transition: clip-path .7s var(--ease);
    overflow-y: auto;
  }
  .mnav.is-open { clip-path: circle(150% at calc(100% - 43px) 39px); }
  .mnav__list { display: flex; flex-direction: column; }
  .mnav__link {
    display: flex; align-items: baseline; gap: 14px; text-decoration: none; color: var(--ink);
    font-family: var(--serif); font-size: clamp(40px, 12vw, 56px); line-height: 1.12; padding: 6px 0;
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s var(--ease), transform .7s var(--ease), color .3s;
    transition-delay: calc(.12s + var(--i) * .05s);
  }
  .mnav__link .mono { position: relative; top: -.9em; color: var(--ink-2); }
  .mnav__link .mono::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); margin-right: 8px; vertical-align: middle; }
  .mnav__link:active { color: var(--red); }
  .mnav.is-open .mnav__link { opacity: 1; transform: none; }
  .mnav__foot { display: grid; gap: 16px; justify-items: start; padding-top: 30px; opacity: 0; transition: opacity .6s .45s; }
  .mnav.is-open .mnav__foot { opacity: 1; }
  .mnav__mail { font-family: var(--serif); font-size: 24px; text-decoration: none; border-bottom: 1px solid var(--ink); }
  .mnav__foot .mono { color: var(--ink-2); margin: 0; }
  .mnav__foot .mono a { text-decoration: none; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .mnav, .mnav__link, .mnav__foot { transition: none; }
}
