/* =========================================================
   TADEÁŠ DUŠEK — PORTFOLIO
   Barvy a fonty jsou v :root níže — tam se mění paleta.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg: #0b0b0d;             /* bold, opravdová černá */
  --bg-soft: #141416;
  --bg-alt: #101012;
  --fg: #f7f7f8;
  --muted: #a3a5ab;
  --muted-2: #6e7075;
  --accent: #1276e9;        /* bold modrá */
  --accent-2: #4d9df2;
  --accent-soft: rgba(18, 118, 233, 0.16);
  --card-bg: #141416;
  --border: #242427;
  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1220px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* film grain — more pronounced, tactile, moody */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* paper-through-ink texture: screen blend only shows up over dark backgrounds,
   so white sections stay untouched while black sections get a lit-through grain.
   Organic (turbulence, not pure static) so it reads more like real film grain than
   digital noise, tuned to a "M+" strength — visible without washing black to gray.
   Kept neutral (not blue-tinted) and without a vignette — blue stays reserved for
   the sharp accent elements (logo, buttons, links, doodles) instead of being
   diffused into the background, which read as too cosmic/technical. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2999;
  pointer-events: none;
  opacity: 0.62;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n2'><feTurbulence type='turbulence' baseFrequency='0.45' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.11 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n2)'/></svg>");
}

/* ---------- LIGHT SECTION (bold black/white alternation, no gradients) ---------- */
.section-light {
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --bg-alt: #f5f5f3;
  --fg: #0d0d0f;
  --muted: #55565c;
  --muted-2: #86878c;
  --card-bg: #ffffff;
  --border: #e3e3e1;
  background: var(--bg);
  color: var(--fg);
}

/* ---------- QUOTE BAND (short dark punctuation between light sections) ---------- */
.quote-band { padding: 76px 0; text-align: center; }
.quote-band-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  color: var(--fg);
  max-width: 740px;
  margin: 0 auto;
}
.quote-band-text span {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

/* ---------- DOODLE LINES ----------
   One consistent signature squiggle, always in the same top-right spot of
   every hero — bigger and fainter than before so it reads as a deliberate
   repeating mark rather than scattered one-off decoration. */
.doodle-line {
  position: absolute;
  pointer-events: none;
  opacity: 0.22;
  z-index: 1;
}
.doodle-line--hero { top: 10px; right: 22px; width: 170px; height: auto; color: var(--accent); }

/* CTA circle scribble — a loose hand-drawn ring around the button itself,
   so it has a clear job (point at the action) instead of sitting as
   ambient decoration */
.cta-btn-wrap { position: relative; display: inline-flex; }
.doodle-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: calc(100% + 64px);
  height: calc(100% + 48px);
  transform: translate(-50%, -50%) rotate(-2deg);
  pointer-events: none;
  opacity: 0.4;
  color: #fff;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

::selection { background: var(--accent); color: #fff; }

/* ---------- BRAND BAR (persistent blue strip — pushes blue toward ~20% of the palette) ---------- */
.brand-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  /* musí být nad úplně vším (i nad .about-photo, co je schválně vytažená
     nad grain overlay) — jinak by při odrazovém přescrollování nahoru na
     mobilu obsah stránky na chvíli překryl tenhle proužek. */
  z-index: 3600;
}

/* ---------- NAV ---------- */
header.site {
  position: sticky;
  top: 3px;
  /* výš než cokoliv v obsahu stránky (i .about-photo, co je schválně
     vytažená nad grain overlay na 3001) — jinak by rozbalené mobilní menu
     zajíždělo POD fotku, místo aby bylo úplně navrchu. */
  z-index: 3500;
  background: #0b0b0d;
  border-bottom: 1px solid var(--border);
}

/* faint echo of the page-wide grain, kept subtler so the nav still reads as clean UI chrome */
header.site::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n3'><feTurbulence type='turbulence' baseFrequency='0.45' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.11 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n3)'/></svg>");
}

nav.wrap { display: flex; align-items: center; gap: 48px; height: 78px; }

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f7f7f8;
}

.logo-mark {
  height: 30px; width: auto;
  flex: none;
}

