:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8c8c8c;
  --hero-w: 62vw;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg); }

.logo {
  position: fixed;
  top: 64px;
  left: 68px;
  z-index: 2;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Hero: WebGL canvas holding the text + glass cube */
.hero {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--hero-w);
  height: 100vh;
  height: 100svh;
}

#scene, .headline {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.headline { opacity: 0; }

/* Visible only if WebGL is unavailable; otherwise kept for screen readers */
.hero-fallback {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.no-webgl .hero-fallback {
  position: absolute;
  inset: 0;
  width: auto; height: auto;
  clip: auto;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 7.4vw, 120px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.no-webgl #scene { display: none; }

.copy {
  position: fixed;
  left: 61.8vw;
  top: 60vh;
  width: min(440px, 32vw);
  z-index: 2;
}

.copy p {
  font-size: 19px;
  line-height: 1.47;
  letter-spacing: -0.035em;
}

.copy .contact {
  margin-top: 46px;
  font-size: 14px;
  color: var(--muted);
}

/* Fade-in */
.logo, .copy {
  animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both;
}
.copy { animation-delay: .35s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Tablet / phone: stack into one column */
@media (max-width: 820px) {
  body { overflow: auto; }

  .logo {
    position: absolute;
    top: 96px;
    left: 24px;
    font-size: 15px;
  }

  main {
    display: flex;
    flex-direction: column;
    padding-top: 160px;
    min-height: 100svh;
  }

  .hero {
    position: relative;
    width: 100%;
    height: 250px;
  }

  .copy {
    position: static;
    width: auto;
    padding: 40px 24px 48px;
  }

  .copy p { font-size: 17px; letter-spacing: -0.03em; }
  .copy .contact { margin-top: 18px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo, .copy { animation: none; }
}

/* ---------------- Custom cursors (cursor.js) ---------------- */
.custom-cursor, .custom-cursor * { cursor: none !important; }

.cursor-root > * {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity .25s;
}
.cursor-root > .c-canvas { width: 100vw; height: 100vh; opacity: 1; transition: none; }

/* light dot */
.c-dot {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
}
.c-dot.lit { box-shadow: 0 0 6px 2px rgba(255,255,255,.55), 0 0 18px 6px rgba(190,210,255,.18); }

/* soft light pool that follows the cursor when "+ Lights the cube" is on */
.c-glow {
  width: 360px; height: 360px; margin: -180px 0 0 -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220,230,255,.075) 0%, rgba(220,230,255,.025) 35%, transparent 70%);
  mix-blend-mode: screen;
  z-index: 1;
}

/* glass lens */
.c-lens {
  width: 64px; height: 64px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(0.6px) brightness(1.15) saturate(1.3);
  backdrop-filter: blur(0.6px) brightness(1.15) saturate(1.3);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 3px 4px 6px -2px rgba(255,255,255,.45),
    inset -4px -5px 9px -3px rgba(120,160,255,.35),
    0 6px 18px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.c-lens.refracts { backdrop-filter: url(#c-lens-filter) brightness(1.08); }
.c-lens::after {               /* thin prismatic rim */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: conic-gradient(from 200deg, #ff5f6d, #ffc371, #a8ff78, #4facfe, #b06ab3, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
.c-label {
  font: 500 9px/1 Manrope, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  transition: opacity .2s;
  opacity: 0;
}

/* inverting ring */
.c-invert {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
}
.c-invert-rim {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%;
  padding: 1.5px;
  background: conic-gradient(#ff5f6d, #ffc371, #a8ff78, #4facfe, #b06ab3, #ff5f6d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
