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

:root {
  --bg: #0a0a0f;
  --card: #1a1a28;
  --card2: #111120;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #f0f0f8;
  --muted: #9090aa;
  --border: rgba(108,99,255,0.2);
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
}
.nav-logo span { color: var(--accent); }

.nav-right a {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.nav-right a:hover { color: var(--accent); }

/* HERO */
.docs-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 60px 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.docs-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.docs-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.docs-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.docs-title {
  font-family: var(--font-head);
  font-size: clamp(44px, 8vw, 100px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.docs-title span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 32px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  text-align: left;
}

.docs-stats {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 14px 32px;
}

.dstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dstat span {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.dstat p {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.dstat-div {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* DOCS SECTION */
.docs-section {
  padding: 60px 60px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

/* GRID — 3 columns */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* DOC CARD */
.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.doc-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(108,99,255,0.18);
}

/* IMAGE WRAP */
.doc-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--card2);
}

/* Actual image — shown if src is present */
.doc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 2;
  transition: transform 0.4s ease;
  background: #0a0a0f;
  padding: 0;
  margin: 0;
}

.doc-card:hover .doc-img { transform: scale(1.05); }

/* Placeholder — shown if no image */
.doc-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1;
  background: linear-gradient(135deg, var(--card2), #1e1e35);
}

.placeholder-icon {
  font-size: 3.5rem;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.placeholder-text {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hover overlay */
.doc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108,99,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.doc-card:hover .doc-overlay { opacity: 1; }

.doc-overlay span {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-transform: uppercase;
}

/* DOC INFO */
.doc-info {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(108,99,255,0.15);
  line-height: 1;
  margin-bottom: -4px;
}

.doc-name {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.doc-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.doc-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: 4px;
}

/* FOOTER */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer a { color: var(--accent); transition: color 0.3s; }
.footer a:hover { color: var(--text); }

/* AOS */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-section { padding: 40px 24px 80px; }
}

@media (max-width: 640px) {
  .docs-grid { grid-template-columns: 1fr; }
  .docs-hero { padding: 80px 20px 40px; }
  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 24px 20px; }
}

@media (max-width: 400px) {
  .docs-title { font-size: 32px; }
  .docs-stats { padding: 10px 16px; flex-wrap: wrap; justify-content: center; }
  .dstat span { font-size: 1.1rem; }
}