/* ============================================
   OUTDUN PRODUCTIONS - Main Stylesheet
   Dark minimal theme for video production
   ============================================ */

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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #e0e0e0;
  --accent-hover: #ffffff;
  --border: #222222;
  --border-light: #333333;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --nav-height: 80px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.nav__logo .nav__logo-icon {
  height: 36px;
  width: 36px;
  display: block;
  flex-shrink: 0;
}

.nav__logo span {
  font-weight: 300;
  color: var(--text-secondary);
}

.nav__links {
  display: flex;
  gap: 36px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

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

.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--transition);
}

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

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

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

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero__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: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 0;
}

.hero__content {
  max-width: 800px;
  position: relative;
  z-index: 1;
  animation: heroFadeUp 0.8s ease-out both;
}

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

.hero__tagline {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero__tagline span.divider {
  margin: 0 8px;
  opacity: 0.4;
}

.hero__tagline svg.tagline-icon {
  width: 14px;
  height: 14px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 1.5;
  margin-right: 2px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  color: rgba(240, 240, 240, 0.85);
}

.hero__title-accent {
  font-weight: 700;
}

.hero__subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 36px;
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: all var(--transition);
}

.hero__cta:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.hero__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.hero__cta:hover svg {
  transform: translateX(4px);
}

/* --- Section Base --- */
.section {
  padding: 100px 0;
}

.section--border {
  border-top: 1px solid var(--border);
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 20px auto 0;
  line-height: 1.7;
}

/* --- Video Grid (Portfolio) --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--transition);
}

.video-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.video-card__embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: var(--bg-secondary);
}

.video-card__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Custom thumbnail overlay for clean look */
.video-card__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  transition: all var(--transition);
}

.video-card__thumb:hover .video-card__play {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.video-card__play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  fill: rgba(255, 255, 255, 0.9);
}

/* Unmute button for mobile autoplay */
.video-unmute {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-main);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
}

.video-unmute svg {
  width: 22px;
  height: 22px;
}

/* Placeholder shown when no YouTube embed is set */
.video-card__placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

.video-card__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.video-card__placeholder span {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.video-card__info {
  padding: 20px;
}

.video-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-card__category {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Featured work (home page - larger cards) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* --- About Page --- */
.about-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  text-align: center;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-content__text h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.about-content__text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-content__text p:last-child {
  margin-bottom: 0;
}

.about-values {
  display: grid;
  gap: 32px;
}

.about-value {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.about-value__number {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.about-value__icon {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 12px;
}

.about-value__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-value__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Contact Page --- */
.contact-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  text-align: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact-info__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info__icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info__label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.contact-info__value {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.contact-info__value a {
  color: var(--text-primary);
}

.contact-info__value a:hover {
  color: var(--accent-hover);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: var(--font-main);
  color: var(--text-primary);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--text-secondary);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 1px solid var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 4px;
}

.form-submit:hover {
  background: transparent;
  color: var(--text-primary);
}

.form-status {
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

.form-status--success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.form-status--error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, auto);
  gap: 48px;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 48px;
}

.footer__name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer__tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__contact {
  order: 3;
}

.footer__nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--text-primary);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__contact a,
.footer__contact p {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__contact a:hover {
  color: var(--text-primary);
}

.footer__social-links {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}

.footer__social-links a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__social-links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Page Header (Work, About, Contact) --- */
.page-header {
  padding: calc(var(--nav-height) + 80px) 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.page-header__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
  pointer-events: none;
}

.page-header .container {
  position: relative;
  z-index: 1;
  animation: heroFadeUp 0.8s ease-out both;
}

.page-header__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--text-primary);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-primary);
  transition: stroke var(--transition);
}

.back-to-top:hover svg {
  stroke: var(--bg-primary);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animation */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.5s; }
.stagger-children .fade-in:nth-child(7) { transition-delay: 0.6s; }
.stagger-children .fade-in:nth-child(8) { transition-delay: 0.7s; }
.stagger-children .fade-in:nth-child(9) { transition-delay: 0.8s; }

/* --- Responsive --- */
@media (max-width: 1024px) and (min-width: 769px) {
  .video-grid,
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    gap: 48px;
  }

  .section {
    padding: 80px 0;
  }
}

@media (max-width: 768px) {
  body.menu-open {
    overflow: hidden;
    overscroll-behavior: contain;
  }

  .nav__links.open a {
    animation: menuFadeIn 0.3s ease both;
  }

  .nav__links.open a:nth-child(1) { animation-delay: 0.05s; }
  .nav__links.open a:nth-child(2) { animation-delay: 0.1s; }
  .nav__links.open a:nth-child(3) { animation-delay: 0.15s; }
  .nav__links.open a:nth-child(4) { animation-delay: 0.2s; }

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

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--nav-height));
    background: rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20vh;
    gap: 36px;
    display: none;
    z-index: 999;
  }

  .nav__links a {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
  }

  .nav__links.open {
    display: flex;
  }

  body.menu-open .hero__content,
  body.menu-open .section,
  body.menu-open .footer,
  body.menu-open .page-header .container,
  body.menu-open .hero__overlay {
    animation: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .nav__links a {
    font-size: 1.1rem;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    min-height: 90vh;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .video-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

  .section {
    padding: 64px 0;
  }

  .section__header {
    margin-bottom: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer__nav {
    display: none;
  }

  .footer__social-links {
    justify-content: center;
  }

  .footer__bottom {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__tagline {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
  }

  .video-card__info {
    padding: 16px;
  }
}
