/* ============================================================
   PIXELINY — design tokens
   Extracted 1:1 from https://sbouadi.com/ (black & white, Satoshi body).
   Only change from the source: display/headline font is Pixelify Sans
   instead of Clash Display. Do not hand-tune values here without
   re-checking the source — these are meant to stay a faithful copy.
============================================================ */

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Palette — near-black → charcoal, off-white ink ---------- */
  --bg-0: #060607;
  --bg-1: #0d0d0f;
  --bg-2: #16161a;
  --ink: #f4f3ef;
  --ink-dim: #b6b5b0;
  --muted: #7d7c79;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);

  /* ---------- Type families ---------- */
  --font-display: "Pixelify Sans", "Arial Black", sans-serif;
  --font-body: "Satoshi", system-ui, sans-serif;

  /* ---------- Layout ---------- */
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- Type scale (fluid, matches source clamps) ---------- */
  --fs-hero: clamp(2.3rem, 3.9vw, 4.6rem);
  --fs-h2: clamp(2rem, 5vw, 4rem);
  --fs-lede: clamp(1.05rem, 1.6vw, 1.35rem);
  --fs-stat: clamp(2.4rem, 4vw, 3.4rem);
  --fs-card-h3: clamp(1.3rem, 2vw, 1.75rem);
  --fs-contact-title: clamp(2.6rem, 8vw, 7rem);

  /* ---------- Radii ---------- */
  --radius-pill: 100px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  /* Buttons stay square — rectangular, pixel-style, no pill shape. */
  --radius-btn: 2px;

  /* ---------- Shadows ---------- */
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle pixel-dot backdrop — decorative only, stays low-opacity so it never
   fights foreground contrast. Fixed + behind everything (main/nav sit above). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Crect x='0' y='0' width='3' height='3' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 28px 28px;
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
::selection {
  background: var(--ink);
  color: var(--bg-0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sr-only:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  z-index: 1000;
  background: var(--ink);
  color: var(--bg-0);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ============================================================
   LAYOUT PRIMITIVES
============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(52px, 8vh, 108px);
}

.grid-2 {
  display: grid;
  grid-template-columns: 0.32fr 0.68fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

/* ---------- Shared type ---------- */
.eyebrow,
.kicker {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.index {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 56ch;
  margin-top: 1.4rem;
}
.lede strong {
  color: var(--ink);
  font-weight: 700;
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head .index {
  display: block;
  margin-bottom: 1.2rem;
}
.section-head__sub {
  margin-top: 1.1rem;
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 48ch;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  --btn-pad-y: 0.95em;
  --btn-pad-x: 1.6em;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    transform 0.4s var(--ease),
    background 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
}

.btn--solid {
  background: var(--ink);
  color: var(--bg-0);
  border-color: var(--ink);
}
.btn--solid:hover {
  background: #fff;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--text {
  border-color: transparent;
  padding-inline: 0.4em;
  background: none;
}
.btn--text:hover {
  color: #fff;
}

.btn--lg {
  --btn-pad-y: 1.15em;
  --btn-pad-x: 2.2em;
  font-size: 1.05rem;
}

/* ============================================================
   NAV
============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 26px) var(--pad);
  transition:
    background 0.5s var(--ease),
    backdrop-filter 0.5s var(--ease),
    border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 8, 9, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav__logo img {
  width: 34px;
  height: auto;
}

.nav__links {
  display: flex;
  gap: clamp(20px, 2.6vw, 40px);
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.4s var(--ease);
}
.nav__links a:hover {
  color: var(--ink);
}
.nav__links a:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 0.7em 1.3em;
  font-size: 0.85rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 8px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 120;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 26px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.4s var(--ease),
    opacity 0.3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  background: rgba(6, 6, 7, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--ease),
    visibility 0.45s var(--ease);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.mobile-menu__links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 3rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}
.mobile-menu.is-open .mobile-menu__links a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu.is-open .mobile-menu__links a:nth-child(1) {
  transition-delay: 0.06s;
}
.mobile-menu.is-open .mobile-menu__links a:nth-child(2) {
  transition-delay: 0.12s;
}
.mobile-menu.is-open .mobile-menu__links a:nth-child(3) {
  transition-delay: 0.18s;
}
.mobile-menu.is-open .mobile-menu__links a:nth-child(4) {
  transition-delay: 0.24s;
}
.mobile-menu__cta {
  margin-top: 0.6rem;
}

/* ============================================================
   STAT ROW (numbers + label, used under hero/about copy)
============================================================ */
.stat-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 3rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.stat-row li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat-row strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-stat);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-row span {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   CARDS (numbered service list pattern)
============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card {
  background: rgba(13, 13, 15, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(28px, 3.4vw, 48px);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  transition: background 0.5s var(--ease);
}
.card:hover {
  background: rgba(28, 28, 32, 0.75);
}
.card__no {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-card-h3);
  letter-spacing: -0.01em;
  margin-top: auto;
  padding-top: 2.4rem;
}
.card p {
  margin-top: 0.9rem;
  color: var(--ink-dim);
  font-size: 0.98rem;
  max-width: 38ch;
}

/* ============================================================
   BRAND LOGO MARQUEE
============================================================ */
.brands {
  padding-block: clamp(32px, 6vh, 64px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.brands__label {
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(22px, 3vw, 34px);
}
.marquee {
  position: relative;
}
.marquee__viewport {
  overflow: hidden;
  touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee__viewport.is-draggable {
  cursor: grab;
}
.marquee__viewport.is-dragging {
  cursor: grabbing;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: max-content;
  will-change: transform;
}
.brand-logo {
  flex: 0 0 auto;
  width: clamp(118px, 13vw, 158px);
  display: grid;
  place-items: center;
  opacity: 0.68;
  user-select: none;
  transition: opacity 0.4s var(--ease);
}
.brand-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
}
.brand-logo:hover {
  opacity: 1;
}

/* ============================================================
   WORK / PORTFOLIO GRID
============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.4vw, 22px);
}
.work-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #000;
  cursor: pointer;
}
.work-card.is-hidden {
  display: none;
}
.work-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition:
    transform 0.7s var(--ease),
    filter 0.7s var(--ease);
}
.work-card:hover .work-card__media {
  transform: scale(1.07);
}
.work-badge {
  position: absolute;
  top: 11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: rgba(10, 10, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.work-badge--cat {
  left: 11px;
}
.work-badge--type {
  right: 11px;
}
.work-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    transform 0.4s var(--ease),
    background 0.4s var(--ease);
  pointer-events: none;
}
.work-card:hover .work-card__play {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.28);
}
.work-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 52px);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(4, 4, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lightbox.is-open {
  display: flex;
}
.lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__inner video {
  max-width: min(92vw, 540px);
  max-height: 88vh;
  border-radius: 12px;
  display: block;
  background: #000;
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 22, 0.7);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease);
}
.lightbox__close:hover {
  background: rgba(45, 45, 50, 0.9);
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  position: relative;
  z-index: 2;
  background: var(--bg-0);
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 88px) 32px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line-soft);
}
.footer__logo img {
  width: 120px;
  height: auto;
}
.footer__nav {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: 0.9rem;
  color: var(--ink-dim);
  transition: color 0.3s var(--ease);
}
.footer__nav a:hover {
  color: var(--ink);
}
.footer__social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  color: var(--ink-dim);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.social-icon svg {
  width: 17px;
  height: 17px;
}
.social-icon:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
}
.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================================================
   SCROLL-REVEAL (fade + rise, toggled by JS via IntersectionObserver)
============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  will-change: transform, opacity;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* staggered children: set --d (delay index) per child via JS or inline style */
[data-reveal-group] > [data-reveal] {
  transition-delay: calc(var(--d, 0) * 90ms);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .nav__links,
  .nav__right {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
