@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Montserrat:wght@700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Hanken Grotesk', sans-serif;
  cursor: none;
  overflow-x: hidden;
}

/* ── Custom Cursor ── */
#custom-cursor {
  position: fixed;
  left: 0; top: 0;
  width: 3rem; height: 3rem;
  border: 2px solid #d8b4fe;
  border-radius: 9999px;
  mix-blend-mode: screen;
  box-shadow: 0 0 15px rgba(168,85,247,0.5);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.07s ease-out;
  will-change: transform;
}
#custom-cursor .dot {
  width: 0.375rem; height: 0.375rem;
  background: white; border-radius: 9999px;
}

/* ── Fluid Canvas Background ── */
#fluid-canvas {
  filter: blur(40px);
  transform: scale(1.05);
  object-fit: cover;
}

/* ── Grain/Gradient Background ── */
#grain-bg {
  background:
    radial-gradient(ellipse 60% 50% at 4% 12%, rgba(157,77,255,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 96% 88%, rgba(190,219,254,0.2) 0%, transparent 70%),
    #000;
}
#grain-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── Page visibility ── */
.page { display: none; }
.page.active { display: block; }

/* ── Interactive Word ── */
.interactive-word {
  display: inline;
  font-weight: 900;
  padding-bottom: 0.5rem;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-size: 100% 100%;
  transition: background-image 0.3s ease-out;
}

/* ── Animated Card Border ── */
.card-border-wrap {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.card-border-wrap::before {
  content: '';
  position: absolute;
  width: 200%; height: 200%;
  top: -50%; left: -50%;
  background: conic-gradient(
    transparent 0deg,
    rgba(13,193,253,0.5) 60deg,
    rgba(217,21,239,0.7) 120deg,
    rgba(252,92,255,0.6) 180deg,
    transparent 240deg
  );
  animation: card-spin 4s linear infinite;
}
.card-border-wrap.speed-1 { --dur: 4s; }
.card-border-wrap.speed-2 { --dur: 2.5s; }
.card-border-wrap.speed-3 { --dur: 1.8s; }
.card-border-wrap::before { animation-duration: var(--dur, 4s); }

@keyframes card-spin {
  to { transform: rotate(360deg); }
}

/* ── Header dropdown ── */
.dropdown-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.dropdown-trigger:hover .dropdown-panel,
.dropdown-trigger:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Mobile menu ── */
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }
#mobile-services-sub { display: none; }
#mobile-services-sub.open { display: flex; }

/* ── Process line ── */
#process-line-fill,
.process-line-fill { transition: width 1s ease-out; }

/* ── Reveal (initial hidden state set by GSAP, not CSS) ── */
/* Do NOT pre-hide with CSS — gsap.fromTo() sets the from state itself */

/* ── Utility: Work grid images ── */
.work-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transform: scale(1);
  transition: filter 1.2s, transform 1.2s;
}
.work-card:hover .work-img {
  filter: grayscale(0);
  transform: scale(1.03);
}
.work-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.5s;
}
.work-card:hover .work-overlay { opacity: 0.8; }
.work-info {
  position: absolute; bottom: 0; left: 0;
  padding: 2.5rem; z-index: 20; width: 100%;
  transform: translateY(8px);
  transition: transform 0.5s;
}
.work-card:hover .work-info { transform: translateY(0); }

/* ── Magnetic button reset ── */
.magnetic-btn { display: inline-flex; }

/* Contact form label animation */
.form-group { position: relative; }
.form-label {
  position: absolute;
  left: 4px; top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4b5563;
  pointer-events: none;
  transition: top 0.3s, font-size 0.3s, color 0.3s;
}
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -12px;
  font-size: 0.625rem;
  color: #d8b4fe;
}
.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 4px;
  color: white;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus { border-color: #d8b4fe; }

/* ── Services stacking card initial ── */
.service-card-inner { transform-origin: center top; }
