/* ============================================================
   new-index.css — Masha Antonova new homepage styles
   Ground truth: docs/fullpage.png (image wins over this file)
   ============================================================ */

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  background: #000;
  color: #fff;
  font-family: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Custom cursor — falls back to pointer on touch / unsupported */
  cursor: url('/images-v2/cursor-32.png') 9 2, auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

input, textarea, [contenteditable] {
  cursor: text;
}

a {
  cursor: url('/images-v2/cursor-32.png') 9 2, pointer;
}

/* === SECTION LABELS ========================================= */
.section-label {
  font-size: 11px;
  color: #666;
  text-transform: none;
  letter-spacing: 0.1em;
  font-weight: 400;
  margin-bottom: 28px;
  display: block;
}

/* === PRELOADER =============================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === HEADER ================================================== */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 0;
  position: relative;
  z-index: 10;
}

.wordmark {
  display: block;
  text-align: center;
}

.wordmark video {
  width: min(56px, 13vw);
  height: auto;
  display: block;
}

.pill-nav {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 4px;
  margin-top: 14px;
  margin-bottom: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 0.3s ease, opacity 0.4s ease;
  opacity: 0; /* revealed by JS after preloader — prevents flash */
}

.pill-nav a {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: 100px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  cursor: url('/images-v2/cursor-32.png') 9 2, pointer;
}

.pill-nav a:hover,
.pill-nav a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}

/* Fixed state — applied by IntersectionObserver when wordmark scrolls out */
.pill-nav.nav--fixed {
  position: fixed !important;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  margin: 0;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* === HERO =================================================== */
.hero {
  position: relative;
  z-index: 1;                /* below header z-index:10 */
  height: 100dvh;
  margin-top: calc(-1 * var(--header-h, 0px)); /* pull up behind header */
  overflow: hidden;
  background: #000;
}

/* Layer 1 — ASCII canvas: fixed so it never scrolls, acts as a static backdrop */
.ascii-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#ascii-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Layer 2 — edge-fade overlay: fades canvas to #000 at top and bottom */
/* Sized to hero (inset: 0) so 0%/100% = exact visible edges, no offset math */
.ascii-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    #000 0%,
    transparent 25%,
    transparent 75%,
    #000 100%
  );
}

/* Layer 3 — hero text */
.hero-text {
  position: absolute;
  z-index: 3;
  bottom: 13%;
  left: 6%;
  right: 6%;
  max-width: 960px;
}

.headline {
  font-size: clamp(38px, 5.2vw, 78px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 36px;
}

.headline-line1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22em;
  align-items: baseline;
  margin-bottom: 0.06em;
}

.headline-line2 {
  display: block;
  opacity: 0; /* animated in */
  transform: translateY(20px);
}

/* Individual word wrappers — all start invisible, animated in by GSAP */
.word {
  display: inline-block;
  opacity: 0;
  position: relative;
}

/* "Visual" — blinds cover, revealed by wiping strips */
.word--visual {
  overflow: hidden;
}

.visual-blinds {
  position: absolute;
  inset: -2px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 1;
}

.visual-blinds span {
  flex: 1;
  background: #000;
  transform-origin: right;
}

/* CTA button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  border-radius: 100px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  opacity: 0; /* animated in */
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  cursor: url('/images-v2/cursor-32.png') 9 2, pointer;
}

.cta-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.85);
  color: #000;
}

/* === CLIENTS STRIP ========================================== */
.clients {
  position: relative;
  z-index: 2;           /* covers fixed ASCII canvas as page scrolls */
  background: #000;
  padding: 72px 6%;
  overflow: hidden;
}

.marquee-track {
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
}

.marquee-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee-track:hover .marquee-inner {
  animation-play-state: paused;
}

.marquee-inner img {
  height: 56px;
  width: auto;
  opacity: 0.45;
  flex-shrink: 0;
  display: block;
}

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

/* === SELECTED WORK GRID ===================================== */
.work-grid-section {
  position: relative;
  z-index: 2;
  background: #000;
  padding: 72px 6%;
}

