/* ═══════════════════════════════════════════════════════════════
   CampusFix — Landing Page Styles
   Design inspired by the tailark hero-section-1 component.
   Dark theme · Modern glassmorphism · Spring animations
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
  --background: #000000;
  --foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.08);
  --muted-foreground: #a1a1aa; /* Brighter grey for readability */
  --accent-foreground: #ffffff;
  --border: rgba(255, 255, 255, 0.15);
  --primary: #ffffff;
  --primary-foreground: #000000;
  --ring: rgba(155, 153, 254, 0.6);

  /* Brand gradient from the component SVG */
  --brand-start: #9B99FE;
  --brand-end: #2BC8B7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ═══════════════════════════════════════════
   AMBIENT BACKGROUND
   ═══════════════════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.ambient-orb--1 {
  width: 40rem;
  height: 40rem;
  top: -10rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.18) 0%, transparent 70%);
  animation: floatOrb 12s ease-in-out infinite;
}

.ambient-orb--2 {
  width: 45rem;
  height: 45rem;
  bottom: -15rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(43, 200, 183, 0.15) 0%, transparent 70%);
  animation: floatOrb 14s ease-in-out infinite reverse;
}

.ambient-orb--3 {
  width: 30rem;
  height: 30rem;
  top: 40%;
  left: 50%;
  background: radial-gradient(circle, rgba(155, 153, 254, 0.10) 0%, rgba(43, 200, 183, 0.06) 50%, transparent 70%);
  animation: floatOrb 10s ease-in-out infinite;
  animation-delay: -4s;
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.04); }
}


/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 8px;
}

.nav__inner {
  max-width: 72rem;
  margin: 8px auto 0;
  padding: 0 24px;
  transition: all 0.3s ease;
}

.nav__inner--scrolled {
  max-width: 56rem;
  background: rgba(9, 9, 11, 0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 0 20px;
  position: relative;
  z-index: 10;
  transform: translateZ(0);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 12px 0;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(155, 153, 254, 0.15), rgba(43, 200, 183, 0.15));
  border: 1px solid rgba(155, 153, 254, 0.25);
  border-radius: 9px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav__logo:hover .nav__logo-icon {
  border-color: rgba(155, 153, 254, 0.5);
  box-shadow: 0 0 20px rgba(155, 153, 254, 0.15);
}

.nav__logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.nav__logo-accent {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop center links */
.nav__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.nav__link:hover {
  color: var(--accent-foreground);
}

/* Nav buttons */
.nav__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--foreground);
  position: relative;
  z-index: 110;
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}

.nav__toggle .icon-close {
  display: none;
}

.nav__toggle.active .icon-menu {
  display: none;
}

.nav__toggle.active .icon-close {
  display: block;
}

/* Mobile panel dropdown */
.nav__mobile-panel {
  display: none;
  position: absolute;
  top: 72px;
  right: 24px;
  width: 220px;
  height: auto;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  z-index: 99;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav__mobile-panel.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nav__mobile-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}


/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

