/* ============================================
   KOMFLIX — Hero Section + Navbar
   Font: Inter (Google Fonts)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── RESET & VARIABLES ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #141414;
  --red: #e50914;
  --red-hover: #f40612;
  --text: #ffffff;
  --text-muted: #a3a3a3;
  --font: 'Inter', sans-serif;
  --radius: 6px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #000;
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;

  background: transparent;
  transition: 0.3s ease;
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--red);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
  position: relative;
  z-index: 2;
}

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

.nav-links a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.2s;
}

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

.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  z-index: 1101;
}

.nav-hamburger span {
  height: 2px;
  width: 24px;
  background: white;
  transition: 0.3s ease;
}

/* animation X */
.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

#mobile-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(12px);
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: 0.3s ease;
  z-index: 1100;
}

#mobile-nav.open {
  right: 0;
}

#mobile-nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#mobile-nav a:hover {
  color: white;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1090;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

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

#hero {
  position: relative;
  height: 100vh;
  min-height: 580px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── VIDEO: tampil seperti layar HP di tengah ── */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

#hero-video {
  /* Tinggi penuh, lebar mengikuti aspect ratio portrait (9:16) */
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* tidak crop, tampil utuh */
  display: block;
  filter: brightness(0.75);
}

/* Latar hitam di sisi kiri & kanan video (vignette) */
.hero-video-wrap::before,
.hero-video-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 1;
  pointer-events: none;
}

.hero-video-wrap::before {
  left: 0;
  background: linear-gradient(to right, #000 30%, transparent 100%);
}

.hero-video-wrap::after {
  right: 0;
  background: linear-gradient(to left, #000 30%, transparent 100%);
}

/* Overlay bawah agar teks terbaca */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.3) 40%,
      transparent 70%);
  z-index: 1;
  pointer-events: none;
}

/* ── KONTEN TEKS ── */
.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 4%;
  max-width: 640px;
  width: 100%;
  /* Posisi kiri bawah ala Netflix */
  position: absolute;
  bottom: 14%;
  left: 0;
  /* Fade-out animation — mulai setelah 3.5 detik */

  pointer-events: auto;
}

/* Saat teks sedang tersembunyi */
.hero-content.hidden {
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}

/* Saat teks ditampilkan kembali */
.hero-content.show {
  opacity: 1 !important;
  pointer-events: auto;
  animation: heroFadeIn 0.6s ease forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-logo-text {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.hero-logo-text span {
  color: var(--red);
}

.hero-tagline {
  font-size: clamp(0.7rem, 1.4vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 28px;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── TOMBOL ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  letter-spacing: 0.02em;
  font-family: var(--font);
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-hover);
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

/* ── TOMBOL "Tampilkan Info" (muncul saat teks hilang) ── */
#btn-show-text {
  position: absolute;
  bottom: 14%;
  left: 4%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: var(--font);
  backdrop-filter: blur(8px);
  transition: background 0.2s, opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}

#btn-show-text.visible {
  opacity: 1;
  pointer-events: auto;
}

#btn-show-text:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── PROGRESS BAR (countdown sebelum teks hilang) ── */
#hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  z-index: 5;
  width: 100%;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 3.5s linear;
  opacity: 0.6;
}

#hero-progress.run {
  transform: scaleX(0);
}

#hero-progress.done {
  opacity: 0;
}

/* ABOUT */
#about {
  padding: 60px 4%;
}

#about .about-container {
  max-width: 720px;
}

#about .about-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 12px;
}

#about h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

#about p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, .72);
}

.about-quote {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--red);
  background: rgba(255, 255, 255, .03);
  border-radius: 0 10px 10px 0;
}

.about-quote .quote-text {
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 8px;
}

.about-quote .quote-author {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 12px;
}

.about-quote .quote-response {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .8);
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 768px) {
  #about h2 {
    font-size: 1.5rem;
  }

  #about p,
  .about-quote .quote-text,
  .about-quote .quote-response {
    font-size: 0.9rem;
  }
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Di mobile, video full width seperti sebelumnya */
  #hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-video-wrap::before,
  .hero-video-wrap::after {
    display: none;
  }

  .hero-content {
    bottom: 18%;
    padding: 0 5%;
  }

  #btn-show-text {
    bottom: 18%;
  }
}