/* ================================================================
   CONTACT PAGE — contact.css
   ================================================================ */

body.page-contact {
  --bg: #1c1c22;
  --fg: #fff;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #1c1c22;
  cursor: none; /* UFO cursor replaces system cursor */
}

/* ── Stars canvas ─────────────────────────────────────────────── */
.stars-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* ── WRAP ─────────────────────────────────────────────────────── */
.contact-wrap {
  position: relative;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────────────────── */
/* HERO                                                            */
/* ─────────────────────────────────────────────────────────────── */
.ct-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
}

/* ── Background glow — opacity driven by proximity to email (JS sets --hero-glow) */
.ct-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    700px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(139, 92, 246, 0.55) 0%,
    rgba(249, 115, 22,  0.22) 45%,
    transparent 70%
  );
  opacity: var(--hero-glow, 0);  /* 0 far away → 1 near email */
}

.ct-hero.is-right-hover::before {
  background: radial-gradient(
    800px circle at var(--mouse-x, 78%) var(--mouse-y, 50%),
    rgba(139, 92, 246, 0.55) 0%,
    rgba(249, 115, 22,  0.22) 45%,
    transparent 65%
  );
}

/* ── LEFT — TITLES ───────────────────────────────────────────── */
.ct-titles {
  position: relative;
  z-index: 3;
  /* auto-size to widest line (TOUCH) so GET…IN space-between matches */
  flex: 0 0 auto;
  width: max-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 48px;
  overflow: visible;
  user-select: none;
}

.ct-line {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(9rem, 20vw, 32rem);
  font-weight: 900;
  line-height: 0.87;
  text-transform: uppercase;
  display: block;
  width: 100%;
  transform-origin: left center;

  /* Default: outline */
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.20);

  pointer-events: auto;
  cursor: none;
  will-change: transform, color;
  transition: -webkit-text-stroke-color 0.4s ease, color 0.4s ease;
}

/* GET / IN line — flex so GET hugs left, IN hugs right */
#ctLine0 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

/* When right side is hovered — titles glow faintly */
.ct-hero.is-right-hover .ct-line {
  color: rgba(180, 160, 255, 0.22);
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.38);
}

/* ── RIGHT — CONTACT INFO ────────────────────────────────────── */
.ct-right {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
}

.ct-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Email wrap — tractor beam anchor */
.ct-info-email-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typewriter text — floats above email, never shifts layout */
.ct-beam-text {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(74, 222, 128, 0.90);
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ct-beam-text.is-visible {
  opacity: 1;
}

/* ── TRACTOR BEAM CONE ───────────────────────────────────────── */
.ct-beam-cone {
  position: fixed;
  pointer-events: none;
  z-index: 99985;
  width: 60px;
  transform-origin: top center;
  background: linear-gradient(
    to bottom,
    rgba(74, 222, 128, 1.00)  0%,
    rgba(74, 222, 128, 0.65) 30%,
    rgba(74, 222, 128, 0.22) 65%,
    rgba(74, 222, 128, 0.00) 100%   /* full fade — no hard edge */
  );
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.7))
          drop-shadow(0 0 28px rgba(74, 222, 128, 0.35));
  /* very pointy at UFO (top 2%), wide at email (bottom 86%) */
  clip-path: polygon(49% 0%, 51% 0%, 93% 100%, 7% 100%);
  border-radius: 2px;
  opacity: 0;
  /* opacity controlled by GSAP — no CSS transition here */
}

/* Email glow when beam hits */
.ct-info-email {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 2.2rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  line-height: 1.25;
  transition: color 0.3s, text-shadow 0.3s;
  white-space: nowrap;
}
.ct-info-email:hover { color: #fff; }
.ct-info-email.is-beamed {
  color: #fff;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.7), 0 0 40px rgba(74, 222, 128, 0.3);
}

.ct-info-links {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.ct-info-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  transition: color 0.25s;
}
.ct-info-link:hover { color: rgba(255, 255, 255, 0.80); }

/* ─────────────────────────────────────────────────────────────── */
/* UFO CURSOR                                                      */
/* ─────────────────────────────────────────────────────────────── */
.ufo-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99990;
  pointer-events: none;
  will-change: transform;
  /* centered on pointer: offset by half SVG width/height in JS */
}

.ufo-svg {
  width: 80px;
  height: 40px;
  display: block;
  /* base glow kept subtle — JS amplifies via ufo-glow-halo near email */
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.30))
          drop-shadow(0 0 10px rgba(139, 92, 246, 0.15));
  animation: ufoHover 2.4s ease-in-out infinite;
}


@keyframes ufoHover {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Beam below UFO */
.ufo-beam {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 60px solid transparent;
  /* Use box-shadow trick with a div instead */
  width: 44px;
  height: 55px;
  background: linear-gradient(
    to bottom,
    rgba(139, 92, 246, 0.55) 0%,
    rgba(139, 92, 246, 0.15) 60%,
    transparent 100%
  );
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  animation: beamPulse 1.8s ease-in-out infinite;
}

@keyframes beamPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
  50%       { opacity: 1.0; transform: translateX(-50%) scaleX(1.15); }
}

