/* ============================================
   TILE TIME — HOME.CSS
   Homepage-only styles
   ============================================ */

/* ============================================
   HERO SECTION V2
   ============================================ */

.hero-v2 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 40px 40px;
  position: relative;
  overflow: hidden;
}

.hero-v2-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2vw;
  position: relative;
}

/* Left column: Интерьеры ВНЕ ВРЕМЕНИ */
.hero-v2-left {
  flex: 0 0 auto;
  align-self: flex-end;
  padding-bottom: 2vw;
}

.hero-v2-label {
  font-size: clamp(0.9rem, 1.2vw, 1.2vw);
  font-weight: 300;
  font-style: italic;
  color: #b49a6a;
  margin-bottom: 0.5vw;
  letter-spacing: 0.05em;
}

.hero-v2-title {
  font-size: clamp(2.5rem, 5.5vw, 5.5vw);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #b49a6a;
}

/* Center: Rotating Carousel */
.hero-v2-center {
  flex: 0 0 auto;
  position: relative;
  width: 30vw;
  height: 30vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.wrapper-filter-svg-overlay {
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: visible;
}

/* White wipe blocks */
.wrapper-upper-block {
  display: flex;
  width: 30vw;
  height: 30vw;
  position: absolute;
  z-index: 99;
  transform: rotate(90deg);
  overflow: hidden;
  background-color: transparent;
  pointer-events: none;
}

.block-hero {
  background-color: #fff;
  width: 50%;
  height: 100%;
}

.block-hero.one {
  border-right: 1px solid rgba(0,0,0,0.05);
}

.block-hero.two {
  border-left: 1px solid rgba(0,0,0,0.05);
}

/* Rotating Image Carousel */
.rotate {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 800px;
  perspective: 800px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  justify-content: center;
  align-items: center;
  width: 25vw;
  height: 25vw;
  display: flex;
  position: relative;
  overflow: visible;
}

.wrapper-anchor-side {
  width: 100%;
  height: 7vw;
  position: absolute;
  overflow: visible;
}

.wrapper-anchor-side.top {
  justify-content: center;
  align-items: center;
  display: flex;
  inset: 0% 0% auto;
}

.wrapper-anchor-side.bot {
  justify-content: center;
  align-items: center;
  display: flex;
  inset: auto 0% 0%;
}

.wrapper-anchor-side.left {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7vw;
  height: 100%;
  display: flex;
  inset: 0% auto 0% 0%;
}

.wrapper-anchor-side.right {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7vw;
  height: 100%;
  display: flex;
  right: 0;
  top: 0;
  bottom: 0;
}

.wrapper-light-box {
  border-radius: 1vw;
  width: 8.4vw;
  height: 8.4vw;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Safari: preserve-3d нужен чтобы GSAP rotationY анимация не схлопывалась в 2D */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.wrapper-light-box.side-0 {
  z-index: 4;
  position: absolute;
  top: 2vw;
  left: 2vw;
}

.wrapper-light-box.side-1 {
  position: absolute;
  top: 2vw;
  right: 2vw;
}

.wrapper-light-box.side-2 {
  z-index: 3;
  position: absolute;
  bottom: 2vw;
  left: 2vw;
}

.wrapper-light-box.side-3 {
  z-index: 2;
  position: absolute;
  bottom: 2vw;
  right: 2vw;
}

.image-light-box {
  object-fit: cover;
  border-radius: 1vw;
  width: 100%;
  height: 100%;
}

/* Carousel link wrapper */
.carousel-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: #fff;
}

/* Carousel overlay — hidden by default, shown via JS */
.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14% 10% 10%;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  border-radius: 0 0 1vw 1vw;
  pointer-events: none;
}

.carousel-overlay-product {
  font-size: 0.7vw;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.3;
}

