/* =========================================================
   DDPE Portal Pemetaan Potensi 2026
   Liquid Glass · Purple-Blue Digital · Gold Premium
   ========================================================= */

:root {
  --purple-900: #2e1065;
  --purple-800: #4c1d95;
  --purple-700: #5b21b6;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --blue-900: #0f172a;
  --blue-800: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --gold-500: #d4af37;
  --gold-400: #f59e0b;
  --gold-300: #fbbf24;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0f1a;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background Layers ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(91, 33, 182, 0.45), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(37, 99, 235, 0.35), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(212, 175, 55, 0.12), transparent 50%),
    linear-gradient(160deg, #0b0f1a 0%, #111827 40%, #1a1030 100%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Liquid Glass ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), inset 0 1px 0 var(--glass-highlight);
  border-radius: var(--radius-lg);
}

.glass-sm {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #e9d5ff 0%, #a78bfa 30%, #60a5fa 70%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-text {
  background: linear-gradient(135deg, #fbbf24, #d4af37, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.85rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(11, 15, 26, 0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
}

.nav-brand-text {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.nav-brand-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-600), var(--blue-600));
  color: white;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d4af37);
  color: #1a1030;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--purple-500);
  border: 1.5px dashed rgba(139, 92, 246, 0.5);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.1);
  border-style: solid;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1.25rem;
}

.hero-badge::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold-400), transparent);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 1.25rem;
}

.hero h1 .line1 {
  color: var(--text-primary);
  display: block;
}

.hero h1 .line2 {
  display: block;
  background: linear-gradient(135deg, #c4b5fd, #818cf8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.35), transparent 70%);
  animation: pulse-ring 4s ease-in-out infinite;
}

.hero-logo-wrap img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 60px rgba(91, 33, 182, 0.4);
  z-index: 2;
}

.floating-card {
  position: absolute;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}

.floating-card img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.floating-card.pilar1 {
  top: 12%;
  left: -10%;
  animation-delay: 0s;
}

.floating-card.pilar2 {
  bottom: 18%;
  right: -8%;
  animation-delay: 1.5s;
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.8s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.15s; }
.animate-delay-2 { animation-delay: 0.3s; }
.animate-delay-3 { animation-delay: 0.45s; }
.animate-delay-4 { animation-delay: 0.6s; }

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

/* ---------- Feature Cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.3);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Flow Steps ---------- */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  position: relative;
}

.flow-step {
  text-align: center;
  padding: 1.25rem 0.75rem;
}

.flow-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--blue-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 auto 0.75rem;
}

.flow-step h4 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.flow-step p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Assessment Form ---------- */
.assessment-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 1.25rem 4rem;
}

.progress-bar-wrap {
  margin-bottom: 2rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-600), var(--blue-600), var(--gold-400));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.step-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.step-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple-500);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

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

.question-context {
  font-size: 0.85rem;
  color: var(--gold-400);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.question-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(139, 92, 246, 0.35);
}

.option-item.selected {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--purple-500);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.option-item.selected .option-letter {
  background: linear-gradient(135deg, var(--purple-600), var(--blue-600));
  color: white;
}

.option-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.option-item.selected .option-text {
  color: var(--text-primary);
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ---------- Results ---------- */
.result-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 1.25rem 4rem;
}

.result-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.result-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.radar-wrap {
  max-width: 420px;
  margin: 0 auto 2.5rem;
  padding: 1.5rem;
}

.dimension-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.dim-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.dim-bar-wrap {
  flex: 1;
}

.dim-name {
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
}

.dim-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-600), var(--blue-500));
  transition: width 1s ease;
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.role-card {
  padding: 1.25rem;
  border-left: 3px solid var(--gold-400);
}

.role-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.role-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Twibbon ---------- */
.twibbon-section {
  text-align: center;
  margin-top: 2rem;
}

.twibbon-preview {
  width: min(360px, 90vw);
  height: min(360px, 90vw);
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #1a1030;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.twibbon-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Dashboard ---------- */
.dash-wrap {
  min-height: 100vh;
  padding: 5.5rem 1.25rem 3rem;
}

.dash-login {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2.5rem;
  text-align: center;
}

.dash-login h2 {
  margin-bottom: 0.5rem;
}

.dash-login p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.dash-sidebar {
  padding: 1.5rem 1rem;
  height: fit-content;
  position: sticky;
  top: 5.5rem;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.25rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.dash-nav-item:hover,
.dash-nav-item.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-primary);
}

.dash-content {
  padding: 1.75rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c4b5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--purple-500);
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 1rem; }
  .hero-logo-wrap { width: 260px; height: 260px; }
  .hero-logo-wrap img { width: 180px; height: 180px; }
  .floating-card.pilar1 { left: 0; }
  .floating-card.pilar2 { right: 0; }
  .features-grid { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dimension-list { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

@media (max-width: 560px) {
  .flow-steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}