/* Rim lights blink */
.ufo-light {
  animation: lightBlink 1.6s ease-in-out infinite;
}
.ufo-svg circle:nth-child(5)  { animation-delay: 0s; }
.ufo-svg circle:nth-child(6)  { animation-delay: 0.32s; }
.ufo-svg circle:nth-child(7)  { animation-delay: 0.64s; }
.ufo-svg circle:nth-child(8)  { animation-delay: 0.96s; }
.ufo-svg circle:nth-child(9)  { animation-delay: 1.28s; }

@keyframes lightBlink {
  0%, 100% { opacity: 1; }
  40%       { opacity: 0.25; }
  60%       { opacity: 0.25; }
}

/* ─────────────────────────────────────────────────────────────── */
/* FOOTER                                                          */
/* ─────────────────────────────────────────────────────────────── */
.ct-footer {
  background: #131316;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ct-footer .footer-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 56px 64px 48px 48px;
}

.ct-footer .footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.ct-footer .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-footer .footer-nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(255, 255, 255, 0.40);
  text-decoration: none;
  transition: color 0.25s;
}
.ct-footer .footer-nav-link:hover { color: #fff; }

.ct-footer .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.ct-footer .footer-location {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

.ct-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
  text-align: center;
}

.ct-footer .footer-copy {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.63rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.16);
}

/* ── Mobile UFO section (hidden on desktop) ──────────────────── */
.ct-mobile-ufo-section { display: none; }

/* ── MOBILE ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ct-titles { flex: 0 0 54%; padding-left: 32px; }
  .ct-right  { padding: 0 32px; }
  .ct-line   { font-size: clamp(7rem, 17vw, 24rem); }
}

@media (max-width: 1024px) {
  body.page-contact { cursor: auto; }

  /* Hide JS-driven cursor */
  .ufo-cursor { display: none; }

  /* ── Hero: whole group centered as unit, titles have good top gap ── */
  .ct-hero {
    flex-direction: column;
    height: 100svh;
    min-height: 100svh;
    padding: 60px 0 44px;   /* 60px = nav clearance */
    align-items: center;
    justify-content: center; /* entire group centered */
    gap: 0;
  }

  /* ── Titles: solid filled, centered, big ── */
  .ct-titles {
    flex: 0 0 auto;
    width: 94vw;           /* explicit — avoids max-content circular sizing */
    padding: 0 8px;
    align-items: center;
    margin-top: 0;
  }

  .ct-line {
    font-size: 28vw;
    color: rgba(255, 255, 255, 0.92);
    -webkit-text-stroke: 0px;
    text-align: center;
    transform-origin: center;
    width: 100%;
  }

  #ctLine0 {
    justify-content: center;
    gap: 0.18em;
  }

  /* ── Mobile UFO + downward beam — close below titles ── */
  .ct-mobile-ufo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    margin-top: 10px;
  }

  .ct-mobile-ufo-svg {
    width: 64px;
    height: 32px;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.75))
            drop-shadow(0 0 24px rgba(139, 92, 246, 0.40));
  }

  /* Beam — tall enough to visually reach email below */
  .ct-mobile-beam-cone {
    width: 54px;
    height: 180px;
    background: linear-gradient(
      to bottom,
      rgba(74, 222, 128, 0.92)  0%,
      rgba(74, 222, 128, 0.48) 35%,
      rgba(74, 222, 128, 0.12) 70%,
      rgba(74, 222, 128, 0.00) 100%
    );
    clip-path: polygon(48% 0%, 52% 0%, 88% 100%, 12% 100%);
    filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
  }

  /* ── Right / email section — sits right after beam ── */
  .ct-right {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 24px;
    justify-content: center;
    margin-top: 0;
    position: relative;
  }

  /* Soft purple halo around email — large + very diffuse, no hard edge */
  .ct-right::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
      rgba(139, 92, 246, 0.12) 0%,
      rgba(139, 92, 246, 0.05) 45%,
      transparent 72%
    );
    pointer-events: none;
    z-index: 0;
  }

  .ct-info { align-items: center; position: relative; z-index: 1; }
  .ct-info-email-wrap { align-items: center; }
  .ct-info-email { font-size: clamp(1.1rem, 5vw, 1.8rem); }

  /* Typewriter on mobile: static, immediately visible, normal flow */
  .ct-beam-text {
    position: static;
    transform: none;
    max-width: 100% !important;
    opacity: 1 !important;
    white-space: normal;
    text-align: center;
    font-size: 0.60rem;
    margin-bottom: 8px;
    overflow: visible;
  }

  /* ── Bottom glow — disabled on mobile ── */
  .ct-hero::after { display: none; }

  /* ── Tractor beam cone — disabled on mobile ── */
  .ct-beam-cone { display: none !important; }

  /* ── Footer ── */
  .ct-footer .footer-inner { padding: 44px 24px 36px; }
  .ct-footer .footer-main  { flex-direction: column; gap: 32px; }
  .ct-footer .footer-right { align-items: flex-start; }
  .ct-footer .footer-nav-link { font-size: clamp(1rem, 5vw, 1.5rem); }
}