.carousel-overlay-collection {
  font-size: 0.55vw;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.carousel-overlay-catalog {
  font-size: 0.5vw;
  font-weight: 400;
  color: #c4ad7c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
  line-height: 1.3;
}

/* Right column: Это Tile Time + branches */
.hero-v2-right {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hero-v2-heading {
  text-align: right;
  position: relative;
  z-index: 2;
  /* сбрасываем дефолты h1 — margin/font, т.к. .hero-v2-heading теперь сам h1 */
  margin: 0;
  font-weight: 200;
}

/* Span'ы внутри h1 — ведём себя как block-элементы (раньше были отдельными h1) */
.hero-v2-eto,
.hero-v2-brand,
.hero-v2-sub {
  display: block;
}

/* Подзаголовок под «Tile Time» — видимый SEO-текст */
.hero-v2-sub {
  font-size: clamp(0.7rem, 0.95vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 0.6vw;
  max-width: 360px;
  margin-left: auto;
  line-height: 1.4;
}

.hero-v2-eto {
  font-size: clamp(2.5rem, 5vw, 5vw);
  font-weight: 200;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  margin-bottom: -0.5vw;
}

.hero-v2-brand {
  font-size: clamp(3.5rem, 7.5vw, 7.5vw);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #1a1a1a;
}

/* SEO-текст в h1, видимый только поисковым роботам */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* SVG branch lines */
.hero-branches {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* Branch labels */
.hero-branch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  border: 1px solid rgba(180, 154, 106, 0.3);
  border-radius: 50px;
  font-size: clamp(0.7rem, 1vw, 1vw);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b49a6a;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  margin-top: 1.2vw;
}

.hero-branch-label .hbl-dash {
  color: rgba(180, 154, 106, 0.4);
  font-weight: 300;
}

.hero-branch-label:hover {
  background: #b49a6a;
  color: #fff;
  border-color: #b49a6a;
  opacity: 1;
}

.hero-branch-label:hover .hbl-dash {
  color: rgba(255, 255, 255, 0.6);
}

.hbl-history {
  align-self: flex-start;
}

.hbl-philosophy {
  align-self: center;
}

.hbl-mission {
  align-self: flex-end;
}

/* ============================================
   SERVICES / COLLECTIONS SECTION (open list)
   ============================================ */

.service-section {
  padding: 0;
}

.service-wrapper {
  padding: 2vw var(--spacing-container) var(--spacing-padding);
}

/* Top: label left, heading+subtitle right */
.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5vw;
}

.service-top-right {
  text-align: right;
  max-width: 65%;
}

.service-label {
  font-size: 1.4vw;
  font-weight: 500;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 1.2vw;
}

.service-heading {
  font-size: clamp(3rem, 7vw, 7vw);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.service-subtitle {
  font-size: clamp(0.9rem, 1.1vw, 1.1vw);
  font-weight: 300;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.6;
  max-width: 40vw;
  margin-left: auto;
}

/* Item list */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each item: horizontal row */
.service-item {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 3vw 1vw;
  display: flex;
  align-items: flex-start;
  gap: 3vw;
  transition: background-color 0.4s ease, padding-left 0.4s ease;
  border-radius: 0.5vw;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.service-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  padding-left: 2vw;
}

.service-item:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.service-number {
  font-size: clamp(0.8rem, 1.3vw, 1.3vw);
  font-weight: 400;
  font-style: italic;
  color: rgba(0, 0, 0, 0.4);
  flex: 0 0 3vw;
  padding-top: 0.3vw;
}

/* 3 images in a row */
.service-images {
  display: flex;
  gap: 0.8vw;
  flex: 0 0 28vw;
}

.service-images img {
  width: 8.5vw;
  height: 8.5vw;
  object-fit: cover;
  border-radius: 1vw;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-item:hover .service-images img {
  transform: scale(1.06) rotate(2deg);
}

.service-item:hover .service-images img:nth-child(2) {
  transform: scale(1.08) rotate(-2deg);
  transition-delay: 0.05s;
}

.service-item:hover .service-images img:nth-child(3) {
  transform: scale(1.05) rotate(3deg);
  transition-delay: 0.1s;
}

/* Title + description */
.service-info {
  flex: 1;
}

.service-title {
  font-size: clamp(1.5rem, 2vw, 2vw);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin-bottom: 0.8vw;
  transition: transform 0.4s ease;
}

.service-item:hover .service-title {
  transform: translateX(5px);
}

.service-description {
  font-size: clamp(0.85rem, 1vw, 1vw);
  font-weight: 300;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.6;
  max-width: 350px;
}

/* Category label */
.service-category {
  font-size: clamp(0.8rem, 1.1vw, 1.1vw);
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  flex: 0 0 auto;
  padding-top: 0.3vw;
  order: 3;
}

/* Info after category */
.service-info {
  order: 4;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.project-section {
  padding: 0;
}

.project-wrapper {
  padding: var(--spacing-padding) var(--spacing-container);
}

.project-heading {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.project-label {
  font-size: 1.4vw;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 3vw;
  display: flex;
  align-items: center;
  gap: 1.2vw;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.project-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
  opacity: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.project-tag {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

.project-name {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #ffffff;
}

.project-desc {
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  line-height: 1.6;
}

.project-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-link::after {
  content: '\2192';
  transition: transform 0.3s ease;
}

.project-card:hover .project-link::after {
  transform: translateX(5px);
}

.project-overlay a:hover {
  opacity: 1;
}

/* ============================================
   WIDE SCREENS (1600px+) — homepage rules
   ============================================ */

@media (min-width: 1600px) {
  .hero-v2 {
    padding: 100px 60px 40px;
  }

  .project-image {
    height: 520px;
  }
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */

@media (max-width: 991px) {
  .hero-v2 {
    padding: 100px 30px 40px;
    min-height: auto;
  }

  .hero-v2-inner {
    flex-direction: column;
    gap: 3rem;
  }

  .hero-v2-left {
    align-self: flex-start;
    order: 3;
    padding-bottom: 0;
  }

  .hero-v2-right {
    align-items: center;
    order: 1;
  }

  .hero-v2-heading {
    text-align: center;
  }

  .hero-v2-center {
    width: 40vw;
    height: 40vw;
  }

  .rotate {
    width: 35vw;
    height: 35vw;
  }

  .wrapper-upper-block {
    width: 40vw;
    height: 40vw;
  }

  .wrapper-light-box {
    width: 12vw;
    height: 12vw;
  }

  .wrapper-anchor-side {
    height: 12vw;
  }

  .wrapper-anchor-side.left,
  .wrapper-anchor-side.right {
    width: 12vw;
  }

  .hero-branches {
    display: none;
  }

  .hbl-history,
  .hbl-philosophy,
  .hbl-mission {
    align-self: center;
  }

  .service-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  .service-subtitle {
    font-size: 1rem;
  }

  .service-images img {
    height: 20vw;
  }

  .project-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .project-image {
    height: 350px;
  }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */

@media (max-width: 767px) {
  .hero-v2 {
    padding: 80px 20px 30px;
  }

  .hero-v2-center {
    width: 50vw;
    height: 50vw;
  }

  .rotate {
    width: 45vw;
    height: 45vw;
  }

  .wrapper-upper-block {
    width: 50vw;
    height: 50vw;
  }

  .wrapper-light-box {
    width: 15vw;
    height: 15vw;
  }

  .wrapper-anchor-side {
    height: 15vw;
  }

  .wrapper-anchor-side.left,
  .wrapper-anchor-side.right {
    width: 15vw;
  }

  .hero-v2-title {
    font-size: clamp(2rem, 10vw, 4rem);
  }

  .hero-v2-eto {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-v2-brand {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }

  .service-section,
  .project-section {
    padding: 0;
  }

  .service-wrapper,
  .project-wrapper {
    padding: 60px 20px;
  }

  .service-heading {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    margin-bottom: 16px;
  }

  .service-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 40px;
  }

  .service-images {
    flex-wrap: wrap;
  }

  .service-images img {
    width: 48%;
    height: 30vw;
  }

  .project-heading {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-image {
    height: 300px;
  }

  .project-overlay {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE
   ============================================ */

@media (max-width: 479px) {
  .hero-v2-center {
    width: 60vw;
    height: 60vw;
  }

  .rotate {
    width: 55vw;
    height: 55vw;
  }

  .wrapper-light-box {
    width: 18vw;
    height: 18vw;
  }

  .service-title {
    font-size: 1.25rem;
  }

  .service-description {
    max-width: 100%;
  }

  .service-heading {
    font-size: 1.75rem;
  }

  .service-subtitle {
    font-size: 0.875rem;
    margin-bottom: 30px;
  }

  .project-heading {
    font-size: 1.75rem;
  }

  .project-label,
  .service-label {
    font-size: 0.85rem;
    margin-bottom: 20px;
    gap: 0.5rem;
  }

  .hero {
    padding: 80px 16px 20px;
  }
}
