/* YP Design System v1.0 - Campus Hub */

:root{
  /* Primary Brand */
  --wolf-cyan-500: #00F6E0;
  --wolf-cyan-600: #00DCCE;
  --wolf-cyan-700: #00BFB0;
  --wolf-cyan-800: #009F8E;

  /* Accent */
  --spotlight-gold-500: #FBBF24;
  --spotlight-gold-400: #FCD34D;

  /* Neutrals */
  --graphite-900: #0B0D17;
  --midnight-800: #121821;
  --slate-700: #1E2532;
  --slate-600: #2D3748;
  --steel-500: #6B7280;
  --steel-400: #9CA3AF;
  --steel-300: #C2C8D0;
  --white: #FFFFFF;

  /* Semantic */
  --bg-primary: var(--graphite-900);
  --bg-card: var(--midnight-800);
  --text-primary: var(--white);
  --text-secondary: var(--steel-300);
  --text-muted: var(--steel-400);

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 30px rgba(0, 246, 224, 0.35);

  /* Motion */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-moderate: 300ms;

  /* Typography */
  --font-display: "Bebas Neue", Impact, "Arial Black", sans-serif;
  --font-body: "Geist Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   BACKGROUND - z=0
   ============================================ */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 1400px 800px at 50% 30%, rgba(0, 246, 224, 0.06), transparent),
    radial-gradient(ellipse 1000px 600px at 70% 75%, rgba(251, 191, 36, 0.04), transparent),
    linear-gradient(180deg, rgba(11, 13, 23, 0.15) 0%, rgba(11, 13, 23, 0.75) 100%),
    url("/assets/campus2560.webp");
  background-size: cover;
  background-position: center 20%;
  transform: translateZ(0);
  will-change: transform;
}

@media (max-width: 1440px){
  .bg{
    background-image:
      radial-gradient(ellipse 1400px 800px at 50% 30%, rgba(0, 246, 224, 0.06), transparent),
      radial-gradient(ellipse 1000px 600px at 70% 75%, rgba(251, 191, 36, 0.04), transparent),
      linear-gradient(180deg, rgba(11, 13, 23, 0.15) 0%, rgba(11, 13, 23, 0.75) 100%),
      url("/assets/campus1440.webp");
  }
}

/* ============================================
   AMBIENT FOG - z=1
   ============================================ */
.ambient{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.cloud-layer{
  position: absolute;
  inset: -10% -20%;
  width: 140%;
  height: 120%;
}

.cloud{
  position: absolute;
  border-radius: var(--radius-full);
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.12), transparent 70%);
  filter: blur(40px);
  opacity: 0.6;
  animation: drift 120s linear infinite;
}

.cloud-layer.far .cloud{
  filter: blur(60px);
  opacity: 0.4;
}
.cloud-layer.near .cloud{
  filter: blur(30px);
  opacity: 0.5;
}

.c1{ top: 5%;  left: -20%; width: 800px; height: 400px; animation-duration: 140s; }
.c2{ top: 25%; left: -30%; width: 600px; height: 300px; animation-duration: 120s; }
.c3{ top: 50%; left: -25%; width: 700px; height: 350px; animation-duration: 160s; }
.c4{ top: 15%; left: -35%; width: 650px; height: 320px; animation-duration: 100s; }
.c5{ top: 60%; left: -30%; width: 750px; height: 380px; animation-duration: 110s; }

@keyframes drift{
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 100%)); }
}

/* ============================================
   BEACONS - z=2
   ============================================ */
.beacons{
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.beacon{
  pointer-events: auto;
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--wolf-cyan-500);
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: var(--shadow-glow-cyan);
  animation: pulse 2.4s ease-in-out infinite;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.beacon::before{
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(0, 246, 224, 0.25), transparent 70%);
}

.beacon::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.8);
}

@keyframes pulse{
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 246, 224, 0.4), var(--shadow-glow-cyan);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(0, 246, 224, 0), var(--shadow-glow-cyan);
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.b-court   { left: 28%; top: 38%; }
.b-library { left: 50%; top: 32%; }
.b-gym     { left: 72%; top: 38%; }

