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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.page {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    #1150ef 0%,
    #135af3 30%,
    #3c7af6 52%,
    #76a2fa 64%,
    #86acfb 70%,
    #b9cffd 84%,
    #ffffff 100%
  );
  overflow-x: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 18% at 30% 12%, rgba(120, 170, 255, 0.35), transparent 70%),
    radial-gradient(35% 14% at 78% 26%, rgba(130, 175, 255, 0.28), transparent 70%),
    radial-gradient(30% 10% at 55% 3%, rgba(110, 160, 255, 0.3), transparent 70%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
  transform: scaleY(0);
  transform-origin: top center;
  animation: gridGrow 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.grid-line--1 { left: 4.8%; animation-delay: 0s; }
.grid-line--2 { left: 35.45%; animation-delay: 0.1s; }
.grid-line--3 { left: 64.7%; animation-delay: 0.2s; }
.grid-line--4 { left: 95.2%; animation-delay: 0.3s; }

@keyframes gridGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(760px, 75vw, 1300px);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.hero-house {
  position: absolute;
  right: 4.8vw;
  bottom: 0;
  width: max(83vw, 640px);
  height: auto;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(70%) scale(1.06);
  animation: heroHouseIn 4.2s cubic-bezier(0.22, 0.61, 0.24, 1) 0.2s forwards;
}

@keyframes heroHouseIn {
  0% {
    opacity: 0;
    transform: translateY(70%) scale(1.06);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* —— Nav —— */
.nav {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 24px clamp(16px, 2.2vw, 40px) 0;
  z-index: 10;
}

.nav__left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav__logo {
  display: inline-flex;
  opacity: 0;
  transform: translateY(-14px);
  animation: fadeDown 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s forwards;
}

.nav__center {
  display: flex;
  justify-content: center;
}

.nav-pills {
  display: flex;
  gap: 1px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.035em;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease;
  opacity: 0;
  transform: translateY(-14px);
  animation: fadeDown 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav-pill--home {
  background: #fff;
  color: #161616;
}

.nav-pill--home:hover {
  background: #fff;
}

.nav-pills .nav-pill:nth-child(1) { animation-delay: 0.2s; }
.nav-pills .nav-pill:nth-child(2) { animation-delay: 0.28s; }
.nav-pills .nav-pill:nth-child(3) { animation-delay: 0.36s; }
.nav-pills .nav-pill:nth-child(4) { animation-delay: 0.44s; }

.nav__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(-14px);
  animation: fadeDown 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.52s forwards;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #fff;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

.lang-btn.is-active {
  background: #fff;
  color: #161616;
}

.sign-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 41px;
  padding: 0 19px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.035em;
  transition: background 0.25s ease, color 0.25s ease;
  opacity: 0;
  transform: translateY(-14px);
  animation: fadeDown 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.6s forwards;
}

.sign-in:hover {
  background: #fff;
  color: #1150ef;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  opacity: 0;
  transform: translateY(-14px);
  animation: fadeDown 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.65s forwards;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #fff;
  border-radius: 1px;
}

.mobile-menu {
  display: none;
  position: absolute;
  left: clamp(16px, 2.2vw, 40px);
  right: clamp(16px, 2.2vw, 40px);
  top: 78px;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 20;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu:not([hidden]) {
  display: flex;
}

.mobile-menu .nav-pill {
  width: 100%;
  height: 48px;
  opacity: 1;
  transform: none;
  animation: none;
  justify-content: flex-start;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Hero copy —— */
.hero-copy {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  padding: clamp(28px, 3.4vw, 60px) clamp(16px, 2.2vw, 40px) 0;
  z-index: 3;
}

.hero-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(40px, calc(39px + 4.9vw), 170px);
  line-height: 0.87;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.hero-title__line {
  display: block;
}

.hero-title__line--indent {
  padding-left: 0.92em;
}

.hero-tagline {
  margin: clamp(24px, 4.3vw, 80px) 0 0 auto;
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.66vw, 26px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  max-width: 22em;
}

.hero-tagline__line {
  display: block;
}

.hero-tagline__line--indent {
  text-indent: 3.6em;
}

.explore {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  margin: clamp(36px, 5.6vw, 100px) clamp(16px, 2.2vw, 40px) 0;
  width: fit-content;
  font-size: clamp(13px, 1.3vw, 20px);
  font-weight: 500;
  letter-spacing: -0.01em;
  z-index: 3;
  transition: opacity 0.25s ease;
}

.explore:hover {
  opacity: 0.8;
}

.explore .lucide {
  flex-shrink: 0;
}

/* —— Video card —— */
.video-card {
  position: absolute;
  left: clamp(16px, 2.2vw, 40px);
  bottom: clamp(36px, 8.6vw, 140px);
  width: clamp(150px, 17vw, 290px);
  z-index: 3;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  animation: videoCardIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) 2s forwards;
}

.video-card__media {
  aspect-ratio: 1.7;
  border-radius: clamp(8px, 0.9vw, 14px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.video-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__caption {
  margin: 8px 0 0;
  font-family: "Manrope", sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.4vw, 22px);
  line-height: 1.02;
  letter-spacing: 0.035em;
}

.video-card__caption-line {
  display: block;
}

.video-card__bars {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: barsGrow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 2.55s forwards;
}

.video-bar {
  position: relative;
  flex: 1;
  height: 14px;
  display: flex;
  align-items: center;
  transition: flex 0.6s ease;
}

.video-bar::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.6s ease;
}

.video-bar.is-active {
  flex: 1.7;
}

.video-bar.is-active::after {
  background: #fff;
}

@keyframes videoCardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes barsGrow {
  to {
    transform: scaleX(1);
  }
}

/* —— Word-by-word —— */
.word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.45em);
  animation: wordIn var(--word-duration, 0.7s) cubic-bezier(0.2, 0.7, 0.2, 1) var(--word-delay, 0s) forwards;
  will-change: opacity, transform, filter;
}

@keyframes wordIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* —— Latest houses —— */
.latest {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  row-gap: 32px;
  padding:
    clamp(56px, 9.9vw, 170px)
    clamp(16px, 4vw, 70px)
    clamp(40px, 4.4vw, 80px)
    clamp(16px, 2.8vw, 48px);
  z-index: 2;
}

.latest__heading {
  flex: 1 1 max(200px, 24.5vw);
  margin: clamp(0px, 0.9vw, 16px) 0 0;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 80px);
  line-height: 1.2;
  color: #0d0d0d;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.06em;
}

.latest__word {
  display: block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.45em);
}

