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

/* ============================================================
КОЛЬОРИ — міняй тут
============================================================ */
:root {
  --bg: #ffffff;
  --ink: #0F0E0C;
  --accent: #868686;
}

html {
  scroll-behavior: auto;
}

body {
  background: var(--ink);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

/* ============================================================
🔒 НЕ ЧІПАЙ — SCROLL ENGINE
============================================================ */
#scroll-container {
  position: relative;
  height: calc(var(--vh, 100vh) * 2.4);
}

@media (max-width: 768px) {
  #scroll-container {
    height: var(--vh, 100vh);
  }
}

/* ============================================================
🔒 НЕ ЧІПАЙ — HERO (sticky відео секція)
============================================================ */
#hero {
  position: sticky;
  top: 0;
  height: var(--vh, 100vh);
  width: 100%;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

#bg-video,
#bg-video-mobile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: contents;
  transform-origin: center center;
}

.video-mobile {
  display: none;
}

@media (max-width: 768px) {
  .video-desktop {
    display: none !important;
  }
  .video-mobile {
    display: block !important;
  }
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0.0) 40%,
      rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
✏️ МІНЯЙ — навігація поверх відео
============================================================ */
#hero-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 34px;
  width: auto;
  transition: opacity 0.2s;
}

.nav-logo:hover img {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-cta a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 10px 24px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  transition: background 0.2s;
}

.nav-cta a:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ============================================================
✏️ МІНЯЙ — контент hero (знизу ліво)
============================================================ */
#hero-content {
  position: absolute;
  bottom: 72px;
  left: 48px;
  right: 48px;
  z-index: 5;
  will-change: transform, opacity;
}

.hero-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 8.5vw, 120px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 680px;
}

.hero-title em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.hero-title .char.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-sub {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  max-width: 380px;
  line-height: 1.65;
}

/* scroll hint */
#scroll-hint {
  position: absolute;
  bottom: 72px;
  right: 48px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
}

#scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ============================================================
✏️ СЕКЦІЯ 2 — Heritage Section
============================================================ */
#section-2 {
  background: var(--bg);
  position: relative;
  padding: 10vw 0 !important;
  overflow: visible;
  display: block;
}

.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.timeline-center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
  border-radius: 2px;
  z-index: 0;
}

.timeline-fill {
  width: 100%;
  height: 0%;
  background-color: var(--accent);
  border-radius: 2px;
  transition: height 0.05s linear;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: 120px;
}

.timeline-row:last-child {
  margin-bottom: 0;
}

.timeline-row.row-left .timeline-content {
  grid-column: 1;
  padding-right: 60px;
  text-align: right;
}

.timeline-row.row-left .timeline-image {
  grid-column: 3;
  padding-left: 60px;
}

.timeline-row.row-reverse .timeline-content {
  grid-column: 3;
  padding-left: 60px;
  text-align: left;
}

.timeline-row.row-reverse .timeline-image {
  grid-column: 1;
  grid-row: 1;
  padding-right: 60px;
}

.timeline-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* ============================================================
   ✏️ SCROLL-REVEAL ANIMATIONS — Timeline rows
   ============================================================ */
.timeline-row .timeline-content,
.timeline-row .timeline-image {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* row-left: content comes from left, image from right */
.timeline-row.row-left .timeline-content {
  transform: translateX(-60px);
}

.timeline-row.row-left .timeline-image {
  transform: translateX(60px);
  transition-delay: 0.15s;
}

/* row-reverse: content comes from right, image from left */
.timeline-row.row-reverse .timeline-content {
  transform: translateX(60px);
}

.timeline-row.row-reverse .timeline-image {
  transform: translateX(-60px);
  transition-delay: 0.15s;
}

/* Revealed state */
.timeline-row.is-visible .timeline-content,
.timeline-row.is-visible .timeline-image {
  opacity: 1;
  transform: translateX(0);
}

.phase-num {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
  display: block;
}

.phase-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.phase-desc {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

.heritage-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.heritage-content {
  width: 40%;
  padding: 40vh 0;
  opacity: 0;
  transform: translateY(70px);
  will-change: opacity, transform;
}

.promise-content {
  opacity: 0;
  transform: translateY(70px);
  will-change: opacity, transform;
}

.heritage-collage {
  width: 55%;
  position: -webkit-sticky;
  position: sticky;
  top: 10vw;
  height: 70vh;
  display: flex;
  align-items: center;
  z-index: 5;
}

.heritage-tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B0B0B0;
  margin-bottom: 32px;
}

.heritage-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.0;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 44px;
}

