:root {
  --color-primary: rgba(0, 0, 0, 1);
  --color-text: #fff;
  --color-overlay: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.2);
  --transition: 0.2s ease;
  --color-text-rgb: rgb(255, 255, 255);
  --container-max: 1200px;
  --blur: blur(15px);
  --shadow: 0 5px 8px rgba(0, 0, 0, 0.2);
  --scroll-size: 48px;
  --bounce-height: 5px;
  --bounce-timing: cubic-bezier(0.37, 0, 0.63, 1);
  --gpu-transform: translate3d(0, 0, 0);
  --hardware-accelerated: translateZ(0);
}

@font-face {
  font-family: 'Principal';
  src: url('/assets/fonts/Fligen.otf') format('opentype');
  font-display: swap;
}

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

body {
  font-family: 'Principal', system-ui, -apple-system, sans-serif;
  background: var(--color-primary);
  color: var(--color-text);
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

/* Texts */
.hero__brand,
.about__title,
.about__features,
.expertise__title,
.contact,
.footer {
  font-family: 'Principal', sans-serif;
}

.about__description,
.expertise__text {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Hero Section */
.hero {
  position: relative;
  width: calc(100% - 4rem);
  height: calc(100vh - 4rem);
  margin: 2rem;
}

.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.77777778vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate3d(-50%, -50%, 0) scale(1.02);
  will-change: transform;
  pointer-events: none;
  opacity: 1;
  backface-visibility: hidden;
}

.hero__video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-primary);
  border: 3px solid var(--color-border);
  border-radius: 20px;
  transform: var(--gpu-transform);
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero__brand {
  font-size: clamp(5rem, 10vw, 5rem);
  display: flex;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
  opacity: 1;
}

.scroll-arrow {
  width: var(--scroll-size);
  height: var(--scroll-size);
  background: url('../assets/images/arrow.svg') no-repeat center;
  background-size: contain;
  margin: 0 auto;
  animation: bounce 2s var(--bounce-timing) infinite;
  filter: invert(1) brightness(1.2);
  will-change: transform;
  opacity: 1;
}

@keyframes bounce {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, calc(var(--bounce-height) * -1.5), 0); }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translate3d(-50%, 1.5rem, 0); 
  }
  to { 
    opacity: 1; 
    transform: translate3d(-50%, 0, 0); 
  }
}

/* About Section */
.about {
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0 2rem 0;
}

.about__text {
  width: 100%;
  margin: 0;
  text-align: left;
  padding: 2rem 2rem;
}

.about__title {
  font-size: clamp(4rem, 8vw, 4rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.about__content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.about__features {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.about__features li {
  color: var(--color-text);
  background: var(--color-overlay);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  backdrop-filter: var(--blur);
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 1000;
}

.about__showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.about__showcase canvas {
  width: min(625px, 100%);
  aspect-ratio: 1;
  max-height: 100vh;
  object-fit: contain;
  margin: 0 auto;
}

.about__expertise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem;
}

.expertise__item {
  background: var(--color-overlay);
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(20px);
  -webkit-transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition);
}

.expertise__item.visible {
  opacity: 1;
  transform: translateY(0);
  -webkit-transform: translateY(0);
}

.expertise__item:nth-child(1) { transition-delay: 0.2s; }
.expertise__item:nth-child(2) { transition-delay: 0.4s; }
.expertise__item:nth-child(3) { transition-delay: 0.6s; }

.expertise__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.expertise__text {
  font-size: 1rem;
  opacity: 0.8;
}

/* Work Section */
.work {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
}

.work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  width: 100%;
  max-width: var(--container-max);
  padding: 0 2rem;
}

.work__item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  -webkit-transform: translate3d(0, 20px, 0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.work__item.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  border: 2px solid var(--color-border);
}

.work__item:nth-child(1) { transition-delay: 1s; }
.work__item:nth-child(2) { transition-delay: 1s; }
.work__item:nth-child(3) { transition-delay: 1s; }
.work__item:nth-child(4) { transition-delay: 1s; }
.work__item:nth-child(5) { transition-delay: 1s; }
.work__item:nth-child(6) { transition-delay: 1s; }

iframe.work__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in;
}

iframe.work__video.loaded {
  opacity: 1;
}

/* Contact Section */
.contact {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(
    circle at center,
    rgba(255, 245, 196, 0.55) 0%,
    rgba(255, 0, 0, 0.5) var(--gradient-radius),
    rgba(0, 0, 0, 1) var(--gradient-end)
  );
  position: relative;
  --gradient-radius: 10%;
  --gradient-end: 40%;
}

.contact__container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.contact__button {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.1rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
  backdrop-filter: var(--blur);
}

.contact__button:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
  padding: 2rem;
  background: var(--color-primary);
  text-align: center;
}

.footer__content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 900px) {
  .hero {
    width: calc(100% - 4rem);
    height: calc(100vw - 4rem);
    aspect-ratio: 1/1;
    margin: 2rem auto;
    margin-top: 2rem;
  }

  .hero__brand {
    font-size: clamp(4rem, 8vw, 4rem);
  }

  .scroll-indicator {
    bottom: -5rem;
  }

  .about {
    padding: 1rem;
    padding-bottom: 0rem;
  }

  .about__features {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }

  .about__text {
    text-align: center;
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
  }

  .about__content {
    grid-template-columns: 1fr;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .about__showcase canvas {
    width: 100%;
    height: auto;
  }

  .about__showcase {
    width: 100%;
    max-width: 625px;
    padding: 0 1rem;
  }

  .about__title {
    font-size: 3.5rem;
  }

  .about__expertise {
    grid-template-columns: 1fr;
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
  }

  .work {
    margin-top: 0rem;
    padding-top: 0rem;
  }

  .work__grid {
    gap: 4rem;
    padding: 2rem;
  }

  .work__item {
    aspect-ratio: 1/1;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
  }

  iframe.work__video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1.8);
    object-fit: cover;
  }
}