/* ============================================================
   CAMPUSNEST - custom.css v3.0
   ============================================================ */

:root {
  --ink: #0b1120;
  --navy: #111827;
  --dusk: #1e293b;
  --cloud: #f8fafc;
  --silver: #e2e8f0;
  --steel: #94a3b8;
  --ghost: #cbd5e1;
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --teal-glow: rgba(20, 184, 166, 0.18);
  --teal-muted: #ccfbf1;
  --white: #ffffff;
  --live: #22c55e;
  --error: #ef4444;
  --nav-h: 68px;
  --shadow-sm: 0 1px 3px rgba(11, 17, 32, 0.08), 0 1px 2px -1px rgba(11, 17, 32, 0.05);
  --shadow-md: 0 4px 16px rgba(11, 17, 32, 0.1), 0 2px 6px -1px rgba(11, 17, 32, 0.06);
  --shadow-lg: 0 12px 40px rgba(11, 17, 32, 0.14);
  --shadow-dark: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-teal: 0 0 0 2px rgba(20, 184, 166, 0.35), 0 4px 20px rgba(20, 184, 166, 0.2);
  --shadow-form: 0 20px 60px rgba(11, 17, 32, 0.18);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  font-size: 16px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 70% 20%, rgba(20, 184, 166, 0.15), transparent 38%), var(--ink);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.preloader-bar {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  margin-top: 10px;
}

.preloader-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--teal);
  transform-origin: left;
  transform: scaleX(0);
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}

#navbar.nav-solid {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-lines {
  display: flex;
  width: 16px;
  flex-direction: column;
  gap: 4px;
}

.menu-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #fff;
}

.menu-toggle.is-open .menu-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.menu-toggle.is-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.menu-line {
  transition: transform 0.25s ease, opacity 0.2s ease;
}

#mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-110%);
  transition: transform 0.4s var(--ease-expo);
  z-index: 40;
}

#mobile-menu.is-open {
  transform: translateY(0);
}

.mobile-nav-link {
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  height: 44px;
  padding: 0 24px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--teal);
  color: var(--ink);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  line-height: 1;
  transform: translate(0) !important;
}

.btn-primary:hover {
  background: var(--teal-dark);
  box-shadow: var(--shadow-teal);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  height: 44px;
  padding: 0 24px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-ctas {
  align-items: stretch;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
}

.hero-line-inner {
  display: inline-block;
}

.hero-image {
  transform-origin: center;
}

/* Shared effects */
@keyframes livePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.8);
    opacity: 0.3;
  }
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--live);
  animation: livePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes scrollLinePulse {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--teal);
  animation: scrollLinePulse 1.8s ease-in-out infinite;
}

/* Ticker */
.ticker-bar {
  overflow: hidden;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

/* Gallery */
.gallery-viewport {
  overflow: hidden;
}

.gallery-track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  will-change: transform;
}

.gallery-track.is-pinned {
  scroll-snap-type: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  scroll-snap-align: start;
  flex-shrink: 0;
  user-select: none;
}

.gallery-progress {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--ghost);
  overflow: hidden;
}

.gallery-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--teal);
  transform-origin: left;
  transform: scaleX(0);
}

/* Features */
.feature-row {
  transition: background 0.2s ease;
}

.feature-row:hover {
  background: rgba(20, 184, 166, 0.04);
}

/* Location */
.loc-map-grid {
  background-image:
    linear-gradient(rgba(20, 184, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Process */
.process-step {
  transition: background 0.2s ease;
}

.process-step:hover .step-number {
  color: var(--teal-dark);
}

/* FAQ */
.faq-trigger {
  cursor: pointer;
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.faq-item.open .faq-q {
  color: var(--teal);
}

.faq-icon {
  color: var(--teal);
  transition: transform 0.28s ease, color 0.25s ease;
}

/* Form */
.form-card {
  box-shadow: var(--shadow-form);
}

.form-label {
  margin-bottom: 6px;
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  border: 1.5px solid var(--ghost);
  border-radius: 6px;
  padding: 11px 14px;
  background: var(--cloud);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-input::placeholder {
  color: var(--steel);
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: var(--teal);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
  background: var(--teal-dark);
  box-shadow: var(--shadow-teal);
}

.submit-btn .btn-arrow {
  transition: transform 0.2s ease;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.interest-counter {
  color: var(--teal);
  font-family: 'Space Mono', monospace;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Success banner */
.success-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--teal);
  color: var(--ink);
  text-align: center;
  padding: 14px 24px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  animation: slideDownBanner 0.5s var(--ease-expo) both;
}

@keyframes slideDownBanner {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1023px) {
  .feature-image-col {
    position: static;
  }
}

@media (min-width: 1024px) {
  #mobile-menu {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .hero-stats .stat-block {
    border-left: 0;
    padding-left: 0;
  }

  .hero-stats {
    gap: 16px;
  }

  .scroll-indicator {
    display: none;
  }

  .ticker-bar {
    margin-top: 0;
  }
}

@media (max-width: 399px) {
  #footer .grid {
    grid-template-columns: 1fr;
  }
}