.heritage-title em {
  font-style: italic;
  font-size: 120%;
  color: var(--accent);
}

.heritage-desc {
  font-size: 21px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.7);
  max-width: 360px;
  font-weight: 300;
}

.heritage-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.collage-main {
  width: 100%;
  height: 490px;
  object-fit: cover;
  border-radius: 12px;
}

.collage-floating {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25%;
  aspect-ratio: 4/7;
  object-fit: cover;
  border: 8px solid #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  z-index: 5;
  border-radius: 12px;
}

/* ============================================================
✏️ СЕКЦІЇ 3, 4, 5... — звичайні секції
============================================================ */
.regular-section {
  background: var(--bg);
  padding: 120px 48px;
}

.regular-section-dark {
  background: var(--ink);
  padding: 120px 48px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 60px auto 0;
}

.card {
  background: #fff;
  border: 1px solid rgba(15, 14, 12, 0.1);
  border-radius: 20px;
  padding: 36px 32px;
}

.card-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-text {
  font-size: 14px;
  font-weight: 300;
  color: rgba(15, 14, 12, 0.55);
  line-height: 1.65;
}

.sec-header {
  max-width: 1200px;
  margin: 0 auto;
}

.sec-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 600px;
}

.sec-title-light {
  color: #fff;
}


/* ============================================================
✏️ SECTION STANDARDS
============================================================ */
#section-standards {
  background: #fdfdfd;
  padding: 140px 48px;
}

.standards-header {
  max-width: 1200px;
  margin: 0 auto 80px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.standards-header .header-left {
  flex: 1;
}

.standards-header .header-right {
  flex: 1;
  max-width: 400px;
}

.header-intro {
  font-size: 18px;
  color: rgba(15, 14, 12, 0.5);
  line-height: 1.6;
  font-weight: 300;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.standard-card {
  background: #ffffff;
  border: 1px solid rgba(15, 14, 12, 0.06);
  padding: 48px 40px;
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.standard-card:hover {
  background: var(--ink);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.standard-card:hover .card-title {
  color: #ffffff;
}

.standard-card:hover .card-text {
  color: rgba(255, 255, 255, 0.7);
}

.standard-card:hover .card-icon {
  color: #ffffff;
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--ink);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.4s ease;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.standard-card .card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--ink);
}

.standard-card .card-text {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(15, 14, 12, 0.55);
  font-weight: 300;
}

/* Animations */
.reveal-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
✏️ SECTION REAL LIFE (Masonry)
============================================================ */
#section-real-life {
  background: var(--ink);
  padding: 140px 48px;
}

.masonry-grid {
  column-count: 3;
  column-gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
  cursor: pointer;
}

.masonry-item img,
.masonry-item video {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

/* Fallback min-heights if no source is present */
.masonry-item img {
  min-height: 250px;
}

.masonry-item.tall img,
.masonry-item.tall video {
  min-height: 500px;
}

.masonry-item:hover img,
.masonry-item:hover video {
  transform: scale(1.03);
}

.video-icon {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 10;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-icon svg {
  width: 16px;
  height: 16px;
}

.masonry-item.has-video.is-playing .video-icon {
  opacity: 0;
}

@media (max-width: 1024px) {
  .standards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  #section-standards {
    padding: 80px 24px;
  }

  .standards-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 48px;
  }

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

  .standard-card {
    padding: 32px;
  }
}

/* ============================================================
✏️ HERO OVERLAY
============================================================ */
#hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.hero-overlay-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 20px;
}

