* {
  box-sizing: border-box;
}

:root {
  --bg: #05070d;
  --text: #f5f7ff;
  --muted: #aab3c5;
  --blue: #00b7ff;
  --yellow: #ffd447;
  --panel: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.18);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 183, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 25%, rgba(255, 212, 71, 0.14), transparent 30%),
    linear-gradient(135deg, #05070d, #0b1020 50%, #05070d);
  overflow-x: hidden;
}

#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,183,255,0.22), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 200ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,183,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,212,71,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  animation: gridDrift 18s linear infinite;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 92px 92px;
  }
}

.landing-page {
  position: relative;
  z-index: 2;
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 70px 0 50px;
}

.hero {
  text-align: center;
  margin-bottom: 48px;
}

.local-badge {
  display: inline-block;
  margin-bottom: 22px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 212, 71, 0.45);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 212, 71, 0.08);
  box-shadow: 0 0 24px rgba(255, 212, 71, 0.15);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1 {
  margin: 10px 0;
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow:
    0 0 16px rgba(0, 183, 255, 0.8),
    0 0 40px rgba(0, 183, 255, 0.35);
}

.build-line {
  margin: 18px 0 12px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
}

#rotatingText {
  color: var(--blue);
  text-shadow: 0 0 18px rgba(0, 183, 255, 0.8);
  transition: opacity 250ms ease, transform 250ms ease;
}

#rotatingText.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.tagline {
  max-width: 780px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 30px;
  perspective: 1200px;
}

.portal-card {
  position: relative;
  min-height: 360px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 28px;
  color: var(--text);
  background: var(--panel);
  backdrop-filter: blur(18px);
  cursor: pointer;
  text-align: left;
  transform-style: preserve-3d;
  transition:
    transform 250ms ease,
    box-shadow 250ms ease,
    border-color 250ms ease;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  opacity: 0.55;
  z-index: -1;
  filter: blur(18px);
  transition: opacity 250ms ease;
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.12),
    transparent
  );
  transform: translateX(-120%);
  transition: transform 500ms ease;
}

.portal-card:hover::after {
  transform: translateX(120%);
}

.portal-card.residential::before {
  background: linear-gradient(135deg, rgba(0,183,255,0.9), transparent, rgba(0,183,255,0.35));
}

.portal-card.commercial::before {
  background: linear-gradient(135deg, rgba(255,212,71,0.9), transparent, rgba(0,183,255,0.35));
}

.portal-card:hover {
  transform: translateY(-12px) rotateX(7deg) rotateY(var(--tilt, 0deg)) scale(1.02);
}

.portal-card:hover::before {
  opacity: 1;
}

.residential:hover {
  box-shadow:
    0 0 30px rgba(0, 183, 255, 0.45),
    0 24px 80px rgba(0, 0, 0, 0.45);
  border-color: rgba(0, 183, 255, 0.8);
}

.commercial:hover {
  box-shadow:
    0 0 30px rgba(255, 212, 71, 0.38),
    0 24px 80px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 212, 71, 0.8);
}

.card-label {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card-title {
  display: block;
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
}

.card-text {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 34px;
}

.card-action {
  position: absolute;
  left: 34px;
  bottom: 34px;
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.residential .card-action {
  color: var(--blue);
}

.commercial .card-action {
  color: var(--yellow);
}

.about {
  margin: 54px auto 0;
  padding: 30px;
  max-width: 900px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.about h2 {
  margin-top: 0;
  font-size: 2rem;
}

.about p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(circle, rgba(0,183,255,0.95), #05070d 65%);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.page-transition.active {
  animation: portalExit 650ms ease forwards;
}

@keyframes portalExit {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@media (max-width: 760px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: 320px;
  }

  .cursor-glow {
    display: none;
  }
}