/* Sizes */
.btn--sm {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn--md {
  height: 40px;
  padding: 0 16px;
}

.btn--lg {
  height: 44px;
  padding: 0 20px;
  font-size: 16px;
  border-radius: 12px;
}

/* Variants */
.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn--primary:hover {
  background: rgba(250, 250, 250, 0.9);
}

.btn--outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  background: var(--muted);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn--ghost {
  background: transparent;
  color: var(--foreground);
}

.btn--ghost:hover {
  background: var(--muted);
}

/* Wrapped button (double border effect) */
.btn-wrap {
  background: rgba(250, 250, 250, 0.1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2px;
}

.btn-wrap .btn {
  border-radius: 12px;
  padding: 0 20px;
}

/* Scrolled-only get-started button */
.btn--get-started {
  display: none;
}

.nav__inner--scrolled .btn--login,
.nav__inner--scrolled .btn--signup {
  display: none;
}

.nav__inner--scrolled .btn--get-started {
  display: inline-flex;
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.hero__container {
  position: relative;
  padding-top: 96px;
  padding-bottom: 0;
}

.hero__content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

/* Announcement badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 4px 4px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  margin-bottom: 0;
}

.hero__badge:hover {
  background: var(--background);
  border-color: var(--border);
}

.hero__badge-text {
  font-size: 14px;
  color: var(--foreground);
  font-weight: 500;
}

.hero__badge-divider {
  display: block;
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
}

.hero__badge-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.hero__badge-arrow-inner {
  display: flex;
  width: 48px;
  transform: translateX(-50%);
  transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
}

.hero__badge:hover .hero__badge-arrow-inner {
  transform: translateX(0);
}

.hero__badge-arrow-inner span {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero__badge-arrow-inner svg {
  width: 12px;
  height: 12px;
  stroke: var(--foreground);
  stroke-width: 2;
  fill: none;
}

/* Title */
.hero__title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 32px;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.hero__title-gradient {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.hero__subtitle {
  font-size: 20px;
  font-weight: 500;
  color: #e4e4e7; /* Brighter grey specifically for subtitle */
  margin-top: 32px;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Extra bottom padding when no preview image */
.hero__content {
  padding-bottom: 40px;
}

/* CTA area */
.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

@media (min-width: 768px) {
  .hero__cta {
    flex-direction: row;
  }
}

/* Hero preview section removed */

/* ═══════════════════════════════════════════
   FEATURES SECTION (replaces logos)
   ═══════════════════════════════════════════ */
.features {
  position: relative;
  z-index: 2;
  padding: 64px 0 64px;
  background: var(--background);
}

@media (min-width: 768px) {
  .features {
    padding: 64px 0 128px;
  }
}

.features__container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.features__title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  text-align: center;
  margin-bottom: 48px;
}

.features__title span {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
  transition: all 0.5s ease;
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.features__card {
  position: relative;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.4s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
  /* Animation */
  opacity: 0;
  transform: translateY(24px);
}

.features__card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.features__card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(155, 153, 254, 0.06);
}

.features__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(155, 153, 254, 0.2) 50%, rgba(43, 200, 183, 0.2) 70%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.features__card:hover::before {
  opacity: 1;
}

.features__card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(155, 153, 254, 0.1), rgba(43, 200, 183, 0.1));
  border: 1px solid rgba(155, 153, 254, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.features__card:hover .features__card-icon {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(155, 153, 254, 0.15);
}

.features__card-icon svg {
  width: 24px;
  height: 24px;
  stroke: url(#featureGrad);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Fallback for svg gradient */
.features__card-icon svg {
  stroke: var(--brand-start);
}

.features__card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--foreground);
}

.features__card p {
  font-size: 15px;
  color: #d4d4d8; /* Very readable bright grey */
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 40px 24px 32px;
  background: var(--background);
}

.footer__text {
  font-size: 13px;
  color: rgba(250, 250, 250, 0.3);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

/* Stagger children with data-animate */
[data-animate] {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
  animation: fadeInUp 0.8s cubic-bezier(.25, .46, .45, .94) forwards;
}

[data-animate="1"] { animation-delay: 0.1s; }
[data-animate="2"] { animation-delay: 0.25s; }
[data-animate="3"] { animation-delay: 0.4s; }
[data-animate="4"] { animation-delay: 0.55s; }
[data-animate="5"] { animation-delay: 0.7s; }

/* Nav slide down on load */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}

.nav {
  animation: slideDown 0.5s ease-out 0.1s backwards;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1023px) {
  .nav__center {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__actions {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero__container {
    padding-top: 80px;
  }

  .hero__title {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
  }

  .hero__subtitle {
    font-size: 16px;
    margin-top: 20px;
  }

  .hero__cta {
    margin-top: 32px;
  }

  .hero__badge-text {
    font-size: 12px;
  }

  .features__container {
    padding: 0 16px;
  }

  .features__title {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.875rem;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  .btn--lg {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  .nav__logo-text {
    font-size: 16px;
  }
}

/* Hidden utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Global SVG Sizing & Alignment ── */
svg:not([width="0"]):not([height="0"]) {
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════
   SOCIAL CONNECT (CONTACT US)
   ═══════════════════════════════════════════ */
.social-connect-container {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.4), rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.3), 0 0 80px rgba(124, 58, 237, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.5s ease;
  margin: 0 auto;
  max-width: 600px;
  margin-bottom: 24px;
}

.social-connect-container:hover {
  transform: scale(1.02);
}

.social-connect-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-icon .icon-container {
  display: inline-flex;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover .icon-container {
  transform: translateY(-10px) scale(1.1);
}

.social-icon:hover .icon-label {
  opacity: 1;
  transform: translateY(5px);
}

.social-icon .icon-label {
  margin-top: 12px;
  color: white;
  font-weight: 500;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.social-icon.instagram:hover .icon-container {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  box-shadow: 0 0 20px rgba(225, 48, 108, 0.6);
}

.social-icon.github:hover .icon-container {
  background: #333;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.social-icon.email:hover .icon-container {
  background: #ea4335;
  box-shadow: 0 0 20px rgba(234, 67, 53, 0.6);
}

.social-icon:hover svg {
  animation: svgShake 0.5s;
}

@keyframes svgShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-5px) rotate(-5deg); }
  40% { transform: translateX(5px) rotate(5deg); }
  60% { transform: translateX(-5px) rotate(-5deg); }
  80% { transform: translateX(5px) rotate(5deg); }
}

.social-icon .icon-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.social-icon:hover .icon-container::before {
  opacity: 1;
}