/* GAMBASI Papua Selatan 2026 - komponen kustom (CSS murni, bekerja dengan Tailwind CDN maupun build) */
:root {
  /* Palet mengikuti logo GAMBASI: biru (sayap kanan), merah (sayap kiri), emas (perisai) */
  --royal-50: #eef2ff; --royal-100: #dde5ff; --royal-200: #bfcdff; --royal-300: #93a9fb;
  --royal-500: #3b5bec; --royal-600: #2542d6; --royal-700: #1d33b3; --royal-800: #1c2c8c;
  --royal-900: #1b276b; --royal-950: #0c1238;
  --flame-500: #e3263f; --flame-600: #c41b33;
  --gold-300: #fde68a; --gold-400: #fcd34d; --gold-500: #f5b400; --gold-700: #9a6700;
  --brand-stripe: linear-gradient(90deg, #e3263f 0 33.33%, #f5b400 33.33% 66.66%, #2542d6 66.66% 100%);
  --ink-950: #060b14;
  --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-500: #64748b; --slate-700: #334155; --slate-900: #0f172a;
  --rose-600: #e11d48; --rose-700: #be123c;
  --radius: 1rem;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
[hidden] { display: none !important; }
.font-display { font-family: "Barlow Condensed", Inter, sans-serif; }

:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
.header-solid, .header-scrolled { background: rgba(12, 18, 56, .96); box-shadow: 0 8px 30px rgba(0,0,0,.25); backdrop-filter: blur(8px); }
.header-transparent:not(.header-scrolled) { background: transparent; }
.brand-stripe { height: 4px; background: var(--brand-stripe); }

/* ---------- Hero pattern (lapangan + warna sayap logo) ---------- */
.hero-pitch {
  background-color: var(--royal-950);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0 118px, rgba(255,255,255,.07) 119px 121px, transparent 122px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.07) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 80px, rgba(0,0,0,.03) 80px 160px),
    radial-gradient(ellipse at 0% 10%, rgba(227,38,63,.42), transparent 50%),
    radial-gradient(ellipse at 100% 20%, rgba(37,66,214,.55), transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(245,180,0,.22), transparent 55%);
}
.hero-logo { filter: drop-shadow(0 20px 40px rgba(0,0,0,.45)) drop-shadow(0 0 60px rgba(245,180,0,.25)); }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: logo-float 6s ease-in-out infinite; }
}
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.text-gold-gradient {
  background: linear-gradient(180deg, #fff3b0 0%, #fcd34d 40%, #f5b400 70%, #c98a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-glow { box-shadow: 0 10px 40px -10px rgba(245, 180, 0, .65); }

/* ---------- Sections ---------- */
.section-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--royal-700); }
.section-title { margin-top: .5rem; font-family: "Barlow Condensed", Inter, sans-serif; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -.01em; font-size: 2.25rem; color: var(--slate-900); }
@media (min-width: 640px) { .section-title { font-size: 3rem; } }
.card { background: #fff; border-radius: 1.25rem; box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px -12px rgba(15,23,42,.12); border: 1px solid var(--slate-200); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 16px 32px -12px rgba(15,23,42,.18); }
.icon-badge { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .9rem; background: var(--royal-50); color: var(--royal-700); }
.req-pill { display: inline-block; vertical-align: middle; margin-left: .25rem; border-radius: 999px; background: #fee2e2; color: var(--rose-700); padding: .05rem .5rem; font-family: Inter, sans-serif; font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.category-card { transition: transform .25s ease; }
.category-card:hover { transform: translateY(-4px); }
.faq summary::-webkit-details-marker { display: none; }

/* ---------- Notices ---------- */
.notice { border-radius: 1rem; padding: .875rem 1rem; font-size: .925rem; line-height: 1.5; border: 1px solid; }
.notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.notice-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.notice-error { background: #fff1f2; border-color: #fecdd3; color: #881337; }

/* ---------- Form ---------- */
.form-card { background: #fff; border-radius: 1.5rem; padding: 1.25rem; border: 1px solid var(--slate-200); box-shadow: 0 10px 30px -18px rgba(15,23,42,.25); }
@media (min-width: 640px) { .form-card { padding: 2rem; } }
.form-card-title { font-family: "Barlow Condensed", Inter, sans-serif; font-weight: 800; font-size: 1.75rem; line-height: 1.1; text-transform: uppercase; color: var(--slate-900); }
.field-label { display: block; margin-bottom: .35rem; font-size: .875rem; font-weight: 600; color: var(--slate-700); }
.req { color: var(--rose-600); }
.field-input {
  display: block; width: 100%; min-height: 3rem; border-radius: .8rem; border: 1px solid var(--slate-300);
  background: #fff; padding: .7rem .9rem; font-size: 1rem; color: var(--slate-900);
  transition: border-color .15s, box-shadow .15s;
}
textarea.field-input { min-height: 4.5rem; resize: vertical; }
.field-input::placeholder { color: #94a3b8; }
.field-input:focus { outline: none; border-color: var(--royal-600); box-shadow: 0 0 0 4px rgba(59,91,236,.2); }
.field-input.is-invalid, .field-input[aria-invalid="true"] { border-color: var(--rose-600); box-shadow: 0 0 0 3px rgba(225,29,72,.12); }
.field-hint { margin-top: .3rem; font-size: .75rem; color: var(--slate-500); }
.field-error { margin-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--rose-700); }
.field-error::before { content: "⚠ "; }

.cat-option { position: relative; display: block; cursor: pointer; }
.cat-box { display: block; border-radius: 1.1rem; border: 2px solid var(--slate-200); background: #fff; padding: 1rem; text-align: center; transition: all .15s; color: var(--slate-900); }
.cat-option:hover .cat-box { border-color: var(--royal-300); }
.cat-option input:checked + .cat-box { border-color: var(--royal-600); background: var(--royal-50); box-shadow: 0 0 0 4px rgba(59,91,236,.18); color: var(--royal-900); }
.cat-option input:focus-visible + .cat-box { outline: 3px solid var(--gold-400); outline-offset: 2px; }

/* Stepper */
.step-dot { background: #fff; color: var(--slate-500); border: 2px solid var(--slate-300); transition: all .2s; }
.step-label { color: var(--slate-500); }
.step-item.is-active .step-dot { background: var(--royal-700); border-color: var(--royal-700); color: #fff; box-shadow: 0 0 0 4px rgba(245,180,0,.35); }
.step-item.is-active .step-label { color: var(--royal-800); }
.step-item.is-done .step-dot { background: var(--royal-100); border-color: var(--royal-500); color: var(--royal-800); }
.step-item.is-done, .step-item.is-reachable { cursor: pointer; }

/* Upload */
.upload-box.is-drag .dropzone { border-color: var(--royal-600); background: var(--royal-100); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 8.5rem; padding: 1rem; border-radius: 1rem; border: 2px dashed var(--royal-300);
  background: var(--royal-50); cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone:hover { background: var(--royal-100); }
.upload-box input[type=file]:focus-visible + .field-error,
.upload-box:focus-within .dropzone { outline: 3px solid var(--gold-400); outline-offset: 2px; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem;
  border-radius: .9rem; padding: .75rem 1.5rem; font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  transition: background .15s, transform .15s, box-shadow .15s; text-align: center;
}
.btn-primary { background: var(--royal-700); color: #fff; box-shadow: 0 8px 20px -10px rgba(29,51,179,.8); }
.btn-primary:hover { background: var(--royal-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #94a3b8; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--slate-900); border: 1px solid var(--slate-300); }
.btn-secondary:hover { background: #f8fafc; }
.btn-chip { display: inline-flex; align-items: center; border-radius: .6rem; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; background: var(--royal-50); color: var(--royal-800); border: 1px solid var(--royal-200); }
.btn-chip:hover { background: var(--royal-100); }
.btn-chip-danger { background: #fff1f2; color: var(--rose-700); border-color: #fecdd3; }
.btn-chip-danger:hover { background: #ffe4e6; }

/* Sticky action bar (mobile) */
.sticky-actions {
  position: fixed; inset: auto 0 0 0; z-index: 40; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--slate-200); backdrop-filter: blur(8px);
  box-shadow: 0 -10px 30px -15px rgba(15,23,42,.25);
}
@media (min-width: 1024px) {
  .sticky-actions { position: static; margin-top: 1.5rem; padding: 0; background: transparent; border: 0; box-shadow: none; }
}

/* Submit phases */
.submit-phase { display: flex; align-items: center; gap: .75rem; color: var(--slate-500); }
.phase-icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 999px; border: 2px solid var(--slate-300); position: relative; }
.submit-phase[data-status="active"] { color: var(--slate-900); font-weight: 600; }
.submit-phase[data-status="active"] .phase-icon { border-color: var(--royal-600); border-top-color: transparent; animation: spin .8s linear infinite; }
.submit-phase[data-status="done"] { color: var(--royal-800); }
.submit-phase[data-status="done"] .phase-icon { background: var(--royal-600); border-color: var(--royal-600); }
.submit-phase[data-status="done"] .phase-icon::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 700; }
.submit-phase[data-status="error"] { color: var(--rose-700); font-weight: 600; }
.submit-phase[data-status="error"] .phase-icon { background: var(--rose-600); border-color: var(--rose-600); }
.submit-phase[data-status="error"] .phase-icon::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

/* WhatsApp admin (tombol melayang) */
.wa-float {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 45;
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem; border-radius: 999px;
  background: #25D366; color: #fff; font-weight: 700; font-size: .9rem;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .6); transition: transform .15s, background .15s;
}
.wa-float:hover { background: #1ebe5b; transform: translateY(-2px); }
.wa-float:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37, 211, 102, .5); }
.wa-float-label { display: none; padding-right: .35rem; }
@media (min-width: 640px) { .wa-float { padding: .8rem 1.1rem; right: 1.5rem; bottom: 1.5rem; } .wa-float-label { display: inline; } }
@media (max-width: 1023px) {
  body.has-sticky-actions .wa-float { bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
}
@media print { .wa-float { display: none !important; } }

/* Toast (di atas tombol WhatsApp & action bar) */
#toast-root { bottom: calc(5rem + env(safe-area-inset-bottom)); }
@media (max-width: 1023px) {
  body.has-sticky-actions #toast-root { bottom: calc(9.5rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 640px) {
  #toast-root { bottom: 5.5rem; }
}
.toast { animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500); padding: .75rem 1rem; background: #f8fafc; border-bottom: 1px solid var(--slate-200); white-space: nowrap; }
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.admin-table tr:hover td { background: #f8fafc; }
.stat-card { background: #fff; border-radius: 1.25rem; padding: 1.25rem; border: 1px solid var(--slate-200); }
.doc-thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: .75rem; background: #f1f5f9; }

@media print {
  #site-header, footer, .sticky-actions, #toast-root { display: none !important; }
}
