/* GIANTS — experimental creative agency */

:root {
  --giants-orange: #ff4824;
  --giants-black: #101010;
  --giants-white: #ffffff;
  --giants-dim: #1a1a1a;
  --giants-muted: #6a6a6a;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body {
  background: var(--giants-black);
  color: var(--giants-white);
  font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  cursor: none;
}

/* Custom cursor */
.gts-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--giants-orange);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), background 0.25s;
  will-change: transform;
}
.gts-cursor.is-hover {
  width: 56px; height: 56px;
  background: var(--giants-orange);
  mix-blend-mode: normal;
}
.gts-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo), opacity 0.3s;
  will-change: transform;
}
.gts-cursor-ring.is-hover { opacity: 0; }

@media (pointer: coarse) {
  body { cursor: auto; }
  .gts-cursor, .gts-cursor-ring { display: none; }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 32px;
  color: var(--giants-black);
  transition: background 0.35s var(--ease-out-expo), backdrop-filter 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo), padding 0.35s var(--ease-out-expo), color 0.35s var(--ease-out-expo);
  border-bottom: 1px solid transparent;
}
.nav::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(237, 237, 237, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-expo);
  pointer-events: none;
  z-index: -1;
}
.nav.is-scrolled {
  padding: 14px 32px;
  border-bottom-color: rgba(16,16,16,0.06);
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-on-dark {
  color: var(--giants-white);
}
.nav.is-on-dark::before {
  background: rgba(10, 10, 10, 0.72);
}
.nav.is-on-dark.is-scrolled {
  border-bottom-color: rgba(255,255,255,0.08);
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
}
.nav-links {
  display: flex; gap: 28px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-links a {
  color: inherit; text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: opacity 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease-out-expo);
}
.nav-links a:hover::after { width: 100%; }

/* Progress dot indicator */
.progress-dots {
  position: fixed;
  right: 28px; top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex; flex-direction: column; gap: 14px;
  mix-blend-mode: difference;
}
.progress-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: none;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  padding: 0;
  position: relative;
}
.progress-dot.active {
  background: white;
  width: 6px; height: 24px;
  border-radius: 3px;
}
.progress-dot .label {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: white;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s;
}
.progress-dot:hover .label {
  opacity: 1;
  transform: translate(-4px, -50%);
}

/* Section shell */
.section {
  min-height: 100vh;
  position: relative;
  padding: 120px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.8s var(--ease-in-out), color 0.8s var(--ease-in-out);
}

.sec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.55;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-label::before {
  content: '';
  width: 28px; height: 1px;
  background: currentColor;
  display: inline-block;
}

/* Magnetic / morphing button */
.btn-giants {
  --btn-bg: var(--giants-orange);
  --btn-fg: var(--giants-white);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 22px 34px 22px 34px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 999px;
  cursor: none;
  overflow: hidden;
  transition: color 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.btn-giants::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--giants-black);
  border-radius: 999px;
  transform: translateY(110%);
  transition: transform 0.5s var(--ease-out-expo);
  z-index: 0;
}
.btn-giants:hover::before { transform: translateY(0); }
.btn-giants:hover { color: white; }
.btn-giants > * { position: relative; z-index: 1; }
.btn-giants .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-out-expo);
}
.btn-giants:hover .arrow { transform: translateX(4px) rotate(-45deg); }

/* Ghost button variant */
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  border: 1px solid currentColor;
}
.btn-ghost::before { background: currentColor; }
.btn-ghost:hover { color: var(--giants-black); }

/* Hero animated orb */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}
.marquee-track {
  display: inline-flex;
  gap: 60px;
  padding-right: 60px;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Kerning display text */
.display-xl {
  font-size: clamp(72px, 13vw, 220px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.88;
}
.display-lg {
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.display-md {
  font-size: clamp(36px, 5vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.reveal-word {
  display: inline-block;
  clip-path: inset(-10% -20% -10% -5%);
  vertical-align: bottom;
  padding-right: 0.08em;
}
.reveal-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out-expo);
}
.reveal-word.in-view > span { transform: translateY(0); }

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Project card — Originals */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #181818;
  transition: transform 0.6s var(--ease-out-expo);
}
.project-card:hover { transform: translateY(-6px); }
.project-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: #000;
}
.project-media > * {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo);
}
.project-card:hover .project-media > * {
  transform: scale(1.05);
}
.project-meta {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

/* Iridescent background for belief section */
.iridescent-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 20% 30%, rgba(255,72,36,0.35), transparent 60%),
    radial-gradient(900px 700px at 80% 60%, rgba(92, 47, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at 50% 90%, rgba(36, 220, 255, 0.25), transparent 60%);
  pointer-events: none;
}