.nav-links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--fg); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  width: 42px; height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- HERO ---------- */
.hero { padding: 88px 0 60px; position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* ---------- HERO SHOWREEL (index.html — full-bleed looping video) ---------- */
/* Desktop: video oříznuté na pevnou výšku (cover) s popiskem přes něj,
   jako to bylo původně. Mobil: video se nekrouje (vlastní poměr stran,
   celé vidět) a popisek je POD ním, ne přes něj — viz media query níž. */
.hero-video-section { padding: 0; overflow: hidden; }
.hero-video-wrap {
  width: 100%;
  height: 82vh;
  min-height: 460px;
  max-height: 820px;
  position: relative;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.hero-video-caption-inner { display: flex; flex-direction: column; align-items: center; }
.hero-video-divider {
  width: 130px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 22px 0;
  box-shadow: 0 2px 14px rgba(18,118,233,0.55);
}
.hero-video-caption .eyebrow {
  color: #fff;
  margin: 0;
  font-size: clamp(1.2rem, 3.1vw, 1.95rem);
  letter-spacing: 0.15em;
  text-shadow: 0 3px 22px rgba(0,0,0,0.5), 0 8px 40px rgba(0,0,0,0.4);
}

h1.hero-video-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
  text-shadow: 0 6px 36px rgba(0,0,0,0.45), 0 12px 60px rgba(0,0,0,0.4);
}

@media (max-width: 700px) {
  /* na mobilu je poměr videa moc odlišný od pevné výšky boxu — "cover" by
     ořízl boky/vršek. Necháváme video celé (výška podle jeho vlastního
     poměru stran) a popisek posuneme pod něj jako normální blok, ne přes
     video — ať vždycky vidíš celý záběr i celý text bez překryvu. */
  .hero-video-wrap {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .hero-video {
    height: auto;
    object-fit: initial;
  }
  .hero-video-caption {
    position: static;
    inset: auto;
    display: block;
    padding: 40px 0 8px;
    pointer-events: auto;
  }
  .hero-video-caption .eyebrow {
    color: var(--muted);
    font-size: clamp(1.1rem, 2.6vw, 1.5rem);
    text-shadow: none;
  }
  h1.hero-video-title { color: var(--fg); text-shadow: none; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.eyebrow .rec {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex: none;
}

h1.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.9rem);
  line-height: 1.03;
  margin: 0 0 26px;
  letter-spacing: -0.01em;
}

/* O mně — krátký nadpis "O mně" je jen dvě slova, takže ve výchozí velikosti
   (laděné na delší tříslovné/víceslovné nadpisy) působil zbytečně obřím
   dojmem. Mírně zmenšeno jen tady, ostatní hero nadpisy zůstávají beze změny. */
h1.hero-title--compact {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}

h1.hero-title .accent-word {
  font-weight: 700;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 10px;
}

.hero-sub { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 560px; margin: 0 0 40px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-weight: 600; font-size: 0.96rem;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.14); box-shadow: 0 0 0 5px var(--accent-soft), 0 12px 32px var(--accent-soft); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(255,255,255,0.04); color: var(--accent-2); }

.hero-stats { display: flex; gap: 44px; margin-top: 60px; flex-wrap: wrap; }

.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; }
.stat-num .ghost { color: transparent; -webkit-text-stroke: 1px var(--border); }
.stat-label { font-size: 0.82rem; color: var(--muted-2); font-family: var(--font-mono); }

