/* ===============================
   HERO
================================ */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.hero-wordmark h1 {
  font-size: clamp(80px, 18vw, 150px);
  white-space: nowrap;
  margin: 0;
}

.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ===============================
   SELECTED WORK OVERLAY
================================ */

.hero-next {
  position: absolute;
  inset: 0;
  z-index: 3;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding-top: 50vh; 
  pointer-events: none;
}

.sw-inner {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===============================
   TOP SECTION
================================ */

.sw-top {
  position: relative;
  margin-bottom: 5px;   
}

.sw-date {
  display: inline-block;
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 500;
  font-family: "Syne", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.sw-title {
  font-family: "Syne", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 56px;
  margin: 0;
}






.sw-crafted {
  position: absolute;
  right: 0;
  top: 43px;

  width: 233px;
  height: 63px;

  display: flex;
  align-items: center;

  padding-left: 30px;
  padding-right: 10px;

  border-radius: 999px;
  background: #DCDBDF;

  text-decoration: none;
  color: #1D1D1F;

  overflow: hidden;
  cursor: pointer;

  transition:
    width 0.4s ease,
    background 0.3s ease,
    color 0.3s ease;

  z-index: 50;
  pointer-events: auto;
}

/* TEXT */
.crafted-text {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

/* AVATARS */
.sw-avatars {
  margin-left: auto;
  display: flex;
  gap: 6px;
  transition: opacity 0.25s ease;
}

.sw-avatar {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  object-fit: cover;
}

/* KOLEČKO */
.crafted-circle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);

  width: 43px;
  height: 43px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  border-radius: 50%;

  opacity: 0;
  transition: opacity 0.25s ease, transform 0.3s ease;

  pointer-events: none;  
}

.crafted-circle img {
  width: 20px;
}

/* HOVER */
.sw-crafted:hover {
  width: 182px;
  background: #1D1D1F;
  color: #fff;
}

.sw-crafted:hover .sw-avatars {
  opacity: 0;
}

.sw-crafted:hover .crafted-circle {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}








.hero-next{
  position:absolute;
  top:50%;
  left:0;
  width:100%;
  transform:translateY(-50%);
  z-index:3;
}
/* ===============================
   GRID
================================ */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tile-wide {
  grid-column: span 2;
}


/* ===============================
   TILE BASE
================================ */

.nx-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 500px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.nx-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.nx-tile:hover .nx-tile-img {
  transform: scale(1.05);
}

/* ===== TILE BUTTON BASE ===== */

.nx-tile-bottom{
  position:absolute;
  right:25px;
  bottom:20px;

  height:63px;

  display:flex;
  align-items:center;

  padding:5px 5px 5px 25px;

  border-radius:999px;

  background:rgba(128,128,128,0.1);
  backdrop-filter:blur(5px);

  overflow:hidden;
}


/* ===== TITLE ===== */

.nx-tile-bottom-title{
  font-size:16px;
  font-weight:500;
  color:#fff;

  white-space:nowrap;

  transition:opacity .25s ease;
}


/* ===== VIEW PILL ===== */

.nx-tile-view{
  position:absolute;

  right:5px;
  top:5px;

  height:calc(100% - 10px);
  width:82px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#fff;
  color:#1D1D1F;

  border-radius:999px;

  font-size:16px;
  font-weight:500;

  transition:width .45s cubic-bezier(.76,0,.24,1);
}


/* ===== HOVER ===== */

.nx-tile:hover .nx-tile-bottom-title{
  opacity:0;
}

.nx-tile:hover .nx-tile-view{
  width:calc(100% - 10px);
}



/* ========================= */
/* WIDTH PRO KAŽDÝ BUTTON */
/* ========================= */

.nx-btn-1{
  width:205px;
}

.nx-btn-2{
  width:205px;
}

.nx-btn-3{
  width:185px;
}

.nx-btn-4{
  width:200px;
}

.nx-btn-5{
  width:170px;
}





.showmore-btn{
  position:relative;

  width:175px;
  height:63px;

  display:flex;
  align-items:center;

  margin:80px auto; 

  padding:5px 5px 5px 25px;

  border-radius:999px;

  background:rgba(128,128,128,0.1);
  backdrop-filter:blur(5px);

  overflow:hidden;
  cursor:pointer;
  text-decoration:none;
}

/* TEXT */

.showmore-text{
  font-size:16px;
  color:#000;
  transition:opacity .25s ease;
  font-family: "Syne", sans-serif;
  font-weight: 500;
}

/* PILL */

.showmore-pill{
  position:absolute;

  right:5px;
  top:5px;

  width:53px;
  height:calc(100% - 10px);

  display:flex;
  align-items:center;
  justify-content:center;

  background:#fff;
  border-radius:999px;

  transition:width .45s cubic-bezier(.76,0,.24,1);
}

/* ARROW */

.showmore-pill img{
  width:24px;
  transition:transform .25s ease;
}

/* HOVER */

.showmore-btn:hover .showmore-text{
  opacity:0;
}

.showmore-btn:hover .showmore-pill{
  width:calc(100% - 10px);
}

.showmore-btn:hover img{
  transform:translateX(2px);
}

/* ===============================
   RESPONSIVE COMPLETE
================================ */

/* TABLET */
@media (max-width: 1100px) {

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tile-wide {
    grid-column: span 1;
  }

  .tile {
    height: 500px;
  }

  .sw-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-crafted {
    position: static;
    margin-top: 20px;
  }

  .sw-date {
    display: inline-flex;
    width: auto;
  }

}


/* MOBILE */
@media (max-width: 768px) {

  .hero {
    height: auto;
    min-height: 100vh;
  }

  .hero-wordmark {
    width: 100%;
    text-align: center;
  }

  .hero-wordmark h1 {
    font-size: clamp(20px, 10vw, 50px);
  }

  .hero-next {
    padding-top: 65vh;
  }

  .sw-inner {
    width: 92%;
  }

  .sw-title {
    font-size: clamp(36px, 8vw, 50px);
  }

  .sw-date {
    font-size: 14px;
    padding: 8px 16px;
  }

  .sw-crafted {
    padding: 6px 12px;
    gap: 12px;
  }

  .crafted-text {
    font-size: 14px;
  }

  .sw-avatar {
    width: 45px;
    height: 45px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tile {
    height: 500px;
    border-radius: 28px;
  }

  .tile-arrow {
    width: 50px;
    height: 50px;
  }

  .tile-arrow img {
    width: 20px;
  }

  .sw-bottom {
    margin-top: 50px;
  }

}

@media (max-width: 768px) {

  .sw-crafted {
    position: relative;
    top: auto;
    right: auto;

    width: auto;          
    height: 52px;

    padding: 0 18px;
    margin-top: 18px;

    border-radius: 999px;

    display: inline-flex;    
    align-items: center;
    gap: 12px;

    justify-content: center;
  }

  .crafted-text {
    font-size: 14px;
  }

  .sw-avatars {
    gap: 6px;
  }

  .sw-avatar {
    width: 34px;
    height: 34px;
  }

  .crafted-circle {
    display: none; 
  }

  /* vypne hover resize */
  .sw-crafted:hover {
    width: auto;
    background: #DDDCE0;
    color: #000;
  }


.hero-next{
  top:44%;
}

}