@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600&display=swap');

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

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0a0a0a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  cursor: none;
  -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top, 0);
}

#hero {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

canvas#topoCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .07;
}

.img-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

#bwLayer img {
  filter: grayscale(1) brightness(.45) contrast(1.15);
}

#colorLayer {
  z-index: 2;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle 0px at 50% 50%, black 70%, transparent 100%);
  mask-image: radial-gradient(circle 0px at 50% 50%, black 70%, transparent 100%);
}

#colorLayer img {
  filter: brightness(.82) contrast(1.08) saturate(1.35);
}

canvas#echoCanvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

#overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.6) 100%),
    linear-gradient(90deg, rgba(0,0,0,.4) 0%, transparent 25%, transparent 75%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}

#ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#ui a,
#ui button {
  pointer-events: auto;
}

/* ── Brand ── */
.brand {
  position: absolute;
  top: clamp(24px, 4vh, 48px);
  left: clamp(24px, 4vw, 56px);
}

.brand h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: .92;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

.brand h1 span {
  display: block;
  font-size: .4em;
  letter-spacing: 5px;
  opacity: .6;
  font-weight: 400;
  margin-top: 2px;
}

.brand .tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(.72rem, 1.1vw, .95rem);
  margin-top: 10px;
  opacity: .45;
  letter-spacing: 1.5px;
  font-weight: 400;
}

/* ── Nav ── */
.nav {
  position: absolute;
  top: clamp(28px, 4vh, 52px);
  right: clamp(24px, 4vw, 56px);
  display: flex;
  gap: clamp(18px, 2.5vw, 36px);
  align-items: center;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(.7rem, .95vw, .88rem);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .7;
  transition: opacity .25s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #00FFFF;
  transition: width .3s;
}

.nav a:hover { opacity: 1; }
.nav a:hover::after { width: 100%; }

/* ── Info ── */
.info {
  position: absolute;
  bottom: clamp(28px, 4vh, 52px);
  left: clamp(24px, 4vw, 56px);
  max-width: 360px;
}

.info .next-label {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  opacity: .35;
  margin-bottom: 8px;
  font-weight: 500;
}

.info .date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: 1px;
  line-height: 1.05;
}

.info .location {
  font-size: clamp(.7rem, .95vw, .82rem);
  opacity: .55;
  margin-top: 6px;
  line-height: 1.5;
}

.info .pace-note {
  font-size: clamp(.62rem, .85vw, .75rem);
  opacity: .35;
  margin-top: 12px;
  font-style: italic;
  letter-spacing: .5px;
}

/* ── Socials ── */
.socials {
  position: absolute;
  bottom: clamp(28px, 4vh, 52px);
  right: clamp(24px, 4vw, 56px);
  display: flex;
  gap: 18px;
  align-items: center;
}

.socials a {
  color: #fff;
  display: flex;
  opacity: .6;
  transition: opacity .25s, transform .25s;
}

.socials a:hover {
  opacity: 1;
  transform: scale(1.12);
}

.socials svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── CTA ── */
.cta {
  position: absolute;
  bottom: clamp(100px, 16vh, 190px);
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}

.cta a {
  display: inline-block;
  padding: 18px 48px;
  background: #00FFFF;
  color: #000;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 60px;
  transition: transform .3s, box-shadow .3s, background .3s;
  box-shadow: 0 4px 35px rgba(0,255,255,.35);
  white-space: nowrap;
}

.cta a:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 50px rgba(0,255,255,.55);
  background: #33ffff;
}

/* ── Cursor ── */
#cursor {
  position: fixed;
  z-index: 100;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .12s, height .12s;
}

/* ── Loading ── */
#loadScreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity .8s ease;
}

#loadScreen.done {
  opacity: 0;
  pointer-events: none;
}

#loadScreen h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid rgba(255,255,255,.1);
  border-top-color: #00FFFF;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* ── Touch hint (hidden on desktop) ── */
.touch-hint { display: none; }

/* ══════════════════════════════════════
   MOBILE
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor { display: none; }
  #bwLayer img { filter: grayscale(1) brightness(.45) contrast(1.15); }

  /* Touch hint */
  .touch-hint {
    display: flex !important;
    position: absolute;
    z-index: 15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    animation: hintFade 3s ease 1.5s forwards;
    opacity: 1;
  }

  .touch-hint-circle {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(0,255,255,.5);
    border-radius: 50%;
    animation: hintPulse 1.8s ease-in-out infinite;
  }

  .touch-hint p {
    font-size: .7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: .6;
    color: #fff;
  }

  @keyframes hintPulse {
    0%, 100% { transform: scale(1); opacity: .5; }
    50% { transform: scale(1.3); opacity: .9; box-shadow: 0 0 30px rgba(0,255,255,.3); }
  }

  @keyframes hintFade {
    to { opacity: 0; visibility: hidden; }
  }

  /* Brand — just above midpoint */
  .brand {
    top: 28%;
    left: 24px;
    right: 24px;
    transform: translateY(-50%);
  }

  .brand h1 { font-size: 2.4rem; }
  .brand h1 span { font-size: .45em; letter-spacing: 3px; }
  .brand .tagline { font-size: .75rem; margin-top: 8px; }

  /* Nav — top right, lowered for iPhone notch/dynamic island */
  .nav {
    top: 54px;
    right: 20px;
    left: auto;
    gap: 16px;
  }

  .nav a {
    font-size: .6rem;
    letter-spacing: 1.5px;
    padding: 6px 0;
  }

  /* CTA — just below midpoint */
  .cta {
    top: 56%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 340px;
    text-align: center;
  }

  .cta a {
    padding: 18px 32px;
    font-size: 1rem;
    letter-spacing: 3px;
    width: 100%;
    display: block;
  }

  /* Info — lower area */
  .info {
    bottom: 70px;
    left: 24px;
    right: 24px;
    max-width: none;
  }

  .info .date { font-size: 1.4rem; }
  .info .location { font-size: .75rem; }
  .info .pace-note { font-size: .65rem; margin-top: 8px; }

  /* Socials — bottom left */
  .socials {
    bottom: 24px;
    left: 24px;
    right: auto;
  }

  .socials svg { width: 22px; height: 22px; }
}

/* ── Small phones (iPhone SE etc) ── */
@media (max-width: 380px) {
  .brand { top: 26%; }
  .brand h1 { font-size: 2rem; }
  .nav { top: 48px; gap: 12px; }
  .nav a { font-size: .55rem; }
  .cta { top: 54%; }
  .cta a { padding: 16px 24px; font-size: .9rem; }
  .info { bottom: 60px; }
  .info .date { font-size: 1.2rem; }
}

/* ── iPhone 16/17 Pro Max tall screens ── */
@media (min-height: 800px) and (max-width: 430px) {
  .nav { top: 58px; }
  .brand { top: 26%; }
  .cta { top: 52%; }
  .info { bottom: 80px; }
}