/* ---------- VIEWFINDER (video/camera frame motif) ---------- */
.viewfinder {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.viewfinder:hover { transform: scale(1.015); }

/* YouTube zdroje jsou na šířku, ne na výšku jako Instagram reels */
.viewfinder--wide { aspect-ratio: 16 / 9; }
.viewfinder--wide .vf-media { border: 0; }

.viewfinder::before,
.viewfinder::after,
.viewfinder .corner-tl,
.viewfinder .corner-br { content: ""; }

.vf-corner {
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid var(--accent);
  opacity: 0.95;
  z-index: 5;
  pointer-events: none;
}
.vf-tl { top: 14px; left: 14px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.vf-tr { top: 14px; right: 14px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.vf-bl { bottom: 14px; left: 14px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.vf-br { bottom: 14px; right: 14px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

.viewfinder .vf-media,
.viewfinder blockquote.instagram-media,
.viewfinder iframe.instagram-media {
  width: 100% !important; max-width: 100% !important; height: 100% !important;
  margin: 0 auto !important; display: block !important;
}
/* Instagram's embed.js nahrazuje blockquote skutečným <iframe> (a někdy ho
   navíc obalí dalším <div>em) — ten obal si nese svůj vlastní pevný
   "max-width" přímo v HTML od Instagramu (typicky 326–658px), který výše
   uvedené pravidlo nepokrylo, takže se embed choval jako užší krabička
   nalepená vlevo. Proto omezujeme šířku a centrujeme margin/auto úplně
   všech přímých potomků .viewfinder, ne jen konkrétních tagů/tříd. */
.viewfinder > * {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.viewfinder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-placeholder {
  position: absolute; inset: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); text-align: center; padding: 24px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
}

.media-placeholder .play-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}

.media-placeholder small { font-size: 0.76rem; line-height: 1.45; font-family: var(--font-mono); }

/* ---------- SECTION SHARED ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--bg-soft); }

.section-head { margin-bottom: 52px; max-width: 620px; position: relative; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.section-tag::before {
  content: "";
  width: 28px; height: 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='10'><path d='M1,6 Q4,1 8,6 T16,6 T24,6' stroke='%231276e9' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  flex: none;
}

h2.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 14px; letter-spacing: -0.01em;
}

.section-desc { color: var(--muted); font-size: 1.03rem; margin: 0; }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: center; }

.about-photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem;
  text-align: center; padding: 24px; position: relative;
  overflow: hidden;
  /* stránka má přes sebe napříč celým webem dva fixed grain overlaye
     (body::before/::after, z-index 2999/3000) — ty by jinak "zaprášily"
     i tuhle fotku. Vytáhneme fotku nad ně, ať je čistá a vystouplá,
     stejně jako to už dělá patička webu. */
  z-index: 3001;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.about-text p { margin: 0 0 18px; color: var(--fg); opacity: 0.86; font-size: 1.02rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-bio { font-size: 1.08rem; line-height: 1.75; max-width: 480px; margin-top: 22px; text-wrap: pretty; }

/* ikonka značky vedle názvu na homepage — dřív malá "vodítko" velikost
   (0.78em), teď výrazně větší, ať je to čitelný doodle, ne jen drobná
   tečka. Nadpis je teď flex, takže se ikonka centruje podle výšky sama,
   žádný "vertical-align" hack navíc netřeba. */
.brand-icon-wrap {
  display: inline-flex;
  align-items: center;
  height: 1.9em;
  width: auto;
  margin-right: 0.3em;
  flex: none;
}
.brand-icon-wrap svg { height: 100%; width: auto; color: var(--accent); }

/* ---------- PROJECT SELECT GRID (portfolio.html — výběr projektů, 3×2) ---------- */
.project-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-select-card {
  display: block;
  position: relative;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  /* the brand doodle below is deliberately oversized and hangs past the
     photo/body divider — overflow:hidden clips it cleanly at the card's
     own edge instead of letting it spill out into the page */
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.project-select-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 16px 32px rgba(18, 118, 233, 0.18);
}
.project-select-card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); }

.project-select-media {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--muted-2); font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.5;
  text-align: center; padding: 20px;
  overflow: hidden;
}
.project-select-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.project-select-body { position: relative; padding: 24px 26px 28px; }

.project-select-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin: 0 0 8px; letter-spacing: -0.01em;
  max-width: 78%;
}

.project-select-tagline { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* brand doodle — big, lowkey, hand-placed rather than a tidy inline icon.
   Anchored to the card itself (not the body), sized taller than the space
   around the photo/text divider so it visually crosses both the top and
   bottom of that area — but since the card clips overflow, it always gets
   cut off cleanly at the frame instead of spilling past it. */
.project-select-icon {
  position: absolute;
  bottom: -18px; right: -14px;
  height: 150px; width: auto;
  opacity: 0.22;
  color: var(--accent);
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 1;
}
.project-select-icon svg { display: block; height: 100%; width: auto; }
.project-select-card:nth-child(even) .project-select-icon {
  bottom: -22px; right: -18px;
  transform: rotate(7deg);
}
.project-select-card:nth-child(3n) .project-select-icon {
  bottom: -10px; right: -8px;
  transform: rotate(-5deg);
}

@media (max-width: 640px) {
  .project-select-icon { height: 110px; }
}

@media (max-width: 860px) {
  .project-select-grid { grid-template-columns: 1fr; }
}

/* back-link on standalone project pages (not present in main nav) */
.back-link {
  display: block;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-bottom: 26px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent-2); }

/* ---------- CATEGORY CARDS (home page — "vyber si značku") ---------- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.category-card {
  display: flex; flex-direction: column;
  gap: 18px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px 26px;
  color: inherit;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 16px 32px rgba(18, 118, 233, 0.18);
}
.category-card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); }

.category-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin: 0; letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

/* Video se roztahuje přes celý vnitřní prostor karty (bez bočních mezer) —
   karta má overflow:hidden, takže se video zarovná přesně na zaoblené rohy,
   stejně jako u carouselů na jednotlivých stránkách projektů. */
.category-card-media {
  width: calc(100% + 52px);
  margin: 0 -26px;
}

.category-cta {
  font-size: 0.9rem; font-weight: 600; color: var(--fg);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.category-card:hover .category-cta { color: var(--accent-2); }

@media (max-width: 860px) {
  /* na mobilu není místo na tři karty vedle sebe — místo zúžení na jeden
     sloupec je to horizontální carousel, co se swajpuje doprava jako
     fotky v IG carouselu (nativní scroll-snap, žádný extra JS) */
  .category-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin: 0 -28px;
    padding: 4px 28px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-card {
    flex: 0 0 84%;
    scroll-snap-align: center;
  }
}

/* Šipky vedle homepage carouselu — na desktopu jsou 3 karty vedle sebe
   (žádné scrollování, šipky schované), na mobilu se z toho stává vodorovný
   swipe carousel, tak se tam šipky ukážou, ať je jasné, že jde slajdovat. */
.category-grid-wrap { position: relative; }
.category-grid-btn { display: none; }

@media (max-width: 860px) {
  .category-grid-btn {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 42%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent); border: none; color: #fff;
    padding: 0; cursor: pointer; z-index: 3;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .category-grid-btn:hover { background: var(--accent-2); }
  .category-grid-btn svg { width: 16px; height: 16px; display: block; }
  .category-grid-btn--prev { left: -8px; }
  .category-grid-btn--next { right: -8px; }
}

/* ---------- PORTFOLIO TEASER GRID (unused legacy, kept for reference) ---------- */
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.teaser-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.teaser-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 16px 32px rgba(18, 118, 233, 0.18);
}
.teaser-card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); }
.teaser-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.teaser-body .project-tag { margin-bottom: 4px; }
.teaser-body .project-title { font-size: 1.08rem; margin-bottom: 6px; }
.teaser-body .project-desc { font-size: 0.9rem; margin-bottom: 0; }

