/* Hover states and helpers that replace Webflow's interaction runtime. */

.sx-word {
  white-space: nowrap;
  display: inline-block;
}

.sx-char {
  display: inline-block;
}

/* Buttons: a colour fill sweeps through on hover (site.js adds .btn-fill and toggles .is-filled). */
.has-fill {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-fill {
  z-index: 0;
  pointer-events: none;
  background-color: var(--blue);
  border-radius: 50%;
  width: 150%;
  height: 200%;
  position: absolute;
  top: -50%;
  left: -25%;
  transform: translateY(-76%);
  will-change: transform;
}

.button_secondary .btn-fill {
  background-color: var(--fourth-color);
}

.has-fill > :not(.btn-fill) {
  z-index: 1;
  position: relative;
  transition: color .3s ease;
}

.navigation-wrapper-main.is-dark .div-block-4 .button_main.is-filled div,
.button_main.is-filled > :not(.btn-fill) {
  color: #fff;
}

.button_secondary.is-filled .button_white {
  color: #000;
}

.work-wrapper-first .vertical-flex,
.work-wrapper-first .work-title-first {
  transition: opacity .2s ease;
}

.work-wrapper-first:hover .vertical-flex,
.work-wrapper-first:hover .work-title-first,
.work-wrapper-first:focus-visible .vertical-flex,
.work-wrapper-first:focus-visible .work-title-first {
  opacity: 1;
}

/* Phones: darker project images and bigger project names. */
@media screen and (max-width: 767px) {
  .work-overlay {
    opacity: 1;
    background-color: rgba(0, 0, 0, .3);
  }

  .work-title-first {
    font-size: 2.75rem;
    line-height: 1.05;
  }

  .title-line-wrapper {
    padding-right: 16px;
  }
}

/* The open mobile menu is a fixed full-screen panel (z-index 1000 on phones); keep the logo and toggle above it. */
.w-nav-button,
.w-nav .logo {
  z-index: 1001;
  position: relative;
}

/* Logo: a two-line window over three stacked rows ("Designed by", "Jakub", "Malenovský").
   On hover the rows roll up one line, so "Jakub" climbs to the first line and "Malenovský"
   rises in under it, while "Designed by" leaves through the top and fades. */
.dbj-logo {
  --logo-ease: cubic-bezier(.7, 0, .3, 1);
  --logo-lh: 1.2em;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  height: calc(var(--logo-lh) * 2);
  display: block;
  overflow: hidden;
}

.dbj-logo-track {
  flex-direction: column;
  display: flex;
  transform: translateY(0) rotate(.001deg);
  transition: transform .4s var(--logo-ease);
}

.dbj-logo-row {
  height: var(--logo-lh);
  white-space: nowrap;
  transition: opacity .4s var(--logo-ease);
}

.dbj-logo-row:last-child {
  opacity: 0;
}

.logo:hover .dbj-logo-track,
.logo:focus-visible .dbj-logo-track {
  transform: translateY(calc(var(--logo-lh) * -1)) rotate(.001deg);
}

.logo:hover .dbj-logo-row:first-child,
.logo:focus-visible .dbj-logo-row:first-child {
  opacity: 0;
}

.logo:hover .dbj-logo-row:last-child,
.logo:focus-visible .dbj-logo-row:last-child {
  opacity: 1;
}

/* Keep the logo flush with the page edge at every width (Webflow right-aligned it on tablets). */
.navigation-content .logo {
  align-items: flex-start;
}

@media screen and (max-width: 991px) {
  .dbj-logo {
    font-size: 1rem;
  }
}

/* No roll without hover (phones) or with reduced motion. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .dbj-logo-track,
  .dbj-logo-row {
    transition: none;
  }

  .logo:hover .dbj-logo-track {
    transform: translateY(0) rotate(.001deg);
  }

  .logo:hover .dbj-logo-row:first-child {
    opacity: 1;
  }

  .logo:hover .dbj-logo-row:last-child {
    opacity: 0;
  }
}

/* Language switch: plain text next to the header buttons on desktop, a menu item inside the mobile menu. */
.lang-switch-text {
  color: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  margin-left: 10px;
  padding: 8px 4px;
  transition: color .25s ease;
}

.navigation-wrapper-main.is-dark .lang-switch-text {
  color: #fff;
}

/* Mobile menu: a dark full-screen panel with big left-aligned links, and at the bottom
   Contact me / Customer profile, a divider, then © and the EN / CZ switch. */
.mm-foot {
  display: none;
}

@media screen and (max-width: 991px) {
  .w-nav .nav-menu[data-nav-menu-open] {
    text-align: left;
    background-color: #000;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 0;
    height: 100vh;
    height: 100dvh;
    padding: 140px var(--mm-pad, 24px) 28px;
    display: flex !important;
    overflow-y: auto;
  }

  .nav-menu .navigation-link {
    color: #fff;
    align-self: flex-start;
    align-items: flex-start;
    padding: 0;
    overflow: visible;
  }

  .nav-menu .navigation-link + .navigation-link {
    margin-top: 6px;
  }

  .nav-menu .nav-text.first.link,
  .nav-menu .nav-text.second {
    color: #fff;
    min-width: 0;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.15;
  }

  /* Current page: a small dot after its name. */
  .nav-menu .navigation-link.w--current::after {
    content: "";
    background-color: #fff;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    position: absolute;
    top: 50%;
    left: calc(100% + 14px);
    transform: translateY(-50%);
  }

  .mm-foot {
    margin-top: auto;
    padding-top: 64px;
    display: block;
  }

  .mm-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 28px;
    display: flex;
  }

  .mm-action {
    color: #fff;
    text-transform: uppercase;
    border-bottom: 1px solid #fff;
    padding-bottom: 6px;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
  }

  .mm-bottom {
    color: #8a8a8a;
    border-top: 1px solid rgba(255, 255, 255, .15);
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: .8rem;
    text-transform: uppercase;
    display: flex;
  }

  .mm-lang {
    gap: 6px;
    display: flex;
  }

  .mm-lang a {
    color: #8a8a8a;
    text-decoration: none;
  }

  .mm-lang [aria-current] {
    color: #fff;
  }

  /* While the menu panel is behind them (site.js sets .menu-covered): white logo, inverted menu button. */
  .navigation-wrapper-main.menu-covered .logo {
    color: #fff;
  }

  .menu-covered .w-nav-button .hamburger_3_wrap {
    background-color: #fff;
  }

  .menu-covered .w-nav-button .hamburger_3_line {
    background-color: #000;
  }
}