body.cards-open .beacon{
  opacity: 0.4;
  animation-duration: 3.5s;
}

/* ============================================
   HEADER - z=10
   ============================================ */
.topbar{
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  z-index: 10;
}

.brand{
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.85), rgba(18, 24, 33, 0.65));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

.logo{
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.title{
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subtitle{
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.top-actions{ display: flex; gap: var(--space-2); }

.ghost{
  appearance: none;
  height: 44px;
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.85), rgba(18, 24, 33, 0.65));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.ghost:hover{
  border-color: var(--wolf-cyan-700);
  box-shadow: 0 0 0 2px rgba(0, 246, 224, 0.15);
}

/* ============================================
   MAIN LAYOUT - z=5
   ============================================ */
.wrap{
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 100px var(--space-4) var(--space-6);
  z-index: 5;
}

.hero{
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero-copy{
  padding: var(--space-4);
  max-width: 580px;
}

.hero-copy h1{
  margin: 0;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(180deg, var(--white) 0%, var(--steel-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy p{
  margin: var(--space-3) 0 0;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   CARDS - Room Selection
   ============================================ */
.cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  transition: transform var(--duration-moderate) var(--ease-out),
              opacity var(--duration-moderate) var(--ease-out);
}

.cards[data-open="false"]{
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
}

.card{
  text-decoration: none;
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(30, 37, 50, 0.9), rgba(18, 24, 33, 0.95));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default);
  position: relative;
}

/* Top edge glow */
.card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 246, 224, 0.3),
    transparent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-default);
}

.card:hover::before,
.card:focus-visible::before{
  opacity: 1;
}

.card:hover,
.card:focus-visible{
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0, 246, 224, 0.35);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow-cyan);
  outline: none;
}

.thumb{
  height: 120px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.thumb::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 13, 23, 0.8) 100%);
}

.card-body{
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card-title{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card-desc{
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pill{
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 600;
  color: var(--graphite-900);
  background: var(--wolf-cyan-500);
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(0, 246, 224, 0.3);
  transition: transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) var(--ease-default);
}

.card:hover .pill{
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 246, 224, 0.5);
}

/* ============================================
   FINEPRINT
   ============================================ */
.fineprint{
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: 13px;
  padding: var(--space-2) var(--space-4) 0;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--wolf-cyan-500);
  box-shadow: 0 0 16px rgba(0, 246, 224, 0.5);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse{
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */
@media (max-width: 900px){
  body{ overflow: auto; }

  .wrap{
    align-items: stretch;
    padding-top: 88px;
  }

  .cards{
    grid-template-columns: 1fr;
  }

  .card{ min-height: auto; }

  .hero-copy h1{ font-size: 40px; }

  .beacons{ display: none; }
}

/* ============================================
   RESPONSIVE - Mobile Premium
   ============================================ */
@media (max-width: 520px){
  .hero-copy h1{
    font-size: 36px;
    line-height: 1;
  }

  .hero-copy p{
    font-size: 14px;
    max-width: 280px;
  }

  .cards{
    gap: var(--space-4);
  }

  .card{
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }

  .thumb{ height: 140px; }

  /* Room-specific gradients */
  .card[data-card="court"]{
    background: linear-gradient(180deg, rgba(0, 246, 224, 0.08), rgba(18, 24, 33, 0.95));
  }
  .card[data-card="library"]{
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(18, 24, 33, 0.95));
  }
  .card[data-card="gym"]{
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(18, 24, 33, 0.95));
  }

  .pill{
    padding: var(--space-2) var(--space-3);
  }

  .topbar{
    top: var(--space-3);
    left: var(--space-3);
    right: var(--space-3);
  }

  .brand{
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
  }

  .logo{
    width: 28px;
    height: 28px;
  }

  .title{ font-size: 16px; }
  .subtitle{ display: none; }

  .ghost{
    height: 40px;
    padding: 0 var(--space-3);
    font-size: 13px;
    border-radius: var(--radius-full);
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce){
  .cloud, .beacon, .dot { animation: none !important; }
  .card, .cards, .pill { transition: none !important; }
}