/* ---------- SERVICES ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.service-card { padding: 34px 28px; background: var(--bg-soft); transition: background 0.2s ease, opacity 0.7s ease, transform 0.7s ease; }
.service-card:hover { background: var(--accent-soft); }
.service-card:nth-child(1) { transition-delay: 0ms; }
.service-card:nth-child(2) { transition-delay: 90ms; }
.service-card:nth-child(3) { transition-delay: 180ms; }
.service-card:nth-child(4) { transition-delay: 270ms; }
.service-num { font-family: var(--font-mono); color: var(--accent-2); font-weight: 500; font-size: 0.95rem; margin-bottom: 18px; }
.service-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 0 0 10px; }
.service-desc { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- REFERENCE LIST (reference.html — abecední seznam) ---------- */
.reference-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
}
.reference-list li {
  text-align: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  letter-spacing: -0.01em;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
}
.reference-list li:first-child { border-top: 1px solid var(--border); }
.reference-list li:hover { color: var(--accent-2); }

/* ---------- CTA STRIP — solid bold blue, no gradient ---------- */
.cta-strip {
  border-radius: var(--radius);
  background: var(--accent);
  padding: 68px 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-strip h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0;
  color: #fff;
}
.cta-strip .btn-primary {
  background: #fff;
  color: #0b0b0d;
}
.cta-strip .btn-primary:hover { filter: brightness(0.96); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

/* ---------- KONTAKT (podsekce na o-mne.html) ---------- */
/* Kontakt teď nemá vlastní stránku ani formulář — jen tuhle sekci na konci
   "O mně", kam vede navigační odkaz "Kontakt" i všechny CTA "Napiš mi"
   napříč webem (viz o-mne.html#kontakt). */
.contact-section { padding: 40px 0 120px; scroll-margin-top: 100px; }

.contact-card {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 56px 48px;
}
.contact-card .section-tag { justify-content: center; }
.contact-card .section-title { margin: 0 0 36px; }

.credits-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.credits-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--border);
  gap: 20px; flex-wrap: wrap;
}
.credits-role { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.credits-value { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-decoration: none; }
.credits-value:hover { color: var(--accent-2); }

.contact-credits { text-align: left; margin-bottom: 40px; }

.contact-cta { width: 100%; justify-content: center; font-size: 1.02rem; padding: 18px 24px; }

@media (max-width: 480px) {
  .contact-card { padding: 40px 26px; }
  /* e-mail byl dřív jediný, co se kvůli délce zalamoval na nový řádek —
     Instagram handle je kratší a vešel se vedle popisku. Ať to vypadá
     sjednoceně, na mobilu obojí vždycky spadne pod popisek na svůj řádek. */
  .credits-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ---------- CONFETTI (kolo štěstí) ---------- */
.confetti-piece {
  position: fixed;
  top: -40px;
  left: 0;
  pointer-events: none;
  z-index: 4000;
  animation-name: confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ---------- FOOTER ---------- */
/* solid black to match header.site, sitting above the page-wide grain layers
   (z-index 2999/3000) so the texture doesn't bleed through, plus the same
   faint echo of the grain for visual continuity with the nav bar */
footer.site-footer {
  position: relative;
  z-index: 3001;
  background: #0b0b0d;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
footer.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n4'><feTurbulence type='turbulence' baseFrequency='0.45' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.11 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n4)'/></svg>");
}
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-grid a { text-decoration: none; color: var(--muted); font-size: 0.86rem; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { height: 22px; width: auto; flex: none; }

/* logo kept only in the deliberate "signature" spots — nav, footer, and
   here as a small mark sitting in-flow between the heading and the button,
   so it never overlaps the text regardless of how long it runs */
.cta-logo-mark {
  height: 62px; width: auto;
  flex: none;
  opacity: 0.5;
  pointer-events: none;
  transform: rotate(-8deg);
}
@media (max-width: 700px) {
  .cta-logo-mark { height: 46px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  header.site.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 78px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 20px 28px; gap: 18px;
  }
  section { padding: 64px 0; }
  .cta-strip { padding: 36px 24px; flex-direction: column; align-items: flex-start; }
}

/* ---------- DÍKY, ŽE MŮŽEM — one pager s dílčími projekty ---------- */
.diky-toppicks { padding: 88px 0 96px; }

.diky-band { padding: 72px 0; }
.diky-band--a { background: var(--bg-soft); }
.diky-band--b { background: #0d1a2c; }

.diky-band-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 14px; letter-spacing: -0.01em;
}
.diky-band-desc {
  font-size: 1rem; line-height: 1.65; color: var(--muted);
  max-width: 640px; margin: 0 0 28px; text-wrap: pretty;
}

.diky-subseries { margin-top: 48px; }
.diky-subseries-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: var(--fg);
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 12px;
}
.diky-subseries-title::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); flex: none;
}
.diky-subseries-desc {
  font-size: 0.98rem; line-height: 1.65; color: var(--muted);
  max-width: 600px; margin: 0 0 20px; text-wrap: pretty;
}

.diky-carousel { position: relative; }
.diky-carousel-track {
  display: flex; gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 10px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.diky-carousel-track::-webkit-scrollbar { display: none; }

.diky-carousel-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
.diky-carousel-card:has(.viewfinder--wide) { flex-basis: 380px; }
.diky-carousel-card .viewfinder:hover { transform: none; }

/* Širší varianta karty — použitá na jednotlivých stránkách značek
   (renderBrandDetail), kde karta navíc nese kategorii/rok a celý popis. */
.diky-carousel-card.diky-carousel-card--wide { flex-basis: 300px; }
.diky-carousel-card.diky-carousel-card--wide:has(.viewfinder--wide) { flex-basis: 420px; }

.diky-carousel-caption { margin-top: 12px; }
.diky-carousel-meta {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2);
  margin-bottom: 8px; display: block;
}
.diky-carousel-title {
  margin: 0 0 4px;
  font-size: 0.92rem; font-weight: 600; color: var(--fg);
  line-height: 1.35;
}
.diky-carousel-desc {
  font-size: 0.86rem; color: var(--muted); line-height: 1.5;
  margin: 6px 0 10px;
}
.diky-carousel-link {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s ease;
}
.diky-carousel-link:hover { color: var(--accent-2); }

.diky-carousel-btn {
  position: absolute; top: 40%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.diky-carousel-btn svg {
  width: 20px; height: 20px;
  display: block;
}
.diky-carousel-btn:hover {
  background: var(--accent-2);
  transform: translateY(-50%) scale(1.08);
}
.diky-carousel-btn--prev { left: -22px; }
.diky-carousel-btn--next { right: -22px; }

@media (max-width: 860px) {
  /* na mobilu necháváme šipky viditelné (jen menší a víc přitažené
     dovnitř), ať je jasné, že se dá řada karet posouvat do strany —
     dřív tu byly úplně schované (display:none) */
  .diky-carousel-btn { width: 40px; height: 40px; }
  .diky-carousel-btn svg { width: 16px; height: 16px; }
  .diky-carousel-btn--prev { left: -8px; }
  .diky-carousel-btn--next { right: -8px; }
  .diky-carousel-card { flex-basis: 200px; }
  .diky-carousel-card.diky-carousel-card--wide { flex-basis: 240px; }
}
@media (max-width: 700px) {
  .diky-toppicks { padding: 56px 0 64px; }
  .diky-band { padding: 48px 0; }
}

/* ---------- TLAČÍTKO ŠTĚSTÍ (homepage) ---------- */
.lucky-block {
  position: relative;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.doodle-line--lucky {
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 130px; height: auto; color: var(--accent);
}
.lucky-hint {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 28px;
}
.lucky-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 24px 48px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.lucky-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-3px) scale(1.02);
}
.lucky-btn:disabled { cursor: default; }
.lucky-btn-icon {
  /* font-size je jen pro 🎲 emoji (textContent) v klidovém stavu — ať
     zůstane v původní velikosti. Nakreslené ikony značek se vkládají jako
     SVG a řídí se šířkou/výškou tohoto boxu (width/height níže), ne
     font-size, takže je můžeme zvětšit nezávisle na emoji.
     Záporný vertikální margin: box je vizuálně velký (60px), ale bez něj
     by o tolik "nafoukl" i celé tlačítko (flex řádek roste podle
     nejvyššího prvku) — margin stáhne příspěvek do výšky řádku zpátky na
     původní rozměr, samotná ikonka ale dál vykreslí v plné (větší)
     velikosti, jen mírně přesahuje přes okraj řádku. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  margin: -13px 0;
  font-size: 1.9rem;
  line-height: 1;
  flex: none;
}
.lucky-btn-icon svg { width: 100%; height: 100%; color: #fff; }
.lucky-btn.is-spinning .lucky-btn-icon svg { color: #fff; }

@media (max-width: 480px) {
  .lucky-btn { padding: 20px 34px; font-size: 1.1rem; gap: 12px; }
  .lucky-btn-icon { width: 46px; height: 46px; margin: -9px 0; font-size: 1.6rem; }
}

/* ---------- MODÁL S VÝSLEDKEM ---------- */
body.lucky-modal-open { overflow: hidden; }

.lucky-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.lucky-modal-overlay.in {
  opacity: 1;
  visibility: visible;
}
.lucky-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.lucky-modal-overlay.in .lucky-modal {
  transform: translateY(0) scale(1);
}
.lucky-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lucky-modal-close:hover { color: var(--accent-2); border-color: var(--accent); }
.lucky-modal-body { margin-top: 30px; }
.lucky-modal-body .viewfinder { max-height: 65vh; }
.lucky-modal-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lucky-modal-reroll {
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lucky-modal-reroll:hover { border-color: var(--accent); color: var(--accent-2); }

@media (max-width: 480px) {
  .lucky-modal { padding: 16px 14px 18px; }
}
