/* ============================================
   Freeland Media — Brand Website Styles
   ============================================ */

/* --- Brand Colors --- */
:root {
  --neon: #D7FF5C;
  --dark: #1A1F2E;
  --dark-lighter: #242A3A;
  --blue: #6BB1EA;
  --white: #F5F5F5;
  --white-dim: rgba(245, 245, 245, 0.6);
  --neon-glow: 0 0 20px rgba(215, 255, 92, 0.3);
  --neon-glow-strong: 0 0 40px rgba(215, 255, 92, 0.4), 0 0 80px rgba(215, 255, 92, 0.15);
}

/* --- Font Faces --- */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../fonts/HarmonyOS_Sans_SC_Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../fonts/HarmonyOS_Sans_SC.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../fonts/HarmonyOS_Sans_SC_Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../fonts/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--neon) var(--dark);
}

body {
  font-family: 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar (Webkit) */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--neon);
  border-radius: 3px;
}

/* --- Selection --- */
::selection {
  background: var(--neon);
  color: var(--dark);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
  padding: 1rem 2rem;
  background: rgba(26, 31, 46, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(215, 255, 92, 0.08);
}

.nav-logo {
  height: 28px;
  width: auto;
  transition: opacity 0.3s;
}

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

.nav-link {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--neon);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--neon);
  transition: width 0.3s;
}

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

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 31, 46, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  transition: opacity 0.4s;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu .nav-link {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrapper iframe {
  width: 100%;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  border: none;
}

@media (max-aspect-ratio: 16/9) {
  .hero-video-wrapper iframe {
    width: auto;
    height: 100%;
  }
}

.hero-video-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(26, 31, 46, 0.10) 0%,
      rgba(26, 31, 46, 0.0) 20%,
      rgba(26, 31, 46, 0.0) 60%,
      rgba(26, 31, 46, 0.5) 85%,
      rgba(26, 31, 46, 0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Sound Toggle */
.sound-toggle {
  position: absolute;
  bottom: 7rem;
  right: 2.5rem;
  z-index: 3;
  background: rgba(26, 31, 46, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 245, 245, 0.15);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.sound-toggle:hover {
  background: rgba(26, 31, 46, 0.8);
  border-color: var(--neon);
  box-shadow: var(--neon-glow);
}

.sound-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--white);
  fill: none;
}

.sound-toggle .icon-unmuted {
  stroke: var(--neon);
}

/* Slogan Bar */
.hero-slogan-bar {
  position: absolute;
  bottom: 5rem;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
}

.hero-slogan {
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--white-dim);
  text-transform: uppercase;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
  stroke: var(--white-dim);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* --- Section Common --- */
.section {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.section-desc {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--white-dim);
  max-width: 600px;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.service-card {
  background: rgba(36, 42, 58, 0.5);
  border: 1px solid rgba(245, 245, 245, 0.06);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.4s;
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(36, 42, 58, 0.8);
}

.service-card:hover::before {
  border-color: rgba(215, 255, 92, 0.3);
}

.service-card:hover {
  box-shadow: var(--neon-glow);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--neon);
}

.service-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.service-desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white-dim);
}

/* --- Works Section --- */
.works-section {
  padding: 4rem 0;
}

.works-section .section {
  padding-bottom: 3rem;
}

/* View More Link */
.view-more-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8rem;
}

.view-more-link {
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--white-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}

.view-more-link:hover {
  color: var(--neon);
}

/* Xinpianchang Modal */
.xinpianchang-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.xinpianchang-modal.active {
  opacity: 1;
  visibility: visible;
}

.xinpianchang-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 46, 0.95);
  cursor: pointer;
}

.xinpianchang-modal-content {
  position: relative;
  z-index: 1;
  width: 95%;
  height: 90%;
  max-width: 1400px;
  background: var(--dark-lighter);
  border-radius: 12px;
  overflow: hidden;
}

.xinpianchang-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.xinpianchang-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  background: rgba(26, 31, 46, 0.8);
  border: 1px solid rgba(245, 245, 245, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--white);
}

.xinpianchang-modal-close:hover {
  background: var(--neon);
  color: var(--dark);
  border-color: var(--neon);
}

