:root {
  --bg-color: #050505;
  --text-main: #e0e0e0;
  --text-muted: #888;
  --accent: #2D5BFF;
  --line-color: rgba(255, 255, 255, 0.08);
  --gap: 20px;
  --easing: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html.lenis {
  height: auto;
}

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

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

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

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  cursor: none;
  /* Custom cursor */
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Cursore */
.cursor {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  /* Center it initially, GSAP will handle movt */
  mix-blend-mode: difference;
  transition:
    width 0.3s var(--easing),
    height 0.3s var(--easing),
    background-color 0.3s;
}

.cursor.hovered {
  width: 50px;
  height: 50px;
  background-color: white;
  mix-blend-mode: difference;
  border-color: transparent;
}

/* Layout utilities */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section-padding {
  padding: 120px 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.text-reveal {
  overflow: hidden;
  display: block;
  line-height: 1;
  /* Ensure tight line height for masking */
}

/* For our custom JS split text */
.char {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

/* Magnetic Button Area */
.magnetic-wrap {
  display: inline-block;
  position: relative;
  touch-action: none;
}

.magnetic-area {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 1;
  border-radius: 50%;
  /* cursor: pointer; handled by js */
}

.magnetic-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  /* Let clicks pass through if needed, or handle on wrap */
}

.is-inview .text-reveal span {
  transform: translateY(0);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  z-index: 1000;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.nav-toggle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav-toggle span {
  display: block;
  transition: transform 0.4s var(--easing);
}

.nav-toggle:hover span {
  transform: translateY(-100%);
}

.nav-toggle::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  transition: transform 0.4s var(--easing);
}

.nav-toggle:hover::after {
  transform: translateY(-100%);
}

/* Fullscreen Menu */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000;
  z-index: 900;
  transform: translateY(-100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* transition removed for GSAP control */
}

.menu-links {
  text-align: center;
}

.menu-item {
  font-size: 8vw;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  color: #333;
  transition: color 0.3s;
}

.menu-item a {
  display: block;
  transform: translateY(100%);
  /* transition removed for GSAP control */
}

.menu-overlay.active .menu-item a {
  transform: translateY(0);
}

.menu-item:hover {
  color: #fff;
}

.menu-item:hover a {
  transform: skewX(-5deg);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 100px;
}

.hero-title {
  font-size: clamp(3rem, 11vw, 12rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  margin-bottom: 30px;
  z-index: 10;
}

.hero-subtitle {
  margin-top: 2rem;
  /* max-width removed here to let box decide, or kept? lets keep structure but reset color */
}

.hero-box {
  background-color: #fff;
  color: #000;
  padding: 20px 25px;
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1.4;
  max-width: 480px;
  /* Start invisible for GSAP */
  opacity: 0;
  transform: translateY(20px);
  clip-path: inset(0 100% 0 0);
  /* Initial state for swipe reveal */
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  right: 40px;
  text-align: right;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Project List (Home) */
.project-list-section {
  border-top: 1px solid var(--line-color);
}

.project-item {
  display: block;
  padding: 60px 0;
  border-bottom: 1px solid var(--line-color);
  position: relative;
  transition: padding 0.4s var(--easing);
}

.project-item:hover {
  padding-left: 30px;
  background: #0a0a0a;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  font-weight: 500;
}

.project-meta {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1px;
}

.project-hover-img {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 400px;
  height: 500px;
  object-fit: cover;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.4s var(--easing);
  border-radius: 8px;
  filter: brightness(1.2) contrast(1.1);
}

.project-item:hover .project-hover-img {
  opacity: 0.2;
  /* Subtle background reveal style or full? Let's go subtle for now or use JS to follow cursor */
  transform: translate(-50%, -50%) scale(1);
  /* Actually better handled by JS for cursor following */
}

/* Footer UI */
/* Footer UI */
footer {
  padding: 80px 0 20px;
  background: #020202;
  border-top: 1px solid var(--line-color);
  margin-top: auto;
  /* Push to bottom if flex container */
  overflow: hidden;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-col h4 {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
}

.footer-list li {
  margin-bottom: 15px;
}

.footer-list a {
  font-size: 1.1rem;
  color: var(--text-main);
  transition: color 0.3s;
  position: relative;
}

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

.brand-col p {
  font-size: 1.5rem;
  line-height: 1.4;
  color: #fff;
  max-width: 400px;
}

.footer-bottom {
  border-top: 1px solid var(--line-color);
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.footer-big-text {
  font-size: 18vw;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px #333;
  line-height: 0.75;
  user-select: none;
  margin-bottom: -10px;
  text-align: center;
}

.footer-copyright {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 20px;
  }

  .hero-title {
    font-size: 3.5rem;
    /* Slightly smaller for better fit */
  }

  /* Info Grid Stacking (About Page) */
  .info-grid {
    display: flex !important;
    /* Override inline grid if consistent, or just use grid 1col */
    flex-direction: column;
    gap: 30px;
  }

  .info-grid>div:first-child {
    margin-bottom: 20px;
  }

  .menu-item {
    font-size: 14vw;
  }

  /* Ensure menu fits on small vertical screens */
  .menu-overlay {
    overflow-y: auto;
    padding: 80px 0;
    /* Space for scroll */
  }

  .project-header {
    flex-direction: column;
    gap: 10px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-big-text {
    font-size: 20vw;
  }

  .hero-box {
    font-size: 1rem;
    padding: 15px 10px;
    max-width: 100%;
    margin-left: 0;
  }

  .footer-copyright {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Hide custom cursor on mobile */
  .cursor {
    display: none !important;
  }

  /* Restore default cursor */
  body,
  a,
  .nav-toggle {
    cursor: auto !important;
  }

  /* Marquee Tweaks for Mobile */
  .menu__item-link {
    font-size: 2.5rem;
    /* Cap size */
    padding: 30px 0;
  }

  .marquee span {
    font-size: 3rem;
  }

  .marquee__img {
    width: 120px;
    min-width: 100px;
    border-radius: 30px;
  }

  /* Fix Menu Button on Mobile */
  .nav-toggle:hover span,
  .nav-toggle:hover::after {
    transform: none !important;
  }

  .nav-toggle {
    padding: 15px;
    margin: -15px;
  }
}

/* Landscape Mobile Fix */
@media (max-height: 500px) and (orientation: landscape) {
  .menu-item {
    font-size: 3rem;
    /* Don't be huge on landscape phone */
  }

  .menu-overlay {
    justify-content: flex-start;
    padding-top: 100px;
  }
}

/* FLOWING MENU STYLES (Ported) */
.menu-wrap {
  width: 100%;
  overflow: hidden;
}

.menu {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}

.menu__item {
  flex: 1;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--line-color);
}

.menu__item:last-child {
  border-bottom: 1px solid var(--line-color);
}

.menu__item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-content: center;
  height: 100%;
  position: relative;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 4rem);
  padding: 40px 0;
  transition: color 0.3s;
  z-index: 10;
}

.menu__item-link:hover {
  color: #fff;
}

.marquee {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: #fff;
  transform: translate3d(0, 101%, 0);
  z-index: 5;
}

.marquee__inner-wrap {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.marquee__inner {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  width: fit-content;
  will-change: transform;
}

.marquee__part {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
}

.marquee span {
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: normal;
  padding: 0 1vw;
  color: #000;
}

.marquee__img {
  width: 200px;
  width: 15vw;
  min-width: 150px;
  height: 60%;
  aspect-ratio: 16/9;
  margin: 0 2vw;
  border-radius: 50px;
  background-size: cover;
  background-position: center;
}