.latest.in-view .latest__word {
  animation: wordIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.latest.in-view .latest__word:nth-child(1) { animation-delay: 0s; }
.latest.in-view .latest__word:nth-child(2) { animation-delay: 0.15s; }
.latest.in-view .latest__word:nth-child(3) { animation-delay: 0.3s; }

.gallery {
  flex: 999 1 540px;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: clamp(10px, 1.25vw, 20px);
  min-width: 0;
}

.gallery__card {
  aspect-ratio: 0.79;
  border-radius: clamp(6px, 0.8vw, 12px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

.latest.in-view .gallery__card {
  animation: cardRise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.latest.in-view .gallery__card:nth-child(1) { animation-delay: 0.2s; }
.latest.in-view .gallery__card:nth-child(2) { animation-delay: 0.35s; }
.latest.in-view .gallery__card:nth-child(3) { animation-delay: 0.5s; }

.gallery__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.gallery__card:hover img {
  transform: scale(1.05);
}

@keyframes cardRise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* —— Responsive —— */
@media (max-width: 860px) {
  .nav__center {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .hero-tagline {
    margin-left: 0;
    margin-right: auto;
    max-width: none;
    width: 100%;
  }

  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: clamp(10px, 1.25vw, 20px);
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }

  .gallery__card {
    flex: 0 0 min(72vw, 280px);
    scroll-snap-align: start;
  }
}
