:root {
  color-scheme: light;
  --bg: #ebebeb;
  --surface: #f4f1ec;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.62);
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.2);
  --accent: #8c6144;
  --accent-soft: rgba(140, 97, 68, 0.12);
  --shadow: 0 20px 60px rgba(17, 17, 17, 0.08);
  --radius: 18px;
  --radius-lg: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, sans-serif;
  overflow-x: hidden;
}

body.hidden {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.preloader-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  gap: 18px;
  background: #0f0f10;
  color: #f4efe7;
  text-align: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-wrap.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#text-container {
  display: grid;
  gap: 10px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.04em;
}

.loadbar {
  width: min(320px, 72vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 999px;
}

.loadbar::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  transform: scaleX(0.85);
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: pulse 1.6s ease-in-out infinite;
}

.percentage,
.percentage-intro {
  opacity: 0.72;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleX(0.3);
    opacity: 0.35;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.cd-main-content {
  min-height: 100vh;
}

.clapat-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(235, 235, 235, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent);
}

#header-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 3vw, 40px);
}

#clapat-logo img {
  width: 116px;
  height: auto;
}

.white-logo {
  display: none;
}

.clapat-nav-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-height {
  width: 100%;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu > li {
  position: relative;
}

.menu > li > a,
.header-button,
.button-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.before-span span,
.button-text span,
.slide-title,
.slide-date,
.slide-cat,
.next-hero-title,
.next-hero-subtitle,
.copyright,
.socials-text,
.socials a {
  letter-spacing: 0.02em;
}

.menu > li > a {
  padding: 10px 12px;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.menu > li > a span {
  position: relative;
}

.menu > li > a span::after {
  content: attr(data-hover);
  position: absolute;
  inset: 0;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu > li > a:hover span,
.menu > li.current-menu-item > a span {
  color: transparent;
}

.menu > li > a:hover span::after,
.menu > li.current-menu-item > a span::after {
  opacity: 1;
  transform: translateY(0);
}

.sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 170px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: rgba(244, 241, 236, 0.98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sub-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 0.82rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.button-wrap {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.button-wrap.right,
.header-button {
  justify-content: flex-end;
}

.button-wrap .button-text,
.header-button .button-text {
  font-size: 0.88rem;
  text-transform: uppercase;
}

.button-wrap .button-text span,
.header-button .button-text span {
  position: relative;
}

.button-wrap .button-text span::after,
.header-button .button-text span::after {
  content: attr(data-hover);
  position: absolute;
  inset: 0;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.button-wrap:hover .button-text span,
.header-button:hover .button-text span {
  color: transparent;
}

.button-wrap:hover .button-text span::after,
.header-button:hover .button-text span::after {
  opacity: 1;
  transform: translateY(0);
}

#menu-burger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

#menu-burger span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.header-button i,
.button-icon i {
  font-size: 0.9rem;
}

#content-scroll {
  position: relative;
}

.content-full-width {
  width: min(100%, 1600px);
  margin: 0 auto;
}

#hero {
  padding: clamp(42px, 4vw, 64px) clamp(18px, 3vw, 40px) 0;
}

#hero-styles {
  max-width: 1600px;
  margin: 0 auto;
}

#hero-caption {
  padding: clamp(50px, 10vw, 130px) 0 clamp(28px, 4vw, 42px);
}

.hero-title {
  margin: 0;
  font-family: "Six Caps", sans-serif;
  font-size: clamp(6rem, 18vw, 15rem);
  line-height: 0.88;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-subtitle {
  margin-top: 12px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.hero-subtitle span + span {
  margin-left: 6px;
}

#hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0 14px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.hero-footer-right {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.button-wrap.left,
.button-wrap.small-btn {
  gap: 12px;
}

.scroll-down {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.has-border {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.webgl-fitthumbs {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  padding-top: clamp(28px, 4vw, 40px);
}

.expand-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
}

.clapat-item {
  position: relative;
}

.slide-inner {
  height: 100%;
}

.img-mask {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #d9d4cc;
  aspect-ratio: 0.82 / 1;
  box-shadow: var(--shadow);
}

.clapat-item.expanded .img-mask {
  aspect-ratio: 0.82 / 1.15;
}

.slide-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.section-image,
.grid__item-img,
.grid__item-img--large {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid__item-img--large {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.slide-caption {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  text-align: center;
  text-transform: uppercase;
}

.slide-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.slide-date,
.slide-cat {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.content-row {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 96px) 0;
}

.content-row.full {
  width: min(100%, 1600px);
}

.content-row.normal {
  padding-top: clamp(16px, 3vw, 48px);
  padding-bottom: clamp(20px, 4vw, 60px);
}

.content-row.small {
  padding-top: 0;
}

.content-row hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 0 0 22px;
}

.text-align-center {
  text-align: center;
}

.content-row h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.has-scale-image {
  display: inline-flex;
  vertical-align: middle;
  width: 0.88em;
  height: 0.88em;
  margin: 0 0.06em;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
  transform: translateY(-0.06em);
}

.has-scale-image span {
  display: block;
  width: 100%;
  height: 100%;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
}

.column p {
  margin: 0;
}

.bigger {
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 600;
}

.has-opacity {
  color: var(--muted);
}

.button-wrap.small-btn {
  margin-top: 24px;
}

.projects-list-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.projects-list-captions,
.projects-list-images {
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects-list-captions {
  display: grid;
  gap: 2px;
  align-self: center;
}

.projects-list-captions li {
  position: relative;
}

.list-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.projects-list-captions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 0;
  font-family: "Six Caps", sans-serif;
  font-size: clamp(2.2rem, 4vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.projects-list-images {
  position: relative;
  min-height: 620px;
}

.projects-list-images li {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.projects-list-images li:first-child {
  opacity: 1;
  transform: scale(1);
}

.projects-list-wrapper:hover .projects-list-images li:first-child,
.projects-list-wrapper:focus-within .projects-list-images li:first-child {
  opacity: 0;
}

.projects-list-captions li:hover ~ .projects-list-images li:nth-child(1),
.projects-list-captions li:nth-child(1):hover ~ .projects-list-images li:nth-child(1) {
  opacity: 1;
  transform: scale(1);
}

.projects-list-captions li:nth-child(2):hover ~ .projects-list-images li:nth-child(2),
.projects-list-captions li:nth-child(3):hover ~ .projects-list-images li:nth-child(3),
.projects-list-captions li:nth-child(4):hover ~ .projects-list-images li:nth-child(4),
.projects-list-captions li:nth-child(5):hover ~ .projects-list-images li:nth-child(5),
.projects-list-captions li:nth-child(6):hover ~ .projects-list-images li:nth-child(6),
.projects-list-captions li:nth-child(7):hover ~ .projects-list-images li:nth-child(7),
.projects-list-captions li:nth-child(8):hover ~ .projects-list-images li:nth-child(8),
.projects-list-captions li:nth-child(9):hover ~ .projects-list-images li:nth-child(9) {
  opacity: 1;
  transform: scale(1);
}

.projects-list-images .img-mask {
  height: 100%;
  aspect-ratio: auto;
}

.content-row.small .button-box {
  display: flex;
  justify-content: center;
}

.button-border {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--text);
  border-radius: 999px;
}

.button-border a {
  position: relative;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.button-border a span {
  position: relative;
}

.button-border a span::after {
  content: attr(data-hover);
  position: absolute;
  inset: 0;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.button-border a:hover span {
  color: transparent;
}

.button-border a:hover span::after {
  opacity: 1;
  transform: translateY(0);
}

.page-nav-wrap {
  padding: clamp(40px, 6vw, 90px) 0 0;
}

.next-hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "Six Caps", sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.82;
  text-transform: uppercase;
}

.next-hero-subtitle {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.clapat-footer {
  padding: clamp(24px, 5vw, 44px) 0 48px;
}

#footer-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 40px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.socials-wrap {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
}

#magic-cursor,
#clone-image,
#rotate-device {
  display: none;
}

/* responsive */
@media (max-width: 1180px) {
  .menu {
    gap: 4px;
  }

  .menu > li > a {
    padding: 8px 10px;
  }

  .expand-grid,
  .projects-list-wrapper,
  .columns,
  #footer-container {
    grid-template-columns: 1fr;
  }

  .projects-list-images {
    min-height: 520px;
  }
}

@media (max-width: 920px) {
  #header-container {
    flex-wrap: wrap;
  }

  .clapat-nav-wrapper {
    order: 3;
    width: 100%;
    display: none;
  }

  .clapat-nav-wrapper.is-open {
    display: block;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sub-menu {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding-top: 0;
    margin-top: -4px;
  }

  .hero-title {
    font-size: clamp(4.8rem, 21vw, 10rem);
  }

  .content-row h1 {
    font-size: clamp(1.8rem, 8vw, 4rem);
  }
}

@media (max-width: 680px) {
  #hero {
    padding-top: 18px;
  }

  #hero-caption {
    padding-top: 42px;
  }

  #hero-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .slide-title {
    font-size: 1.3rem;
  }

  .projects-list-captions span {
    font-size: clamp(1.9rem, 11vw, 3.2rem);
  }

  .projects-list-images {
    min-height: 360px;
  }

  .socials-wrap {
    justify-items: start;
  }
}