/*
  3+2 layout using a 6-column grid:
    Row 1: cards 1,2,3 → each span 2 of 6 cols
    Row 2: cards 4,5   → each span 2 of 6 cols, shifted 1 col to centre
*/
.work-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.work-card:nth-child(1) { grid-column: 1 / 3; }
.work-card:nth-child(2) { grid-column: 3 / 5; }
.work-card:nth-child(3) { grid-column: 5 / 7; }
.work-card:nth-child(4) { grid-column: 2 / 4; }
.work-card:nth-child(5) { grid-column: 4 / 6; }

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  opacity: 0;
  transform: translateY(32px);
  /* transition handled by GSAP ScrollTrigger */
}

.cover-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  background: #0d0d0d;
}

.cover-wrap img,
.cover-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.work-card:hover .cover-wrap img,
.work-card:hover .cover-wrap video {
  transform: scale(0.98);
}

.hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card:hover .hover-overlay {
  opacity: 1;
}

.hover-pill {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-title {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 11px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* === ABOUT SECTION ========================================== */
.about-section {
  position: relative;
  z-index: 2;
  background: #000;
  padding: 72px 6%;
}

.about-inner {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 40px;
  align-items: start;
  max-width: 860px;
}

.about-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #141414;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(30px);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.about-bio {
  opacity: 0;
  transform: translateY(30px);
}

.about-bio p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
  max-width: 580px;
}

.about-bio p strong {
  color: #fff;
  font-weight: 600;
}

.about-bio .location {
  font-size: 13px;
  color: #555;
  margin-bottom: 28px;
}


.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 36px;
  list-style: none;
  margin-top: 4px;
}

.services-list li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* === FOOTER ================================================= */
footer {
  position: relative;
  z-index: 2;
  background: #000;
  padding: 44px 6% 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-top {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 44px;
}

.footer-col {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.footer-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.footer-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.footer-value a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-value:hover,
.footer-value a:hover {
  color: #fff;
}

.footer-copy {
  font-size: clamp(52px, 8vw, 120px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.12);
  line-height: 1;
  padding-bottom: 24px;
  white-space: nowrap;
  overflow: hidden;
}

/* === SPA TRANSITION OVERLAY ================================= */
#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  background: #000;
  opacity: 0;
}

/* === RESPONSIVE ============================================= */

/* Tablet — ≤1024px */
@media (max-width: 1024px) {
  .headline {
    font-size: clamp(36px, 5.5vw, 68px);
  }
}

/* Small tablet / large mobile — ≤768px */
@media (max-width: 768px) {
  .hero-text {
    bottom: 8%;
    left: 5%;
    right: 5%;
  }

  .headline {
    font-size: clamp(30px, 8vw, 52px);
    margin-bottom: 24px;
  }

  .work-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .work-card:nth-child(1),
  .work-card:nth-child(2),
  .work-card:nth-child(3),
  .work-card:nth-child(4),
  .work-card:nth-child(5) {
    grid-column: auto;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-avatar {
    width: 110px;
    height: 110px;
  }

  .services-list {
    grid-template-columns: 1fr;
  }

  .pill-nav a {
    padding: 7px 14px;
    font-size: 12px;
  }

  .marquee-inner img {
    height: 22px;
  }

  .marquee-inner {
    gap: 40px;
  }

  footer {
    padding-top: 32px;
  }

  .footer-top {
    gap: 32px;
  }
}

/* Mobile — ≤480px */
@media (max-width: 480px) {
  .work-cards-grid {
    grid-template-columns: 1fr;
  }

  .headline-line1 {
    flex-wrap: wrap;
    gap: 0.18em;
  }

  .cta-btn {
    padding: 11px 22px;
    font-size: 13px;
  }

  .clients,
  .work-grid-section,
  .about-section {
    padding-left: 5%;
    padding-right: 5%;
  }

  footer {
    padding-left: 5%;
    padding-right: 5%;
  }

  .footer-top {
    flex-direction: column;
    gap: 20px;
  }
}
