/* ============================================================
   GBC Indonesia — Certificate Validation
   style.css — Public-facing pages
   ============================================================ */

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

:root {
  --navy: #080d1a;
  --navy-mid: #0e1526;
  --navy-card: #141e30;
  --navy-light: #1a2840;
  --gold: #d4a843;
  --gold-lite: #f0c060;
  --gold-dim: rgba(212, 168, 67, .12);
  --gold-glow: rgba(212, 168, 67, .25);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, .12);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, .12);
  --white: #f8fafc;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 13, 26, .85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 67, .1);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.nav-logo {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo.small {
  width: 34px;
  height: 34px;
}

.nav-logo img.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: .7rem;
  color: var(--gray-400);
}

.nav-admin-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border: 1px solid rgba(212, 168, 67, .3);
  border-radius: 100px;
  color: var(--gold);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.nav-admin-link:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 168, 67, .12), transparent 70%);
  top: -100px;
  left: -150px;
  animation: floatGlow 8s ease-in-out infinite;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, .08), transparent 70%);
  bottom: -100px;
  right: -100px;
  animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(30px, 20px);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 168, 67, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 67, .03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 720px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1.1rem;
  background: var(--gold-dim);
  border: 1px solid rgba(212, 168, 67, .3);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-lite);
  margin-bottom: 1.5rem;
  animation: fadeUp .5s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--white);
  margin-bottom: 1.25rem;
  animation: fadeUp .6s .1s ease both;
}

.text-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-lite));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--gray-400);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fadeUp .6s .2s ease both;
}

.hero-subtitle strong {
  color: var(--gray-200);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SEARCH CARD ===== */
.search-card {
  background: var(--navy-card);
  border: 1px solid rgba(212, 168, 67, .18);
  border-radius: 24px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(212, 168, 67, .05);
  backdrop-filter: blur(20px);
  animation: fadeUp .6s .3s ease both;
}

.search-icon-wrap {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-lite));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 auto 1rem;
  box-shadow: 0 8px 25px var(--gold-glow);
}

.search-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .25rem;
}

.search-hint {
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.search-hint code {
  background: rgba(212, 168, 67, .1);
  color: var(--gold-lite);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-size: .8rem;
}

.input-group {
  display: flex;
  gap: .75rem;
  position: relative;
  align-items: stretch;
}

.input-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: .9rem;
  pointer-events: none;
  z-index: 2;
  transition: color .2s;
}

#certNumber {
  flex: 1;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: .03em;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

#certNumber::placeholder {
  color: var(--gray-500);
}

#certNumber:focus {
  border-color: var(--gold);
  background: rgba(212, 168, 67, .05);
  box-shadow: 0 0 0 4px rgba(212, 168, 67, .12);
}

#certNumber:focus~.input-icon {
  color: var(--gold);
}

.btn-validate {
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-lite));
  border: none;
  border-radius: 14px;
  color: var(--navy);
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 6px 20px var(--gold-glow);
}

.btn-validate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--gold-glow);
  filter: brightness(1.05);
}

.btn-validate:active {
  transform: translateY(0);
}

.btn-validate:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* ===== RESULT AREA ===== */
.result-area {
  margin-top: 1.75rem;
  text-align: left;
}

.result-card {
  background: var(--navy-light);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  animation: slideDown .4s ease both;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.result-header.valid {
  background: linear-gradient(90deg, rgba(34, 197, 94, .18), rgba(34, 197, 94, .05));
  border-bottom: 1px solid rgba(34, 197, 94, .2);
}

.result-header.expired {
  background: linear-gradient(90deg, rgba(239, 68, 68, .18), rgba(239, 68, 68, .05));
  border-bottom: 1px solid rgba(239, 68, 68, .2);
}

.result-header-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.result-icon {
  font-size: 1.5rem;
}

.result-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.result-subtitle {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: .1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-badge.valid {
  background: rgba(34, 197, 94, .15);
  border: 1.5px solid rgba(34, 197, 94, .35);
  color: #4ade80;
}

.status-badge.expired {
  background: rgba(239, 68, 68, .15);
  border: 1.5px solid rgba(239, 68, 68, .35);
  color: #fca5a5;
}

.result-body {
  padding: 1.5rem;
}

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

.result-field {}

.field-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-500);
  margin-bottom: .25rem;
}

.field-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.field-value.monospace {
  font-family: 'Courier New', monospace;
  color: var(--gold-lite);
  font-size: .85rem;
}

.result-divider {
  grid-column: 1/-1;
  height: 1px;
  background: rgba(255, 255, 255, .06);
}

/* Error result */
.result-error {
  background: var(--red-dim);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  animation: slideDown .4s ease both;
}

.result-error .err-icon {
  font-size: 1.5rem;
  color: var(--red);
  flex-shrink: 0;
}

.result-error .err-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: .25rem;
}

.result-error .err-msg {
  font-size: .85rem;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== STATS SECTION ===== */
.stats-section {
  background: var(--navy-mid);
  border-top: 1px solid rgba(212, 168, 67, .08);
  border-bottom: 1px solid rgba(212, 168, 67, .08);
  padding: 3rem 1.5rem;
}

.stats-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: .75rem;
  display: block;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-label {
  font-size: .78rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ===== HOW IT WORKS ===== */
.how-section {
  padding: 5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 3rem;
  letter-spacing: -.02em;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step-card {
  background: var(--navy-card);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: border-color .2s, transform .2s;
}

.step-card:hover {
  border-color: rgba(212, 168, 67, .25);
  transform: translateY(-4px);
}

.step-num {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-size: .7rem;
  font-weight: 800;
  color: var(--gray-500);
  letter-spacing: .05em;
}

.step-icon {
  width: 56px;
  height: 56px;
  background: var(--gold-dim);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gold);
  margin: 0 auto .9rem;
}

.step-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
}

.step-card p {
  font-size: .82rem;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy-card);
  border-top: 1px solid rgba(212, 168, 67, .08);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.footer-copy {
  font-size: .78rem;
  color: var(--gray-500);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .input-group {
    flex-direction: column;
  }

  .btn-validate {
    width: 100%;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}