.xinpianchang-modal-close svg {
  width: 20px;
  height: 20px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.work-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark-lighter);
  display: block;
  border: none;
  padding: 0;
  text-align: left;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(26, 31, 46, 0.9) 0%,
      rgba(26, 31, 46, 0.2) 50%,
      transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s;
}

.work-item:hover img {
  transform: scale(1.05);
}

.work-item:hover .work-overlay {
  opacity: 1;
}

.work-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.work-category {
  font-size: 0.75rem;
  color: var(--neon);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(215, 255, 92, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
}

.work-play-icon svg {
  width: 20px;
  height: 20px;
  color: var(--dark);
  margin-left: 3px;
}

.work-item:hover .work-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Carousel thumbnail (just for display) */
.work-item-carousel {
  position: relative;
}

/* Placeholder work items */
.work-item-placeholder {
  background: linear-gradient(135deg, var(--dark-lighter) 0%, rgba(36, 42, 58, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-item-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: rgba(245, 245, 245, 0.15);
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}

.contact-info-item {
  margin-bottom: 2rem;
}

.contact-info-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 0.5rem;
}

.contact-info-value {
  font-size: 1rem;
  font-weight: 300;
  color: var(--white);
}

.contact-info-value a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info-value a:hover {
  color: var(--neon);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.form-input,
.form-textarea {
  background: rgba(36, 42, 58, 0.5);
  border: 1px solid rgba(245, 245, 245, 0.08);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--white);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(245, 245, 245, 0.25);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(215, 255, 92, 0.4);
  box-shadow: 0 0 0 3px rgba(215, 255, 92, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.btn-submit {
  align-self: flex-start;
  background: var(--neon);
  color: var(--dark);
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  box-shadow: var(--neon-glow-strong);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.form-success {
  display: none;
  padding: 1rem;
  background: rgba(215, 255, 92, 0.1);
  border: 1px solid rgba(215, 255, 92, 0.3);
  border-radius: 8px;
  color: var(--neon);
  font-size: 0.9rem;
  text-align: center;
}

.form-success.show {
  display: block;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(245, 245, 245, 0.06);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-line {
  width: 60px;
  height: 2px;
  background: var(--neon);
  margin: 0 auto 1.5rem;
  box-shadow: var(--neon-glow);
}

.footer-text {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--white-dim);
  letter-spacing: 0.05em;
}

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

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

/* Stagger children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible>*:nth-child(1) {
  transition-delay: 0s;
}

.reveal-stagger.visible>*:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal-stagger.visible>*:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal-stagger.visible>*:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal-stagger.visible>*:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal-stagger.visible>*:nth-child(6) {
  transition-delay: 0.5s;
}

.reveal-stagger.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* --- Divider --- */
.section-divider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      rgba(245, 245, 245, 0.06) 20%,
      rgba(245, 245, 245, 0.06) 80%,
      transparent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links-desktop {
    display: none;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 0 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-slogan {
    letter-spacing: 0.15em;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 60vw;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

/* --- Video Modal --- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 46, 0.95);
  cursor: pointer;
}

.video-modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1000px;
  background: var(--dark-lighter);
  border-radius: 12px;
  overflow: hidden;
}

.video-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
}

.video-modal-close svg {
  width: 24px;
  height: 24px;
}

.video-modal-player {
  aspect-ratio: 16 / 9;
}

.video-modal-player iframe {
  width: 100%;
  height: 100%;
}

.video-modal-info {
  padding: 1rem 1.5rem;
}

.video-modal-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.video-modal-category {
  font-size: 0.7rem;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Modal Carousel */
.modal-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.modal-carousel-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.modal-carousel-btn:hover {
  background: var(--neon);
  color: var(--dark);
}

.modal-carousel-btn svg {
  width: 24px;
  height: 24px;
}

.modal-carousel-prev {
  left: 20px;
}

.modal-carousel-next {
  right: 20px;
}

.modal-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.modal-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.modal-carousel-dot.active {
  background: var(--neon);
  width: 24px;
  border-radius: 4px;
}