/* landing.css - Bento Grid / Data Dense Style */

:root {
  --bg-dark: #0f172a; /* Slate 900 */
  --bg-card: #1e293b; /* Slate 800 */
  --bg-card-hover: #334155;
  --primary: #3b82f6; /* Blue 500 */
  --accent: #f43f5e; /* Rose 500 */
  --text-main: #f8fafc; /* Slate 50 */
  --text-muted: #94a3b8; /* Slate 400 */
  --border: #334155; /* Slate 700 */
  --font-sans: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  color: var(--text-main);
  background-color: var(--bg-dark);
  /* Pattern Grid Latar Belakang */
  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: 30px 30px;
  overflow-x: hidden;
}

/* --- UTILS --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- NAVBAR --- */
nav {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cta-small {
  background: var(--text-main);
  color: var(--bg-dark);
  padding: 6px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: 0.2s;
}
.cta-small:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* --- BENTO GRID LAYOUT --- */
.hero-wrapper {
  padding: 2rem 0 4rem 0;
}

/* Grid Induk */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px; /* Jarak rapat */
}

/* Kartu Dasar */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --- SPESIFIKASI KARTU (Layout) --- */

/* 1. Hero Text (Kiri Atas - Besar) */
.card-hero {
  grid-column: span 7;
  grid-row: span 2;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  justify-content: center;
  align-items: flex-start;
  padding: 3rem;
}

/* 2. Visual Preview (Kanan Atas - Live Widget) */
.card-preview {
  grid-column: span 5;
  grid-row: span 2;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3. Features Kecil (Bawah) */
.card-feature {
  grid-column: span 3;
  grid-row: span 1;
}

/* 4. Feature Lebar (Bawah) */
.card-wide {
  grid-column: span 6;
  grid-row: span 1;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

/* --- CONTENT STYLING --- */
h1 {
  font-size: 3rem;
  line-height: 1;
  margin: 0 0 1rem 0;
  letter-spacing: -1.5px;
}
h1 span {
  color: var(--primary);
}

p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 90%;
}

h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: var(--text-main);
}
p.desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tombol Utama */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover {
  background: #2563eb;
}

/* --- WIDGETS & ANIMATIONS (Agar "Hidup") --- */

/* Widget: Face Scan (Di Card Preview) */
.scan-container {
  width: 140px;
  height: 180px;
  border: 2px solid var(--border);
  border-radius: 8px;
  position: relative;
  background: #000;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.scan-face {
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, #333 1px, transparent 1px);
  background-size: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: scan 2s infinite ease-in-out;
}
.overlay-shirt {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 60px;
  background: var(--primary);
  border-radius: 50% 50% 0 0;
  opacity: 0.8;
}

/* Widget: Loading Bar (Di Feature Card) */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 60%;
  background: var(--primary);
  animation: load 2s infinite;
}

/* Widget: Floating Tags */
.tags-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag-pill {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #334155;
  border: 1px solid #475569;
}

/* ANIMATIONS KEYFRAMES */
@keyframes scan {
  0% {
    top: 0;
    opacity: 0.5;
  }
  50% {
    top: 100%;
    opacity: 1;
  }
  100% {
    top: 0;
    opacity: 0.5;
  }
}
@keyframes load {
  0% {
    width: 0%;
  }
  50% {
    width: 80%;
  }
  100% {
    width: 100%;
  }
}

/* --- BOTTOM CTA SECTION --- */
.bottom-cta {
  text-align: center;
  padding: 6rem 1rem;
  background: linear-gradient(180deg, var(--bg-dark) 0%, #1e293b 100%);
  border-top: 1px solid var(--border);
}
.bottom-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.bottom-cta p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* --- FOOTER LANJUTAN --- */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0; /* Hapus margin lama jika ada */
}

.footer-col {
  flex: 1;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: var(--text-main);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  transition: 0.2s;
  cursor: pointer;
}
.footer-link:hover {
  color: var(--primary);
}

.copyright {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: #475569;
  font-size: 0.8rem;
}

/* --- MODAL PRIVASI (Pop-up) --- */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content h2 {
  font-size: 1.5rem;
  color: var(--text-main);
}
.modal-content p,
.modal-content ul {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.modal-content ul {
  padding-left: 1.5rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }
  .bottom-cta h2 {
    font-size: 1.8rem;
  }
}

/* --- MOBILE RESPONSIVE (FIXED) --- */
@media (max-width: 768px) {
  /* 1. Perbaiki Header Navbar agar SOLID (Tidak Transparan) */
  nav {
    background-color: var(--bg-dark); /* Warna pekat, bukan transparan */
    border-bottom: 1px solid var(--border);
    padding: 0 1rem; /* Padding horizontal agar tidak mepet */
  }

  .nav-inner {
    height: 60px; /* Tinggi navbar yang nyaman */
  }

  /* 2. Tambah Jarak Atas (Agar kartu tidak tertutup header) */
  .hero-wrapper {
    padding-top: 1rem; /* Tambah jarak napas */
  }

  /* 3. Atur Grid Menjadi 1 Kolom (Stack ke Bawah) */
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap: 20px; /* Jarak antar kartu lebih renggang */
  }

  /* 4. Reset Posisi Kartu (Wajib!) */
  .card-hero,
  .card-preview,
  .card-feature,
  .card-wide {
    grid-column: span 1 !important;
    grid-row: auto !important;
  }

  /* 5. Hero Card (Judul) */
  .card-hero {
    padding: 2rem 1.5rem;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .card-hero h1 {
    font-size: 2rem; /* Kecilkan font agar tidak terpotong */
    line-height: 1.2;
  }

  /* 6. Preview Card (Widget Wajah) */
  .card-preview {
    min-height: 250px;
    padding: 2rem;
    /* Pastikan widget di tengah */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .scan-container {
    transform: scale(0.85); /* Perkecil sedikit widget-nya */
  }
}
