/* Raven Studio — světlý portfolio katalog */
@font-face {
  font-family: "Aeonik Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/aeonik-400.woff2) format("woff2");
}
@font-face {
  font-family: "Aeonik Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/aeonik-500.woff2) format("woff2");
}
@font-face {
  font-family: "Aeonik Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/aeonik-700.woff2) format("woff2");
}

:root {
  --bg: #fff;
  --fg: #0a0a0a;
  --mute: #9b9b9b;
  --soft: #5c5c5c;
  --line: #e6e6e6;
  --chip: #f1f1f1;
  --radius: 6px;
  --pad: 16px;
  --gap-x: 14px;
  --gap-y: 30px;
  --row: 300px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Aeonik Pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }
.hi { color: var(--fg); }

.eyebrow {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -.01em;
}
.eyebrow sup { color: var(--mute); font-size: .7em; vertical-align: .5em; margin-left: .15em; }

/* ---------- Horní lišta ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px var(--pad);
  background: linear-gradient(var(--bg) 40%, rgba(255, 255, 255, 0));
  transition: padding .3s;
}
.bar.scrolled { padding-block: 12px; }
.brand {
  display: block;
  width: 150px;
  overflow: hidden;
  transition: width .45s cubic-bezier(.2, .7, .2, 1);
}
.bar.scrolled .brand { width: 27px; } /* zůstane jen znak havrana */
.brand img { display: block; width: 150px; height: auto; }
.nav { display: flex; align-items: center; justify-self: end; font-size: 15px; }
.nav a { margin-left: 28px; white-space: nowrap; }
.nav a { text-decoration: none; color: var(--soft); transition: color .2s; }
.nav a:hover { color: var(--fg); }
.nav .lang { padding-left: 24px; margin-left: 24px; border-left: 1px solid var(--line); color: var(--fg); font-weight: 500; }
.services-lead a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.services-lead a:hover { color: var(--fg); }

/* ---------- Úvod ---------- */
.hero { padding: 56px var(--pad) 56px; }

.display {
  margin: 0;
  max-width: 17ch;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--mute);
  text-wrap: balance;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 4fr;
  gap: 12px 24px;
  margin-top: 48px;
}
.hero-foot .eyebrow { padding-top: .35em; }

.clients {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--fg);
}
.clients li { display: inline; transition: color .2s; }
.clients li:not(:last-child)::after { content: ","; color: var(--mute); }
.clients li:nth-last-child(2)::after { content: ""; }
.clients .more { color: var(--mute); }

/* ---------- Práce ---------- */
.work { padding: 0 var(--pad) 80px; scroll-margin-top: 64px; }

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.size { display: flex; gap: 6px; }
.size button,
.filters button {
  font: 400 13px/1 "Aeonik Pro", Arial, sans-serif;
  color: var(--soft);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s;
}
.size button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; }
.size button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.size button:hover:not([aria-pressed="true"]) { color: var(--fg); border-color: var(--soft); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 28px;
}
.filters[hidden] { display: none; }
.filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 15px;
}
.filters button::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid var(--mute);
  border-radius: 50%;
  transition: background .2s, border-color .2s;
}
.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { color: var(--fg); }
.filters button[aria-pressed="true"]::before { background: var(--fg); border-color: var(--fg); }
.filters small { color: var(--mute); font-size: 11px; }

/* justified rows: šířka dlaždice podle poměru stran, popisek pod obrázkem */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-y) var(--gap-x);
}
.gallery::after { content: ""; flex-grow: 999; }
/* starší Safari (do iOS 14.4) neumí mezery ve flexboxu -> okraje */
@supports not (inset: 0) {
  .gallery { margin-right: calc(-1 * var(--gap-x)); }
  .tile { margin: 0 var(--gap-x) var(--gap-y) 0; }
  .filters button { margin: 0 22px 6px 0; }
  .filters button::before { margin-right: 8px; }
  .chips span { margin: 0 4px 4px 0; }
  .size button + button { margin-left: 6px; }
  .foot-row > * + * { margin-left: 16px; }
}
.js .work[data-shuffle="on"] .gallery:not(.ready) { visibility: hidden; animation: reveal 0s 2s forwards; } /* před zamícháním skryto, pojistka 2 s */

.tile {
  display: flex;
  flex-direction: column;
  flex-grow: var(--a);                     /* poměr stran šířka / výška (počítá generátor) */
  flex-basis: calc(var(--row) * var(--a));
  min-width: 0;
  text-decoration: none;
}
.tile[hidden] { display: none; }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f3f3f3 center / cover no-repeat; /* rozmazaný náhled z HTML */
}
.media::before {
  content: "";
  display: block;
  padding-bottom: var(--p);                /* výška / šířka v % */
}
.media img,
.media video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .6s ease;
}
.js .media img:not(.loaded) { opacity: 0; animation: reveal 0s 3s forwards; } /* prolnutí; pojistka: po 3 s se ukáže vždy */
@keyframes reveal { to { opacity: 1; visibility: visible; } }

