/* ==========================================================================
   MW. — shared stylesheet (homepage + project pages)
   Extracted from the previously duplicated inline <style> blocks so it
   ships once and is cached across every page instead of being re-parsed
   on every single request.
   ========================================================================== */

:root {
  --color-bg: #050505;
  --color-accent: #ccff00;
  --color-white: #f0f0f0;
  --color-dim: #444;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Work Sans", sans-serif;
  --font-mono: "Space Mono", monospace;
  --section-padding: 8rem 5%;
  --cursor-size: 20px;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { height: 100vh; overflow: hidden; }
body.menu-open { overflow: hidden; }

/* --- CUSTOM CURSOR --- */
.cursor {
  position: fixed; top: 0; left: 0; width: var(--cursor-size); height: var(--cursor-size);
  background: white; border-radius: 50%; pointer-events: none; z-index: 9999;
  mix-blend-mode: difference; transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
}
.cursor.hovered { width: 80px; height: 80px; background: var(--color-accent); mix-blend-mode: normal; opacity: 0.8; }

/* --- PRELOADER --- */
.preloader {
  position: fixed; inset: 0; background: #000; z-index: 10000;
  display: grid; place-items: center; overflow: hidden;
}
.preloader-shutter {
  position: absolute; inset: 0; background: var(--color-accent); z-index: 1;
  transform: scaleY(0); transform-origin: bottom;
}
.loader-content { position: relative; z-index: 2; text-align: center; width: 100%; }
.loader-counter { font-family: var(--font-display); font-size: clamp(8rem, 25vw, 30rem); line-height: 0.8; font-weight: 900; color: var(--color-white); width: 100%; display: block; }
.loader-text-wrap { position: absolute; bottom: 2rem; left: 2rem; font-family: var(--font-mono); color: var(--color-accent); text-transform: uppercase; font-size: 0.8rem; text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.glitch-text { display: block; }

/* --- NAVIGATION & MENU --- */
header {
  position: fixed; top: 0; left: 0; width: 100%; padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center; z-index: 200;
  mix-blend-mode: exclusion;
  transition: padding 0.3s ease;
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; color: white; text-transform: uppercase; }
.nav-meta { display: flex; gap: 2rem; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; color: white; }
.menu-trigger { font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; cursor: none; }

.menu-overlay {
  position: fixed; inset: 0; background: #0a0a0a; z-index: 150;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 0.8s cubic-bezier(0.87, 0, 0.13, 1);
}
.menu-overlay.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

.menu-nav { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; padding: 0 5%; }
.menu-link {
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem);
  color: transparent; -webkit-text-stroke: 1px #666; text-decoration: none;
  text-transform: uppercase; font-weight: 800; transition: color 0.3s;
  transform: translateY(100px); opacity: 0;
  text-align: center;
}
.menu-link:hover { color: var(--color-accent); -webkit-text-stroke: 1px var(--color-accent); }

/* --- HERO (homepage) --- */
.hero {
  height: 100vh; width: 100%; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background-color: var(--color-bg);
}

.video-chaos { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.chaos-window {
  position: absolute; overflow: hidden; opacity: 0;
  filter: grayscale(100%) contrast(1.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  background: #0a0a0a;
}
.chaos-window video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }

.cw-1 { top: 10%; left: 5%; width: 35vw; height: 50vh; animation: chaosPop 5s infinite 0.2s; z-index: 1; }
.cw-1 video { object-position: 20% 20%; }
.cw-2 { top: 45%; right: 5%; width: 28vw; height: 45vh; animation: chaosPop 4.2s infinite 1.5s; z-index: 3; }
.cw-2 video { object-position: 80% 60%; }
.cw-3 { bottom: 5%; left: 15%; width: 45vw; height: 30vh; animation: chaosPop 6s infinite 0.8s; z-index: 2; }
.cw-3 video { object-position: 50% 90%; }
.cw-4 { top: 15%; right: 25%; width: 22vw; height: 35vh; animation: chaosPop 3.8s infinite 2.5s; z-index: 4; }
.cw-4 video { object-position: 70% 10%; }
.cw-5 { top: 35%; left: 35%; width: 30vw; height: 40vh; animation: chaosPop 5.5s infinite 3.2s; z-index: 5; }
.cw-5 video { object-position: 40% 50%; }
.cw-6 { bottom: 15%; right: 15%; width: 35vw; height: 25vh; animation: chaosPop 4.7s infinite 1.1s; z-index: 6; }
.cw-6 video { object-position: 90% 80%; }

@keyframes chaosPop {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  5% { opacity: 1; transform: scale(1.02) translateY(-5px); }
  10% { transform: scale(1) translateY(0); }
  80% { opacity: 1; transform: scale(1) translateY(0); }
  90% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 0; transform: scale(0.9) translateY(20px); }
}

.video-mobile { display: none; position: absolute; inset: 0; z-index: 0; }
.video-mobile video { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: grayscale(100%) contrast(1.2); }

.hero-content { z-index: 10; text-align: center; width: 100%; mix-blend-mode: difference; color: white; display: flex; flex-direction: column; align-items: center; padding: 0 1rem; pointer-events: none; }
.hero-title { font-size: clamp(3.5rem, 13vw, 15rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; }
.reveal-wrapper { overflow: hidden; display: block; }
.reveal-text { display: block; }

.ticker-wrap { position: absolute; bottom: 0; left: 0; width: 100%; overflow: hidden; background: var(--color-accent); color: #000; padding: 0.8rem 0; z-index: 15; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1rem; }
.ticker { display: inline-block; white-space: nowrap; animation: ticker 25s linear infinite; }
.ticker-item { display: inline-block; padding: 0 2rem; }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* --- CLIENTS MARQUEE --- */
.clients-section { padding: 4rem 0; background: #0a0a0a; border-bottom: 1px solid #222; overflow: hidden; }
.client-track { display: flex; gap: 4rem; width: max-content; animation: slideClients 30s linear infinite; }
.client-logo { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); color: #333; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
@keyframes slideClients { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- SECTIONS GENERAL --- */
section { padding: var(--section-padding); position: relative; }
.section-header { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 2rem; margin-bottom: 4rem; display: flex; justify-content: space-between; align-items: flex-end; }
h2 { font-size: clamp(2.5rem, 5vw, 3rem); margin: 0; font-family: var(--font-display); text-transform: uppercase; line-height: 1; }

/* --- WORK GRID --- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4rem; }
.card { display: block; text-decoration: none; color: white; margin-bottom: 2rem; }
.card-img-wrap { width: 100%; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 1.5rem; background: #0a0a0a; }
.card-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.5s ease, transform 0.5s ease; }
.card:hover .card-img { filter: grayscale(0%); transform: scale(1.03); }

/* --- SERVICES --- */
.services-list { display: flex; flex-direction: column; }
.service-item { border-bottom: 1px solid #222; padding: 3rem 0; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.service-left { display: flex; align-items: baseline; gap: 2rem; }
.service-num { font-family: var(--font-mono); color: var(--color-accent); font-size: 1rem; }
.service-name { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 700; text-transform: uppercase; color: #fff; transition: color 0.3s ease, padding-left 0.3s ease; }
.service-desc { font-family: var(--font-mono); color: #666; text-align: right; max-width: 300px; font-size: 0.9rem; }
.service-item:hover { border-bottom: 1px solid var(--color-accent); }
.service-item:hover .service-name { color: var(--color-accent); padding-left: 20px; }

/* --- ABOUT --- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: start; }
.about-text h3 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 4rem); line-height: 0.9; margin-bottom: 2rem; text-transform: uppercase; }
.about-meta { font-family: var(--font-mono); color: var(--color-accent); margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.about-bio { font-size: 1.1rem; line-height: 1.6; color: #ccc; max-width: 90%; }
.about-bio p + p { margin-top: 1rem; }
.about-img-wrap { width: 100%; aspect-ratio: 3/4; overflow: hidden; position: relative; background: #0a0a0a; }
.about-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.5s ease; }
.about-img-wrap:hover .about-img { filter: grayscale(0%); }

/* --- CONTACT FORM --- */
.contact-section { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-top: 2rem; }
.form-group { position: relative; padding-top: 1rem; }
.form-label { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; color: #666; display: block; margin-bottom: 0.5rem; }
.form-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid #333; color: white; font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 3rem); padding: 0.5rem 0; border-radius: 0; outline: none; transition: border-color 0.3s ease, color 0.3s ease; }
.form-input:focus { border-bottom: 1px solid var(--color-accent); color: var(--color-accent); }
.form-input::placeholder { color: #222; text-transform: uppercase; opacity: 0.5; }
.submit-wrap { display: flex; justify-content: flex-end; margin-top: 4rem; position: relative; align-items: center; gap: 2rem; }
.form-flash { font-family: var(--font-mono); font-size: 0.9rem; max-width: 60%; }
.form-flash.success { color: var(--color-accent); }
.form-flash.error { color: #ff5555; }
.submit-btn { width: 180px; height: 180px; border-radius: 50%; background: transparent; border: 1px solid var(--color-accent); color: var(--color-accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); position: relative; overflow: hidden; }
.submit-btn::after { content: ''; position: absolute; inset: 0; background: var(--color-accent); border-radius: 50%; transform: scale(0); transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); z-index: -1; }
.submit-btn:hover { color: #000; border-color: var(--color-accent); }
.submit-btn:hover::after { transform: scale(1); }
.submit-btn:disabled { opacity: 0.5; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

footer { border-top: 1px solid #222; padding: 4rem 5%; font-family: var(--font-mono); font-size: 0.8rem; display: flex; justify-content: space-between; color: var(--color-white); }
footer a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
footer a:hover { opacity: 0.7; }

/* --- PROJECT PAGES --- */
.project-hero { padding: 12rem 5% 4rem 5%; border-bottom: 1px solid #222; margin-bottom: 4rem; }
.project-title { font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 9rem); font-weight: 900; line-height: 0.9; text-transform: uppercase; margin-bottom: 2rem; }
.project-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 4rem; font-family: var(--font-mono); font-size: 0.9rem; color: #888; }
.meta-label { color: var(--color-accent); display: block; margin-bottom: 0.5rem; }
.meta-value { color: white; display: block; max-width: 400px; line-height: 1.5; }

.video-gallery { padding: 0 5% 8rem 5%; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; max-width: 1400px; margin: 0 auto; }
.video-gallery.count-1 { max-width: 460px; }
.video-gallery.count-2 { max-width: 900px; }

.video-item, .reel-item { position: relative; width: 100%; aspect-ratio: 9/16; overflow: hidden; background: #111; transition: transform 0.3s ease; }
.video-item video, .reel-item video, .video-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: filter 0.3s ease, transform 0.5s ease; }
.video-item:hover video, .reel-item:hover video, .video-item:hover img { filter: grayscale(0%); transform: scale(1.05); }

.media-label { font-family: var(--font-mono); color: #666; margin-bottom: 1rem; display: block; text-transform: uppercase; font-size: 0.8rem; }

.youtube-wrapper { width: 100%; max-width: 900px; margin: 0 auto; position: relative; padding-bottom: 50.6%; background: #111; overflow: hidden; grid-column: 1 / -1; }
.youtube-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.next-project { border-top: 1px solid #222; padding: 8rem 5%; text-align: center; transition: background 0.3s ease; display: block; text-decoration: none; }
.next-project:hover { background: #0f0f0f; }
.next-label { font-family: var(--font-mono); color: var(--color-accent); margin-bottom: 1rem; display: block; }
.next-title { font-family: var(--font-display); font-size: clamp(3rem, 10vw, 8rem); text-transform: uppercase; color: white; text-decoration: none; font-weight: 900; display: inline-block; }
.next-title span { display: inline-block; transition: transform 0.3s ease; }
.next-project:hover .next-title span { transform: translateX(20px); color: var(--color-accent); }

/* --- RESPONSIVE --- */
@media(max-width: 1024px) {
  .video-gallery { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media(max-width: 900px) {
  .work-grid { gap: 2rem; }
}

@media(max-width: 768px) {
  :root { --section-padding: 4rem 1.5rem; }
  header { padding: 1.5rem; }
  .nav-meta { display: none; }
  .hero-title { font-size: 14vw; }
  .work-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-img-wrap { order: -1; }
  .service-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .service-desc { text-align: left; max-width: 100%; margin-top: 0.5rem; }
  .service-item:hover .service-name { padding-left: 0; }
  .loader-counter { font-size: 25vw; }
  footer { flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
  .video-chaos { display: none; }
  .video-mobile { display: block; }
  .project-meta-grid { grid-template-columns: 1fr; gap: 2rem; }
  .video-gallery { grid-template-columns: 1fr; gap: 2rem; max-width: 100%; }
  .submit-wrap { flex-direction: column; align-items: flex-start; }
  .form-flash { max-width: 100%; }
}

@media(max-width: 480px) {
  .submit-btn { width: 130px; height: 130px; font-size: 1rem; }
  .about-bio { max-width: 100%; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor { display: none; }
  * { cursor: auto; }
  .menu-trigger, .logo, a, button { cursor: pointer; }
}
