/*
Theme Name: Wicked Works
REDESIGNED — Better buttons, cleaner menu, professional typography
Version: 2.0
*/

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

:root {
  --color-bg: #0A0A0C;
  --color-text: #EAEAEA;
  --color-red: #E62323;
  --color-graphite: #1B1B1F;
  --spacing-xs: 12px;
  --spacing-sm: 24px;
  --spacing-md: 48px;
  --spacing-lg: 96px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
}

/* ==========================================================================
   TYPOGRAPHY — STRONGER, CLEANER
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: var(--spacing-sm);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  margin-bottom: var(--spacing-sm);
  max-width: 65ch;
  font-weight: 300;
}

strong {
  font-weight: 600;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-lg) 0;
  position: relative;
}

.section-dark {
  background-color: var(--color-graphite);
}

/* ==========================================================================
   HEADER — STRONGER MENU, NO RED BOXES
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-sm) var(--spacing-sm);
  background: linear-gradient(180deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0) 100%);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10,10,12,0.98);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.site-logo img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.site-logo:hover img {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-sm);
}

/* FIXED MENU — Stronger font, subtle hover, NO RED BOXES */
.main-nav a {
  font-size: 0.95rem;
  font-weight: 600; /* Increased from 500 */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 0; /* Removed horizontal padding */
  transition: all 0.3s ease;
  position: relative;
  opacity: 0.85;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-red);
  transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 12px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
  /* Apple recommends 44x44px minimum, we'll go bigger for better UX */
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  /* Ensure button is always clickable */
  position: relative;
  z-index: 1002;
  /* Better tap feedback */
  transition: transform 0.1s ease, opacity 0.1s ease, background 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-toggle:active {
  opacity: 0.9;
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

/* Ensure the span inside doesn't interfere with touch events */
.mobile-menu-toggle span {
  pointer-events: none;
  display: block;
  line-height: 1;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    z-index: 1001;
    position: relative;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--color-graphite);
    padding: var(--spacing-lg) var(--spacing-sm);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
  }
  
  .main-nav a {
    font-size: 1.25rem;
    padding: 12px 0;
    display: block;
  }
}

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

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

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10,10,12,0.3) 0%, rgba(10,10,12,0.7) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 var(--spacing-sm);
  animation: fadeInUp 1.2s ease-out;
}

.hero-logo {
  max-width: 300px;
  margin: 0 auto;
  opacity: 1;
  animation: fadeIn 1s ease-out;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   VERTICAL VIDEO GRID — THE STAR OF THE SHOW
   ========================================================================== */

.vertical-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 0;
}

.vertical-video-item {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
  transition: transform 0.6s var(--ease-out);
}

.vertical-video-item:hover {
  transform: translateY(-8px);
}

.vertical-video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 12, 0.85);
  color: #fff;
  padding: 16px 48px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  border: 2px solid var(--color-red);
  box-shadow: 0 8px 32px rgba(230, 35, 35, 0.3);
  transition: all 0.4s var(--ease-out);
}

.vertical-video-item:hover .video-label {
  background: var(--color-red);
  border-color: #fff;
  box-shadow: 0 12px 48px rgba(230, 35, 35, 0.5);
  transform: translate(-50%, -50%) scale(1.05);
}

@media (min-width: 768px) {
  .vertical-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .vertical-video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   SERVICE CARDS — PUNCHY & IMPACTFUL
   ========================================================================== */

.service-card {
  background: linear-gradient(135deg, rgba(27,27,31,0.95) 0%, rgba(10,10,12,0.95) 100%);
  border: 2px solid rgba(230, 35, 35, 0.3);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(230, 35, 35, 0.1), transparent);
  transition: left 0.6s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-red);
  box-shadow: 0 20px 60px rgba(230, 35, 35, 0.3);
  background: linear-gradient(135deg, rgba(27,27,31,1) 0%, rgba(10,10,12,1) 100%);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-red);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.service-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

/* ==========================================================================
   LINKS — SIMPLE, CLEAN, NO AGGRESSIVE BUTTONS
   ========================================================================== */

.simple-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

.simple-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-red);
  transition: transform 0.3s ease;
  transform-origin: right;
}

.simple-link:hover::after {
  transform: scaleX(0);
  transform-origin: left;
}

.cta-link {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 2px solid var(--color-red);
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.cta-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-red);
  transition: left 0.4s var(--ease-out);
  z-index: -1;
}

.cta-link:hover {
  color: #fff;
}

.cta-link:hover::before {
  left: 0;
}

/* ==========================================================================
   SPLIT PANEL — FOR ABOUT PAGE
   ========================================================================== */

.split-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  align-items: start;
  /* Ensure proper stacking context */
  position: relative;
}

/* On mobile, ensure content is in proper order */
@media (max-width: 767px) {
  .split-panel {
    /* Ensure no overlap */
    isolation: isolate;
  }
  
  .split-image-stack,
  .split-image {
    /* Ensure images don't float over content */
    position: relative;
    z-index: 1;
  }
  
  .split-content {
    /* Ensure content is above images if needed */
    position: relative;
    z-index: 2;
  }
}

@media (min-width: 768px) {
  .split-panel {
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
  }
}

.split-image {
  position: relative;
  aspect-ratio: 1/1; /* FIXED: Square, not 16x9 */
  border-radius: 8px;
  overflow: hidden;
}

.split-image.sticky {
  /* Disable sticky on mobile */
  position: relative;
}

/* Only enable sticky on desktop */
@media (min-width: 768px) {
  .split-image.sticky {
    position: sticky;
    top: 120px;
  }
}

.split-image-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.split-image-stack.sticky {
  /* Disable sticky on mobile to prevent text scrolling behind images */
  position: relative;
}

/* Only enable sticky on desktop */
@media (min-width: 768px) {
  .split-image-stack.sticky {
    position: sticky;
    top: 120px;
  }
}

.split-image-stacked {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
}

.split-image-stacked img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-content {
  padding: var(--spacing-sm) 0;
}

.split-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.split-content p {
  max-width: 100%;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ==========================================================================
   CAPABILITIES GRID
   ========================================================================== */

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .capabilities-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.capability-card {
  background: var(--color-graphite);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  border: 1px solid rgba(255,255,255,0.05);
}

.capability-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(230, 35, 35, 0.15);
}

.capability-media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.capability-media video,
.capability-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.capability-card:hover .capability-media video,
.capability-card:hover .capability-media img {
  transform: scale(1.05);
}

.capability-content {
  padding: var(--spacing-sm);
}

.capability-content h3 {
  color: var(--color-red);
  margin-bottom: var(--spacing-xs);
  font-size: 1.5rem;
}

.capability-content p {
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */

.contact-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-sm);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

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

.form-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 16px;
  background: var(--color-graphite);
  border: 1px solid rgba(234, 234, 234, 0.1);
  border-radius: 4px;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-red);
}

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

.submit-btn {
  padding: 16px 48px;
  background-color: transparent;
  border: 2px solid var(--color-red);
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: var(--color-red);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding: var(--spacing-lg) 0 var(--spacing-sm);
  border-top: 1px solid rgba(234, 234, 234, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-logo img {
  height: 50px;
  margin-bottom: var(--spacing-xs);
}

.footer-tagline {
  font-style: italic;
  opacity: 0.8;
}

.footer-links h4 {
  color: var(--color-red);
  margin-bottom: var(--spacing-xs);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  font-size: 0.95rem;
  display: block;
  padding: 4px 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(234, 234, 234, 0.1);
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

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

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.show-mobile {
  display: block;
}

@media (min-width: 768px) {
  .show-mobile {
    display: none;
  }
}