/* ==========================================================================
   ALDIMAS PRODUCTION - 1:1 PORTFOLIO STYLES
   Designed for High Performance & Cloudflare Pages
   ========================================================================== */

/* --- CSS Reset & Custom Properties --- */
:root {
  --bg-color: #000000;
  --bg-surface: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #8e8e8e;
  --accent: #ffffff;
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
}

/* --- Accessibility Focus Ring --- */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 4px;
}

/* --- SITE HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal);
}

.site-header.scrolled {
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.brand-link:hover {
  transform: scale(1.02);
}

.brand-logo {
  width: 52px;
  height: 48px;
  display: flex;
  align-items: center;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-btn:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

/* --- NAVIGATION DRAWER --- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 85vw);
  height: 100%;
  background-color: #ffffff;
  color: #000000;
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  padding: 30px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.nav-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 50px;
}

.close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.close-btn:hover {
  transform: rotate(90deg);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: color var(--transition-fast);
}

.drawer-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #000000;
  transition: width var(--transition-fast);
}

.drawer-nav-link:hover::after,
.drawer-nav-link.active::after {
  width: 100%;
}

/* --- HERO SECTION --- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%);
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
  animation: heroFadeIn 1.2s ease forwards;
}

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

/* --- INTRODUCTION SECTION --- */
.intro-section {
  position: relative;
  width: 100%;
  height: clamp(360px, 45vh, 480px);
  min-height: 360px;
  background-color: var(--bg-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.intro-bg-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #000000;
}

.intro-photo-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0.7;
  display: block;
}

.intro-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: clamp(14px, 2vw, 20px);
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95);
}

.intro-text {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.75;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
  max-width: 900px;
}

/* --- SELECTED WORKS SECTION --- */
.works-section {
  padding: clamp(60px, 10vw, 120px) 24px;
  background-color: var(--bg-color);
}

.works-container {
  max-width: 1320px;
  margin: 0 auto;
}

.works-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: clamp(40px, 7vw, 70px);
}

.works-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 70px);
  align-items: center;
}

/* Horizontal Showcase Card (~65% width) */
.work-card-horizontal {
  width: 100%;
  max-width: 880px;
}

.work-card-horizontal .video-container {
  aspect-ratio: 16 / 9;
}

/* 2x2 Vertical Showcase Grid */
.works-vertical-grid {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(30px, 5vw, 60px);
  justify-items: center;
}

.work-card-vertical {
  width: 100%;
  max-width: 420px;
}

.work-card-vertical .video-container {
  aspect-ratio: 9 / 16;
}

/* Video Card & Controls */
.work-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--bg-surface);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}

.work-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play/Pause Overlay */
.play-trigger-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.play-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.work-card:hover .play-icon-wrapper {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

.play-svg, .pause-svg {
  display: block;
  transition: transform var(--transition-fast);
}

/* Playing State: Hide play icon, show pause icon briefly, then fade out */
.work-card.is-playing .play-svg {
  display: none;
}

.work-card.is-playing .pause-svg {
  display: block;
}

.work-card:not(.is-playing) .pause-svg {
  display: none;
}

.work-card.is-playing .play-trigger-overlay {
  opacity: 0;
}

.work-card.is-playing:hover .play-trigger-overlay {
  opacity: 1;
}

/* Audio Toggle Button */
.audio-toggle-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.audio-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.85);
}

.audio-on-svg, .audio-off-svg {
  display: block;
}

.work-card.is-unmuted .audio-off-svg {
  display: none;
}

.work-card.is-unmuted .audio-on-svg {
  display: block;
}

.work-card:not(.is-unmuted) .audio-on-svg {
  display: none;
}

.work-card:not(.is-unmuted) .audio-off-svg {
  display: block;
}

/* --- SITE FOOTER --- */
.site-footer {
  padding: 50px 24px;
  background-color: var(--bg-color);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.copyright-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .works-vertical-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }

  .work-card-horizontal {
    max-width: 100%;
  }

  .intro-photo-wrapper {
    max-width: 100%;
  }

  .brand-logo {
    width: 44px;
    height: 40px;
  }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4.5rem);
  }
}
