/* =============================================
   PIXONIT — Digital Agency Website
   ============================================= */

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

:root {
  --bg: #0D0D0D;
  --bg-alt: #141414;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222;
  --surface: #2A2A2A;
  --border: #2A2A2A;
  --border-light: #333;

  --text: #F5F5F5;
  --text-secondary: #999;
  --text-tertiary: #666;

  --accent: #A855F7;
  --accent-alt: #D946EF;
  --accent-warm: #F97316;
  --accent-gradient: linear-gradient(135deg, #A855F7, #EC4899, #F97316);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-lg: 20px;

  --container: 1200px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.is-ready {
  opacity: 1;
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

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

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

/* --- UTILITIES --- */
.text--accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: white;
  background: rgba(168, 85, 247, 0.08);
}

.btn--large {
  padding: 18px 36px;
  font-size: 1.0625rem;
}

/* --- SECTION HEADER --- */
.section__header {
  margin-bottom: 56px;
}

.section__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  position: relative;
  padding-left: 32px;
}

.section__tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
  transform: translateY(-50%);
}

.section__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.4s ease, background 0.3s ease;
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  z-index: 10;
}

.nav__logo svg {
  width: 28px;
  height: 28px;
  color: white;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: var(--text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--cta {
  padding: 8px 20px;
  border-radius: 9999px;
  background: var(--accent-gradient);
  color: white !important;
  font-weight: 600;
}

.nav__link--cta::after { display: none; }

.nav__link--cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

/* --- Hamburger --- */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  z-index: 10;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

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

.nav__toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

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

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13,13,13,0.98);
    backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .nav__links.is-open {
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    font-size: 1.5rem;
    font-weight: 600;
  }

  .nav__link--cta {
    font-size: 1rem;
    padding: 12px 32px;
  }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(168, 85, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(249, 115, 22, 0.06) 0%, transparent 60%);
  transition: background 0.1s ease;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 80px 0 120px;
}

.hero__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.06);
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero__highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* --- Hero Marquee --- */
.hero__marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: marquee-scroll 20s linear infinite;
  width: max-content;
}

.marquee__track span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

.marquee__track .dot {
  color: var(--accent);
  font-size: 0.5rem;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Scroll indicator --- */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll__line {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, var(--text-tertiary), transparent);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 24px); }
  .hero__content { padding: 40px 0 80px; }
  .hero__desc { font-size: 1rem; }
  .hero__actions { margin-bottom: 48px; }
  .hero__scroll { display: none; }
}

/* =============================================
   CLIENTS
   ============================================= */
.clients {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.clients__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.client__item {
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.client__item:hover {
  opacity: 0.7;
}

.client__logo {
  width: 100px;
  height: auto;
}

@media (max-width: 768px) {
  .clients__grid { justify-content: center; gap: 24px; }
  .client__logo { width: 80px; }
}

/* =============================================
   WORK
   ============================================= */
.work {
  padding: 120px 0;
}

.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.work__card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work__card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.work__card--wide {
  grid-column: span 2;
}

.work__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.work__card--wide .work__media {
  aspect-ratio: 21 / 9;
}

.work__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: hsl(var(--hue, 220), 30%, 12%);
  overflow: hidden;
}

.work__pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, hsla(var(--hue, 220), 60%, 50%, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, hsla(var(--hue, 220), 40%, 40%, 0.08) 0%, transparent 50%);
}

.work__pattern::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px);
}

.work__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 9999px;
}

.work__info {
  padding: 24px;
}

.work__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.work__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work__tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .work__grid { grid-template-columns: 1fr; }
  .work__card--wide { grid-column: span 1; }
}

@media (max-width: 768px) {
  .work { padding: 80px 0; }
}

/* =============================================
   SERVICES
   ============================================= */
.services {
  padding: 120px 0;
  background: var(--bg-alt);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.service__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.service__card:hover::before {
  opacity: 1;
}

.service__icon {
  margin-bottom: 20px;
  color: var(--accent);
  width: 40px;
  height: 40px;
}

.service__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.service__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .services__grid { grid-template-columns: 1fr; }
  .services { padding: 80px 0; }
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  padding: 120px 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__content .section__header {
  margin-bottom: 32px;
}

.about__text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat__number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* --- About visual --- */
.about__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about__shape {
  width: 360px;
  height: 360px;
  position: relative;
}

.about__shape-inner {
  width: 100%;
  height: 100%;
  animation: shape-float 6s ease-in-out infinite;
}

.about__shape-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 60px rgba(168, 85, 247, 0.15));
}

@keyframes shape-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(6px) rotate(-1deg); }
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__shape { width: 260px; height: 260px; }
  .about__stats { gap: 28px; }
}

@media (max-width: 768px) {
  .about { padding: 80px 0; }
  .about__stats { flex-direction: column; gap: 20px; }
}

/* =============================================
   CTA MARQUEE + CONTACT
   ============================================= */
.cta-marquee {
  position: relative;
  padding: 80px 0 80px;
  background: var(--bg-alt);
}

.marquee__full {
  overflow: hidden;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
}

.marquee__track--full {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.marquee__track--full span {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.12);
  text-stroke: 1px rgba(255,255,255,0.12);
  transition: color 0.3s ease;
}

.marquee__track--full:hover span {
  color: rgba(255,255,255,0.04);
}

.marquee__track--full .dot {
  font-size: 1.5rem;
  color: var(--accent);
  -webkit-text-stroke: none;
  text-stroke: none;
}

.contact__panel {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.contact__desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact__social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  transition: all 0.3s ease;
}

.social__link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(168, 85, 247, 0.06);
  transform: translateY(-2px);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.footer__brand svg {
  width: 22px;
  height: 22px;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

@media (max-width: 600px) {
  .footer__inner { flex-direction: column; gap: 12px; }
}

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-reveal="up"] {
  transform: translateY(30px);
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Cursor glow (desktop only) --- */
@media (hover: hover) {
  .hero::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, rgba(236, 72, 153, 0.02) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    left: var(--cursor-x, 50%);
    top: var(--cursor-y, 50%);
  }

  .hero:hover::after {
    opacity: 1;
  }
}
