/* ============================================
   QPMIS — style.css
   Quanta Paper MIS | Central Hub
   ============================================ */

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #09090b;
  color: #a1a1aa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background-color: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

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

/* ── Background Effects ── */
.bg-gradient-radial {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(39, 39, 42, 0.4) 0%, #09090b 60%, #09090b 100%);
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  border-radius: 9999px;
  background-color: rgba(99, 102, 241, 0.05);
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

/* ── Navigation ── */
nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(9, 9, 11, 0.7);
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
  transition: all 0.3s ease;
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.nav-logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  background-color: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #09090b;
  transition: background-color 0.3s ease;
}

.nav-logo:hover .nav-logo-icon {
  background-color: #818cf8;
}

.nav-logo-text {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  color: #f4f4f5;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  color: #a1a1aa;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #f4f4f5;
}

.nav-hamburger {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: #a1a1aa;
}

.nav-hamburger:hover {
  color: #f4f4f5;
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
}

/* ── Main Content ── */
main {
  position: relative;
  z-index: 10;
  flex-grow: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ── Hero Section ── */
.hero {
  padding-top: 8rem;
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 10rem;
    padding-bottom: 8rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #27272a;
  background-color: rgba(24, 24, 27, 0.5);
  font-size: 0.75rem;
  color: #a1a1aa;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.hero-badge:hover {
  background-color: #27272a;
  color: #e4e4e7;
}

.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(52, 211, 153, 0.8);
  transition: background-color 0.3s ease;
}

.hero-badge:hover .hero-badge-dot {
  background-color: #34d399;
}

.hero-badge-arrow {
  transition: transform 0.3s ease;
}

.hero-badge:hover .hero-badge-arrow {
  transform: translateX(2px);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  color: #f4f4f5;
  margin-bottom: 1.5rem;
  max-width: 56rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-title-sub {
  display: block;
  color: #71717a;
}

.hero-description {
  font-size: 1rem;
  color: #a1a1aa;
  max-width: 42rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.125rem;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  background-color: #f4f4f5;
  color: #09090b;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #ffffff;
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #27272a;
  background: transparent;
  color: #d4d4d8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #18181b;
  color: #f4f4f5;
}

/* ── Section Shared ── */
.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid #18181b;
}

.section-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  color: #f4f4f5;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #71717a;
}

/* ── Search Input ── */
.search-wrapper {
  position: relative;
}

.search-wrapper iconify-icon.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  transition: color 0.3s ease;
  pointer-events: none;
}

.search-wrapper:focus-within iconify-icon.search-icon {
  color: #d4d4d8;
}

.search-input {
  width: 100%;
  background-color: rgba(24, 24, 27, 0.5);
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  color: #d4d4d8;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.search-input::placeholder {
  color: #52525b;
}

.search-input:focus {
  border-color: #52525b;
  background-color: #18181b;
}

@media (min-width: 768px) {
  .search-input {
    width: 16rem;
  }
}

/* ── Systems Grid ── */
.systems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .systems-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

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

/* ── System Card ── */
.system-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: rgba(24, 24, 27, 0.3);
  border: 1px solid rgba(39, 39, 42, 0.6);
  transition: all 0.5s ease;
  overflow: hidden;
  display: block;
}

.system-card:hover {
  background-color: rgba(24, 24, 27, 0.8);
  border-color: #3f3f46;
}

.card-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, transparent);
  transition: all 0.5s ease;
}

/* Indigo card */
.card-indigo .card-glow {
  background: linear-gradient(135deg, rgba(99,102,241,0) 0%, transparent 50%, rgba(99,102,241,0) 100%);
}
.card-indigo:hover .card-glow {
  background: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, transparent 50%, transparent 100%);
}
.card-indigo:hover .card-icon { border-color: rgba(99,102,241,0.3); color: #818cf8; }
.card-indigo:hover .card-title { color: #e0e7ff; }
.card-indigo:hover .card-link { color: #818cf8; }

/* Rose card */
.card-rose .card-glow {
  background: linear-gradient(135deg, rgba(244,63,94,0) 0%, transparent 50%, rgba(244,63,94,0) 100%);
}
.card-rose:hover .card-glow {
  background: linear-gradient(135deg, rgba(244,63,94,0.05) 0%, transparent 50%, transparent 100%);
}
.card-rose:hover .card-icon { border-color: rgba(244,63,94,0.3); color: #fb7185; }
.card-rose:hover .card-title { color: #ffe4e6; }
.card-rose:hover .card-link { color: #fb7185; }

/* Default card */
.card-default:hover .card-icon { border-color: #71717a; color: #e4e4e7; }
.card-default:hover .card-title { color: #e4e4e7; }
.card-default:hover .card-link { color: #e4e4e7; }

.card-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #27272a;
  background-color: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #a1a1aa;
  transition: all 0.3s ease;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #e4e4e7;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.card-desc {
  font-size: 0.875rem;
  color: #71717a;
  font-weight: 300;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.card-link {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a1a1aa;
  transition: color 0.3s ease;
}

.card-link-arrow {
  margin-left: 0.25rem;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: all 0.3s ease;
}

.system-card:hover .card-link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Request Card ── */
.request-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px dashed rgba(39, 39, 42, 0.6);
  transition: all 0.5s ease;
}

.request-card:hover {
  border-color: #52525b;
}

.request-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #71717a;
  transition: all 0.3s ease;
}

.request-card:hover .request-icon {
  transform: scale(1.1);
  color: #d4d4d8;
}

.request-title {
  font-size: 1rem;
  font-weight: 500;
  color: #a1a1aa;
  transition: color 0.3s ease;
}

.request-card:hover .request-title {
  color: #e4e4e7;
}

.request-desc {
  font-size: 0.75rem;
  color: #52525b;
  margin-top: 0.5rem;
  font-weight: 300;
}

/* ── Team Section ── */
.team-intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.team-desc {
  font-size: 0.875rem;
  color: #71717a;
  font-weight: 300;
  line-height: 1.75;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

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

.team-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 39, 42, 0.5);
  background-color: rgba(24, 24, 27, 0.2);
  transition: background-color 0.3s ease;
}

.team-card:hover {
  background-color: rgba(24, 24, 27, 0.5);
}

.team-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d4d4d8;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.team-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
}

.team-role {
  font-size: 0.75rem;
  color: #71717a;
}

/* ── Footer ── */
footer {
  border-top: 1px solid #18181b;
  margin-top: auto;
  position: relative;
  z-index: 10;
  background-color: #09090b;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.footer-secure {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #52525b;
}

.footer-copy {
  font-size: 0.75rem;
  color: #52525b;
}

.footer-icons {
  display: flex;
  gap: 1rem;
}

.footer-icon-link {
  color: #52525b;
  transition: color 0.3s ease;
}

.footer-icon-link:hover {
  color: #d4d4d8;
}

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background-color: rgba(9, 9, 11, 0.95);
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
  position: sticky;
  top: 4rem;
  z-index: 49;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 0.875rem;
  color: #a1a1aa;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  border-bottom: 1px solid #18181b;
}

.mobile-menu a:hover {
  color: #f4f4f5;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

.opacity-0 { opacity: 0; }

/* ── Scroll Reveal ── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}