.meta { display: block; padding-top: 12px; }
.title {
  display: block;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chips span {
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1;
  color: var(--soft);
  background: var(--chip);
  border-radius: 3px;
}
.gallery.small .chips { display: none; }
.work[data-captions="off"] .gallery { --gap-y: var(--gap-x); } /* bez popisků stejné mezery */
.gallery.small .title { font-size: 14px; }

@media (hover: hover) {
  .tile:hover .media img,
  .tile:hover .media video { transform: scale(1.035); }
}
.tile:focus-visible { outline: none; }
.tile:focus-visible .media { outline: 2px solid var(--fg); outline-offset: 3px; }

/* kruhový kurzor nad pracemi */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(.3);
  transition: opacity .2s, transform .25s cubic-bezier(.2, .7, .2, 1);
}
.cursor.on { opacity: 1; transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { .has-cursor .media { cursor: none; } }

/* ---------- Služby ---------- */
.services {
  padding: 96px var(--pad);
  border-top: 1px solid var(--line);
  scroll-margin-top: 64px;
}
.services-lead {
  max-width: 30ch;
  margin: 32px 0 0;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--mute);
}
.services-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  margin: 64px 0 0;
  padding: 0;
}
.services-list li { padding-top: 16px; border-top: 1px solid var(--line); }
.services-list h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.services-list p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
@media (min-width: 1100px) { .services-lead { font-size: 44px; } }
@media (max-width: 900px) { .services-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-list { grid-template-columns: 1fr; gap: 28px; } .services { padding-block: 64px; } .services-lead { font-size: 24px; } }

/* ---------- Kontakt ---------- */
.contact {
  padding: 80px var(--pad);
  border-top: 1px solid var(--line);
  scroll-margin-top: 64px;
}
.cta {
  margin: 28px 0 0;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--mute);
}
.mail {
  display: inline-block;
  margin-top: 28px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -.03em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .14em;
  text-decoration-color: var(--mute);
  word-break: break-all;
  transition: text-decoration-color .2s;
}
.mail:hover { text-decoration-color: var(--fg); }

.details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
  font-style: normal;
  font-size: 16px;
}
.details .k { display: block; margin-bottom: 6px; color: var(--mute); font-size: 13px; }
.details a { text-decoration: none; }
.details a:hover { text-decoration: underline; }

/* ---------- Patička ---------- */
.footer {
  padding: 80px var(--pad) 28px;
  border-top: 1px solid var(--line);
  background: #0a0a0a;
  color: #fff;
  border-top: 0;
}
.footer .hi { color: #fff; }
.quote {
  margin: 0 0 80px;
  max-width: 20ch;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
  color: #6f6f6f;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #9a9a9a;
}
.foot-row img { width: 110px; height: auto; filter: invert(1); }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: #fff; }

/* ---------- Souhlas s cookies ---------- */
.consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 400px;
  padding: 20px;
  border-radius: 10px;
  background: #0a0a0a;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.consent p { margin: 0 0 16px; color: #cfcfcf; }
.consent-buttons { display: flex; }
.consent-buttons button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #fff;
  font: 500 14px/1 "Aeonik Pro", Arial, sans-serif;
  cursor: pointer;
}
.consent-buttons button + button { margin-left: 8px; }
.consent-accept { background: #fff; color: #0a0a0a; }
.consent-reject { background: transparent; color: #fff; }
.consent-buttons button:hover { opacity: .85; }
.cookie-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.cookie-link:hover { color: #fff; }
@media (max-width: 560px) { .consent { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; }
.lightbox img, .lightbox video { display: block; max-width: 86vw; max-height: 80vh; margin: 0 auto; border-radius: var(--radius); }
.lightbox figure [hidden] { display: none; }
.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 86vw;
  margin-top: 14px;
  font-size: 15px;
  color: var(--soft);
}
.lightbox figcaption span { color: var(--fg); }
.lightbox figcaption b { white-space: nowrap; font-weight: 400; color: var(--mute); font-variant-numeric: tabular-nums; }
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: var(--soft);
  cursor: pointer;
  font-family: inherit;
}
.lightbox button:hover { color: var(--fg); }
.lb-close { top: 18px; right: var(--pad); font-size: 15px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 30px; padding: 16px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }

/* plynulé velikosti jen pro prohlížeče, které umí clamp() (starší dostanou pevné hodnoty výše) */
@supports (width: clamp(1px, 1vw, 2px)) {
  :root { --pad: clamp(16px, 4vw, 56px); }
  .hero { padding: clamp(56px, 10vw, 150px) var(--pad) clamp(56px, 8vw, 110px); }
  .display { font-size: clamp(44px, 7.4vw, 128px); }
  .hero-foot { margin-top: clamp(48px, 7vw, 104px); }
  .clients { font-size: clamp(22px, 2.7vw, 44px); }
  .work { padding: 0 var(--pad) clamp(80px, 10vw, 150px); }
  .contact { padding: clamp(80px, 10vw, 150px) var(--pad); }
  .cta { margin: clamp(28px, 4vw, 48px) 0 0; font-size: clamp(44px, 7.4vw, 128px); }
  .mail { margin-top: clamp(28px, 4vw, 56px); font-size: clamp(24px, 3.6vw, 60px); }
  .details { margin-top: clamp(56px, 7vw, 104px); }
  .footer { padding: clamp(80px, 10vw, 150px) var(--pad) 28px; }
  .quote { margin: 0 0 clamp(80px, 10vw, 150px); font-size: clamp(32px, 4.6vw, 80px); }
}

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  :root { --row: 160px; --gap-x: 8px; --gap-y: 22px; }
    .nav { font-size: 14px; }
  .nav a { margin-left: 14px; }
  .nav .lang { padding-left: 14px; margin-left: 14px; }
  .brand, .brand img { width: 120px; }
  .bar.scrolled .brand { width: 22px; }
  .hero-foot { grid-template-columns: 1fr; }
  .size { display: none; }
  .title { font-size: 14px; }
  .chips { display: none; }
  .details { grid-template-columns: 1fr 1fr; }
  .lightbox img, .lightbox video { max-width: 100vw; border-radius: 0; }
  .lightbox figcaption { padding-inline: 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .media img, .media video, .brand, .cursor { transition: none; }
  .js .media img:not(.loaded) { opacity: 1; }
}