.hero-overlay-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ============================================================
✏️ FOOTER
============================================================ */
.main-footer {
  background: var(--ink);
  padding: 140px 48px 80px;
  overflow: hidden;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
}

.video-mask-container {
  position: relative;
  width: 100%;
  height: clamp(300px, 40vw, 600px);
  background: #000;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mask-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  z-index: 1;
}

.mask-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.mask-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.8;
  font-weight: 900;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: -0.05em;
  padding: 20px;
}

.footer-bottom {
  margin-top: 100px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}

.footer-bottom .copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

.footer-socials {
  display: flex;
  gap: 32px;
}

.footer-socials a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: #fff;
}

.footer-collaboration {
  text-align: center;
  max-width: 700px;
  margin: 80px auto 0;
  padding: 0 20px;
}

.collab-text {
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 24px;
}

.collab-email {
  font-size: 16px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.collab-email a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

.collab-email a:hover {
  border-bottom-color: #fff;
  opacity: 0.8;
}

/* ============================================================
✏️ МОБАЙЛ
============================================================ */
@media (max-width: 768px) {
  #hero-nav {
    padding: 20px 24px;
  }

  .timeline-center-line {
    display: none;
  }

  .timeline-row,
  .timeline-row.row-reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 80px;
  }

  .timeline-row.row-left .timeline-content,
  .timeline-row.row-reverse .timeline-content {
    grid-column: 1;
    padding: 0;
    text-align: left;
    border-left: 2px solid var(--accent);
    padding-left: 24px;
  }

  .timeline-row.row-left .timeline-image,
  .timeline-row.row-reverse .timeline-image {
    grid-column: 1;
    grid-row: auto;
    padding: 0;
  }

  .nav-links {
    display: none;
  }

  #hero-content {
    bottom: 48px;
    left: 24px;
    right: 24px;
  }

  #scroll-hint {
    display: none;
  }

  .section-2-inner {
    padding: 60px 28px;
  }

  .hero-title {
    font-size: clamp(55px, 8.5vw, 62px);
  }

  .hero-sub {
    font-size: 13px;
    margin-top: 12px;
  }

  .heritage-desc {
    font-size: 16px;
  }

  .collage-floating {
    position: absolute;
    top: 0%;
    width: 30%;
    aspect-ratio: 4/5;
  }

  #hero-overlay {
    padding: 24px;
  }

  .hero-overlay-title {
    font-size: clamp(32px, 14vw, 52px);
  }

  .hero-overlay-label {
    margin-bottom: 12px;
  }

  .regular-section,
  .regular-section-dark {
    padding: 80px 24px;
  }

  .main-footer {
    padding: 80px 24px 48px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-top: 60px;
  }

  .footer-info {
    order: 2;
  }

  .footer-socials {
    order: 1;
  }

  .mask-text {
    font-size: clamp(60px, 20vw, 120px);
  }

  .heritage-container {
    flex-direction: column;
    gap: 60px;
    padding: 0 24px;
  }

  .heritage-content,
  .promise-content {
    width: 100%;
    padding: 0;
    opacity: 1 !important;
    transform: none !important;
  }

  .heritage-collage {
    position: relative;
    width: 100%;
    height: 370px;
    gap: 12px;
  }

  .collage-main {
    height: 420px;
  }

  #section-2 {
    padding: 30vw 0px 50vw 0 !important;
  }
}

/* Custom Cursor */
#custom-cursor {
  width: 30px;
  height: 30px;
  background-color: #fff;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
  display: none;
}

@media (any-pointer: fine) {

  #scroll-container,
  #scroll-container *,
  #section-standards,
  #section-standards *,
  #section-real-life,
  #section-real-life * {
    cursor: none !important;
  }
}