/* Client marquee logo */
.client-logo {
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  transition: color 0.3s;
}
.client-logo:hover { color: var(--giants-orange); }

/* Tweaks panel */
.tweaks {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 10001;
  background: #0a0a0a;
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  width: 260px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.tweaks h4 {
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.6;
  font-family: inherit;
  font-weight: 500;
}
.tweaks label { display: block; margin-bottom: 12px; }
.tweaks label span { display: block; margin-bottom: 6px; opacity: 0.8; }
.tweaks input[type=range] { width: 100%; }
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
}
.tweaks .swatch.active { border-color: white; transform: scale(1.15); }

/* Pill tag */
.pill {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Placeholder video shimmer */
.placeholder-video {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.placeholder-video::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,72,36,0.10) 0 2px,
      transparent 2px 22px);
  animation: stripe-move 6s linear infinite;
}
@keyframes stripe-move {
  from { background-position: 0 0; }
  to   { background-position: 60px 60px; }
}
.placeholder-video .play-btn {
  position: relative; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--giants-orange);
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: transform 0.4s var(--ease-out-expo);
}
.placeholder-video:hover .play-btn { transform: scale(1.08); }
.placeholder-video .placeholder-caption {
  position: absolute;
  bottom: 20px; left: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
  z-index: 2;
}

/* Placeholder image */
.placeholder-img {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.placeholder-img::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04) 0 2px,
      transparent 2px 18px);
}
.placeholder-img .placeholder-caption {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.55);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
}

/* Distorted text */
.distort-text {
  display: inline-block;
  transition: transform 0.4s var(--ease-out-expo), letter-spacing 0.4s var(--ease-out-expo);
}
.distort-text:hover {
  letter-spacing: -0.08em;
}