/* Menu links: the letter roll clips inside this wrapper, so the link itself can have padding. */
.nav-link-inner {
  flex-direction: column;
  display: flex;
  position: relative;
  overflow: clip;
}

/* Desktop menu: the current page gets a small dot under its name. */
@media screen and (min-width: 992px) {
  .nav-menu .navigation-link {
    overflow: visible;
  }

  .nav-menu .navigation-link.w--current::after {
    content: "";
    background-color: currentColor;
    border-radius: 50%;
    width: 5px;
    height: 5px;
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Page transition (after clou.ch): a black panel with "Jakub" + a phrase; page-transition.js animates it.
   It covers the first paint (html.pt-on, set in <head>) and slides away once the script runs. */
.page-transition {
  z-index: 5000;
  pointer-events: none;
  width: 100%;
  height: 100vh;
  display: none;
  position: fixed;
  inset: 0;
}

html.pt-on .page-transition {
  display: block;
}

.pt-color {
  z-index: -1;
  background-color: #000;
  position: absolute;
  inset: 0;
}

.pt-content {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

/* The author sits in the narrow left column, the quote in the wide right one (Clou's 1fr 2fr grid). */
.pt-grid {
  color: #fff;
  opacity: 0;
  grid-template-columns: 1fr 2fr;
  align-items: start;
  gap: .75rem;
  width: 100%;
  padding-left: max(1rem, 2.5vw);
  padding-right: max(1rem, 2.5vw);
  display: grid;
}

.pt-left,
.pt-right {
  transform: translateY(101vh);
}

.pt-author {
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding-top: .55rem;
  font-size: .9rem;
  line-height: 1.2;
}

.pt-quote {
  text-wrap: balance;
  max-width: 22em;
  font-size: 2rem;
  line-height: 1.15;
}

html.pt-lock,
html.pt-lock body {
  overflow: hidden;
}

@media screen and (max-width: 767px) {
  .pt-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pt-author {
    padding-top: 0;
    font-size: .8rem;
  }

  .pt-quote {
    font-size: 1.6rem;
  }
}

/* No cursor dot over the transition panel. */
html.pt-lock .cursor-wrapper {
  opacity: 0;
}

/* How I work, process cards: Webflow kept all four in one row down to 480px, squeezing each card
   to ~140px with a word per line. Two per row up to small laptops, one per row on phones. */
@media screen and (max-width: 1199px) {
  .card_grid_wrapper {
    flex-wrap: wrap;
  }

  .card_grid_wrapper .card_in_grid {
    width: calc(50% - 7.5px);
  }
}

@media screen and (max-width: 479px) {
  .card_grid_wrapper .card_in_grid {
    width: 100%;
  }
}

/* Home, second section: black, starting right where the hero canvas ends. It is pulled up by its
   corner radius so the canvas runs on behind the rounded top corners instead of white page showing. */
.section.intro-dark {
  color: #fff;
  background-color: #101114;
  margin-top: -20px;
}

.intro-dark .tag_h2,
.intro-dark .display-1.long_text {
  color: #fff;
}

.intro-dark .button_main {
  background-color: #fff;
}

.intro-dark .button_main .button_black {
  color: #000;
}

/* While the blue fill is in, the label turns white like on every other button. */
.intro-dark .button_main.is-filled .button_black {
  color: #fff;
}

/* Home hero photo: hidden until site.js runs its rise-in (only when page-load.js animates the page). */
html.pl-js .hero-rotate-image {
  opacity: 0;
}
