/* ========================================
   FX HONEST — AI-Powered Creative Studio
   Enhanced Stylesheet
   ======================================== */

:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --text: #f0f0f0;
  --text-muted: #666666;
  --text-dim: #444444;
  --accent: #c9ff00;
  --accent-dim: rgba(201, 255, 0, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --cursor-size: 20px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ========================================
   GRAIN OVERLAY
   ======================================== */
.grain-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  animation: grainShift 0.5s steps(1) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -2%); }
  20% { transform: translate(2%, 2%); }
  30% { transform: translate(-1%, 1%); }
  40% { transform: translate(1%, -1%); }
  50% { transform: translate(-2%, 2%); }
  60% { transform: translate(2%, -2%); }
  70% { transform: translate(-1%, -1%); }
  80% { transform: translate(1%, 1%); }
  90% { transform: translate(-2%, -1%); }
}

/* ========================================
   CUSTOM CURSOR
   ======================================== */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor-outline {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              background 0.4s ease;
}

.cursor-outline.hover {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  background: rgba(201, 255, 0, 0.08);
}

.cursor-image-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 200px;
  pointer-events: none;
  z-index: 9997;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.cursor-image-preview.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

/* ========================================
   WEBGL BACKGROUND
   ======================================== */
#webgl-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: none;
  padding: 0.5rem;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle.active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4vw;
  z-index: 1;
}

.hero-content {
  max-width: 950px;
  padding-top: 10vh;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 2.5rem;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(120%);
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(30px);
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 100px;
}

.hero-cta.primary {
  background: var(--text);
  color: var(--bg);
}

.hero-cta.primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero-cta.secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-cta.secondary:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.05);
}

.hero-cta svg {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta:hover svg {
  transform: translate(3px, -3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 4vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
  animation: scrollFill 2.5s ease-in-out infinite;
}

@keyframes scrollFill {
  0% { height: 0%; top: 0; }
  50% { height: 100%; top: 0; }
  100% { height: 0%; top: 100%; }
}

/* ========================================
   MARQUEE
   ======================================== */
.marquee-section {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
}

.marquee-content span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.marquee-content span:nth-child(odd) {
  color: var(--text-muted);
}

.marquee-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   CONTAINER & SECTIONS
   ======================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 4vw;
}

.manifesto,
.stats,
.work,
.services,
.contact {
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.section-title.giant {
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.section-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
}

/* ========================================
   MANIFESTO
   ======================================== */
.manifesto {
  padding: 12rem 0;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.manifesto-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  position: sticky;
  top: 30vh;
}

/* ========================================
   STATS
   ======================================== */
.stats {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ========================================
   WORK LIST
   ======================================== */
.work {
  padding: 10rem 0;
}

.work-header {
  margin-bottom: 5rem;
}

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

.work-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: none;
  transition: padding-left 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s ease;
  position: relative;
}

.work-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: var(--accent-dim);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-row:hover::before {
  width: 100%;
}

.work-row:hover {
  padding-left: 1.5rem;
}

.work-row > * {
  position: relative;
  z-index: 1;
}

.work-row-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.work-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}

.work-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.work-row-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.4s ease;
}

.work-row:hover .work-row-title {
  color: var(--accent);
}

.work-row-year {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-display);
}

/* ========================================
   SERVICES
   ======================================== */
.services {
  padding: 10rem 0;
  background: var(--surface);
}

.services-list {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-item:hover {
  padding-left: 1rem;
}

.service-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.service-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 500px;
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  padding: 12rem 0 6rem;
  text-align: center;
}

.contact-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  text-align: left;
  align-items: start;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  display: inline-block;
  margin-top: 1rem;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-email:hover::after {
  width: 100%;
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.4s ease, background 0.4s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(201, 255, 0, 0.03);
}

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

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-submit:hover {
  background: var(--text);
  transform: scale(1.02);
}

.form-submit:active {
  transform: scale(0.98);
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.5rem;
}

.form-status.success {
  color: var(--accent);
}

.form-status.error {
  color: #ff4444;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.4s ease;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ========================================
   SCROLL REVEAL BASE
   ======================================== */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(50px);
}

/* ========================================
   TEXT SCRAMBLE
   ======================================== */
[data-scramble] {
  display: inline-block;
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .grain-overlay {
    display: none;
  }

  [data-scroll-reveal] {
    opacity: 1;
    transform: none;
  }

  .cursor-dot,
  .cursor-outline,
  .cursor-image-preview {
    display: none !important;
  }

  body {
    cursor: auto;
  }

  .marquee-track {
    animation: none;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .manifesto-label {
    position: static;
  }

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

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

  .work-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 2rem 0;
  }

  .work-row-year {
    text-align: left;
  }

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

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

  .footer-grid {
    flex-direction: column;
    text-align: center;
  }

  .cursor-dot,
  .cursor-outline,
  .cursor-image-preview {
    display: none !important;
  }

  body {
    cursor: auto;
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0 6vw;
  }

  .container {
    padding: 0 6vw;
  }

  .nav {
    padding: 1.25rem 6vw;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }
}