/* Code section — terminal look */
.code-window {
  background: #000;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.code-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a2a; }
.code-body { padding: 22px; color: #ccc; line-height: 1.7; }
.code-body .c-comment { color: #555; }
.code-body .c-key { color: var(--giants-orange); }
.code-body .c-str { color: #d4d4d4; }

/* Scroll reveal split lines */
.split-line {
  display: block;
  overflow: hidden;
}
.split-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}
.split-line.in-view > span { transform: translateY(0); }

/* Big orange block */
.section-orange {
  background: var(--giants-orange);
  color: var(--giants-black);
}
.section-white {
  background: var(--giants-white);
  color: var(--giants-black);
}
.section-black { background: var(--giants-black); color: var(--giants-white); }

/* CTA ticker */
.ticker-row {
  font-size: clamp(48px, 9vw, 140px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
  display: flex;
  gap: 40px;
  animation: marquee 30s linear infinite;
}
.ticker-row .dot {
  display: inline-block;
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  background: currentColor;
  align-self: center;
}

/* Reveal ascii */
.ascii-field {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1;
  white-space: pre;
  opacity: 0.3;
  letter-spacing: 0;
  color: currentColor;
  user-select: none;
}

/* Hero logo */
.hero-logo-img {
  width: clamp(280px, 60vw, 900px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 40px rgba(255,72,36,0.4));
}

footer.section-footer {
  background: var(--giants-black);
  color: var(--giants-white);
  padding: 120px 48px 40px;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--giants-orange); }

/* Orange-section (contact) links — make them read as clickable on orange bg */
.section-orange a {
  color: var(--giants-black);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: opacity 0.2s var(--ease-out-expo);
}
.section-orange a:hover { opacity: 0.65; }

/* Mobile nav: hamburger + drawer */
.nav-burger {
  display: none;
  width: 36px; height: 36px; padding: 0;
  border: none; background: transparent;
  cursor: pointer; position: relative;
  flex-direction: column; justify-content: center;
  gap: 5px; align-items: flex-end;
}
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: currentColor; transition: transform .3s var(--ease-out-expo), opacity .2s;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 24px; }

.nav-drawer {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(16,16,16,0.6); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out-expo);
}
.nav-drawer.is-open { opacity: 1; pointer-events: auto; }
.nav-drawer-inner {
  position: absolute; top: 0; right: 0;
  width: min(360px, 85vw); height: 100%;
  background: var(--giants-white); color: var(--giants-black);
  padding: 96px 32px 32px;
  display: flex; flex-direction: column; gap: 24px;
  transform: translateX(100%);
  transition: transform .4s var(--ease-out-expo);
}
.nav-drawer.is-open .nav-drawer-inner { transform: translateX(0); }
.nav-drawer-inner a {
  font-family: inherit; font-size: 28px; font-weight: 600;
  color: inherit; text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-drawer-lang {
  margin-top: auto; padding-top: 24px;
  border-top: 1px solid rgba(16,16,16,0.1);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.15em;
}
.nav-drawer-lang > span { border-left: none !important; padding-left: 0 !important; margin-left: 0 !important; }

@media (max-width: 720px) {
  .nav-burger { display: inline-flex; color: currentColor; }
}
/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 720px) {
  .section { padding: 72px 20px; }
  .nav { padding: 14px 20px; }
  .nav.is-scrolled { padding: 10px 20px; }
  .nav-logo { font-size: 18px; }
  .nav-links { display: none; }
  .progress-dots { display: none; }
  .tweaks { width: calc(100% - 32px); right: 16px; bottom: 16px; }

  /* Typography — smaller on mobile, tighter line-height */
  .display-xl { font-size: clamp(48px, 13vw, 84px); }
  .display-lg { font-size: clamp(38px, 10vw, 68px); }
  .display-md { font-size: clamp(30px, 8vw, 52px); }

  /* Hero */
  .hero-logo-img { width: clamp(220px, 80vw, 380px); }

  /* Buttons — no wrap, compact */
  .btn-giants {
    font-size: 13px !important;
    padding: 18px 26px !important;
    white-space: nowrap;
    max-width: 100%;
  }
  .btn-giants span:not(.arrow) {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  /* Force any 2-col grid on mobile to stack (targets the `grid-template-columns: minmax(0,Xfr) minmax(0,Yfr)` layouts used throughout) */
  [style*="gridTemplateColumns"],
  [style*="grid-template-columns"] {
    /* can't override inline styles with plain CSS; handled per-section below */
  }

  section .fade-up.orig-grid,
  section .code-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Mobile: always put audiovisual/media BEFORE text in Originals, ignore desktop's alternating reverse */
  section .fade-up.orig-grid > div:first-child { order: 1 !important; }
  section .fade-up.orig-grid > div:last-child  { order: 2 !important; }

  /* Hero meta rows — wrap into two lines if needed, smaller text */
  .hero-meta-row { font-size: 10px !important; }

  /* Mocilab stories — stack vertically */
  .mocilab-stories {
    grid-template-columns: 1fr !important;
  }
  .mocilab-body {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Footer padding tighter */
  footer.section-footer { padding: 72px 20px 32px; }

  /* Originals project rows — reduce horizontal padding */
  .project-card { padding: 0 !important; }

  /* Code window — scale down */
  .code-window { font-size: 12px; }

  /* Stats grid (Clients) — 2 columns on phone, 1 on tiny */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 24px !important; }

  /* Pills / sec labels smaller */
  .pill { font-size: 10px !important; padding: 6px 10px !important; }
  .sec-label { font-size: 10px !important; }

  /* Hero absolute corner meta — keep single line */
  .hero-meta-corner { font-size: 9px !important; letter-spacing: 0.08em !important; }

  /* Contact grid to 1 col */
  .contact-grid { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Tighter body copy */
  body { font-size: 15px; }
}

@media (max-width: 420px) {
  .display-xl { font-size: 44px; }
  .display-lg { font-size: 34px; }
  .display-md { font-size: 28px; }

  .btn-giants {
    font-size: 12px !important;
    padding: 16px 22px !important;
  }

  .stats-grid { grid-template-columns: 1fr !important; }
}
