/* ============================================================
   HulamKo Design System v2.0 — Centralized Design Tokens & Components
   Brand: Navy #0A539E | Teal #20948D | Cyan #2FCAC0
   Typography: Outfit (bundled locally)
   Style: Glassmorphism + Animated Blobs + Micro-interactions
   ============================================================ */

/* ---------- Font Family ---------- */
.hk-body {
  font-family:
    "Outfit", "Inter", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
  overflow-x: hidden;
}

/* ---------- Screen Reader Only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== GRADIENTS ========== */
.gradient-brand {
  background: linear-gradient(to bottom right, #0a539e, #20948d);
}
.gradient-accent {
  background: linear-gradient(to bottom right, #20948d, #2fcac0);
}
.gradient-hover {
  background: linear-gradient(to bottom right, #073b71, #166b65);
}

/* ========== ANIMATED BACKGROUND BLOBS ========== */
@keyframes hk-float {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

.hk-blob-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.hk-blob {
  position: fixed;
  filter: blur(80px);
  opacity: 0.45;
  animation: hk-float 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.hk-blob--cyan {
  top: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: #2fcac0;
}
.hk-blob--navy {
  bottom: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: #0a539e;
  animation-delay: -6s;
}
.hk-blob--teal {
  top: 40%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: #20948d;
  animation-delay: -3s;
}

/* ========== GLASSMORPHISM CARDS ========== */
.hk-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
}
.hk-card--elevated {
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.08);
}
.hk-card--solid {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hk-card--login {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  border-radius: 1.5rem;
}

/* Backward-compatible alias for legacy glass-card class */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
}

/* Break long unbroken strings (hashes, tokens, IDs) so they wrap inside cards
   instead of overflowing. `anywhere` also stops long words from widening the
   CSS grid track (min-content sizing). */
.hk-break-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========== HOVER LIFT ========== */
.hk-hover-lift {
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}
.hk-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}
.hk-hover-lift--subtle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* ========== BUTTONS ========== */
.hk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.hk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hk-btn--primary {
  background: linear-gradient(to bottom right, #0a539e, #20948d);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 83, 158, 0.3);
}
.hk-btn--primary:hover:not(:disabled) {
  background: linear-gradient(to bottom right, #073b71, #166b65);
  box-shadow: 0 6px 20px rgba(10, 83, 158, 0.4);
  transform: translateY(-1px);
}

.hk-btn--secondary {
  background: rgba(10, 83, 158, 0.08);
  border: 1.5px solid rgba(10, 83, 158, 0.25);
  color: #0a539e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.hk-btn--secondary:hover:not(:disabled) {
  background: #0a539e;
  color: #ffffff;
  border-color: #0a539e;
  box-shadow: 0 4px 14px rgba(10, 83, 158, 0.3);
  transform: translateY(-1px);
}

.hk-btn--accent {
  background: linear-gradient(to bottom right, #20948d, #2fcac0);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(32, 148, 141, 0.3);
}
.hk-btn--accent:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(32, 148, 141, 0.4);
  transform: translateY(-1px);
}

.hk-btn--outline {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #d1d5db;
  color: #374151;
}
.hk-btn--outline:hover:not(:disabled) {
  background: #ffffff;
  border-color: #20948d;
  color: #0a539e;
}

.hk-btn--outline-navy {
  background: transparent;
  border: 1px solid #0a539e;
  color: #0a539e;
}
.hk-btn--outline-navy:hover:not(:disabled) {
  background: #0a539e;
  color: #ffffff;
}

.hk-btn--outline-teal {
  background: transparent;
  border: 1px solid #20948d;
  color: #20948d;
}
.hk-btn--outline-teal:hover:not(:disabled) {
  background: #20948d;
  color: #ffffff;
}

.hk-btn--danger {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.hk-btn--danger:hover:not(:disabled) {
  background: #b91c1c;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.hk-btn--ghost {
  background: transparent;
  color: #6b7280;
}
.hk-btn--ghost:hover:not(:disabled) {
  background: rgba(10, 83, 158, 0.06);
  color: #0a539e;
}

.hk-btn--white {
  background: #ffffff;
  color: #0a539e;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.hk-btn--white:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #20948d;
  color: #20948d;
  transform: translateY(-1px);
}

/* Button Sizes */
.hk-btn--xs {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
}
.hk-btn--sm {
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
}
.hk-btn--md {
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
}
.hk-btn--lg {
  font-size: 1rem;
  padding: 0.625rem 1.75rem;
}
.hk-btn--xl {
  font-size: 1.0625rem;
  padding: 0.75rem 2rem;
}

/* ========== STATUS BADGES ========== */
.hk-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.375;
  white-space: nowrap;
}
.hk-badge--success {
  background: #e6f4f3;
  color: #115452;
  border: 1px solid #b8e0dc;
}
.hk-badge--warning {
  background: #fffaf0;
  color: #7b341e;
  border: 1px solid #fbd38d;
}
.hk-badge--danger {
  background: #fdf5f5;
  color: #742a2a;
  border: 1px solid #fed7d7;
}
.hk-badge--info {
  background: #e8f0f8;
  color: #1a365d;
  border: 1px solid #bed0e7;
}
.hk-badge--neutral {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
.hk-badge--brand {
  background: rgba(10, 83, 158, 0.08);
  color: #0a539e;
  border: 1px solid rgba(10, 83, 158, 0.15);
}
.hk-badge--teal {
  background: rgba(32, 148, 141, 0.08);
  color: #20948d;
  border: 1px solid rgba(32, 148, 141, 0.15);
}
.hk-badge--cyan {
  background: rgba(47, 202, 192, 0.08);
  color: #0f766e;
  border: 1px solid rgba(47, 202, 192, 0.2);
}

/* Solid (filled) badge variants */
.hk-badge--solid-success {
  background: #20948d;
  color: #ffffff;
}
.hk-badge--solid-warning {
  background: #d97706;
  color: #ffffff;
}
.hk-badge--solid-danger {
  background: #dc2626;
  color: #ffffff;
}
.hk-badge--solid-info {
  background: #0a539e;
  color: #ffffff;
}

/* ========== FORMS ========== */
.hk-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  background: #ffffff;
  font-size: 0.875rem;
}
.hk-input:focus {
  border-color: #0a539e;
  box-shadow: 0 0 0 3px rgba(10, 83, 158, 0.15);
}
.hk-input--teal:focus {
  border-color: #20948d;
  box-shadow: 0 0 0 3px rgba(32, 148, 141, 0.15);
}
.hk-input--danger:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.hk-input--readonly {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}
.hk-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}
.hk-label--required::after {
  content: " *";
  color: #dc2626;
}
.hk-checkbox {
  margin-top: 0.125rem;
  flex-shrink: 0;
  border-radius: 0.25rem;
  accent-color: #0a539e;
}

/* ========== TABLES ========== */
.hk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.hk-table thead th {
  background: rgba(10, 83, 158, 0.04);
  border-bottom: 1px solid rgba(10, 83, 158, 0.08);
  color: #6b7280;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}
.hk-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(10, 83, 158, 0.04);
  font-size: 0.8125rem;
}
.hk-table tbody tr:hover td {
  background: rgba(10, 83, 158, 0.03);
}
.hk-table tbody tr.hk-row--stripe td {
  background: rgba(10, 83, 158, 0.015);
}
.hk-table--compact thead th,
.hk-table--compact tbody td {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
}

/* ========== FLASH ALERTS ========== */
.hk-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.hk-alert--success {
  background: #e6f4f3;
  border: 1px solid #b8e0dc;
  color: #115452;
}
.hk-alert--error {
  background: #fdf5f5;
  border: 1px solid #fed7d7;
  color: #742a2a;
}
.hk-alert--warning {
  background: #fffaf0;
  border: 1px solid #fbd38d;
  color: #7b341e;
}

/* ========== MODALS ========== */
/* Used by generate/success modals in applications */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 83, 158, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hk-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 83, 158, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}
.hk-modal {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* ========== NAVIGATION ========== */
.hk-navbar {
  position: relative;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #ffffff;
}
.hk-navbar--brand {
  background: linear-gradient(to bottom right, #0a539e, #20948d);
}
.hk-navbar--accent {
  background: linear-gradient(to bottom right, #20948d, #2fcac0);
}

.hk-nav-link {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
  position: relative;
}
.hk-nav-link:hover {
  color: #ffffff;
}
.hk-nav-link--active {
  color: #ffffff;
  font-weight: 600;
  position: relative;
}
.hk-nav-link--active::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* Mobile Menu */
.hk-mobile-menu {
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
}
.hk-mobile-menu--open {
  max-height: 30rem;
  opacity: 1;
}
.hk-mobile-menu--glass {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  color: #0a539e;
}
.hk-mobile-menu--solid {
  background: #0a539e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.hk-mobile-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.hk-mobile-link--glass:hover {
  background: rgba(10, 83, 158, 0.06);
  color: #0a539e;
}
.hk-mobile-link--glass-active {
  background: rgba(10, 83, 158, 0.08);
  color: #0a539e;
  border-left: 3px solid #0a539e;
}

.hk-mobile-link--solid:hover {
  background: rgba(255, 255, 255, 0.1);
}
.hk-mobile-link--solid-active {
  background: rgba(255, 255, 255, 0.18);
}

/* ========== FOOTER ========== */
.hk-footer {
  border-top: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ========== PAGE SECTION ========== */
.hk-section {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  width: 100%;
}

/* ========== ANIMATION UTILITIES ========== */
@keyframes hk-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hk-animate-fade-in-up {
  animation: hk-fadeInUp 0.4s ease-out;
}

@keyframes hk-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.hk-animate-scale-in {
  animation: hk-scaleIn 0.2s ease-out;
}

/* ========== COOKIE CONSENT ========== */

/* Banner visibility — triggered by JS adding this class */
.hk-cookie-banner--visible {
  transform: translateY(0) !important;
}

/* Toggle switch (iOS style) for preferences modal */
.hk-toggle {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
  background: #d1d5db;
  flex-shrink: 0;
  border: none;
  padding: 0;
  outline: none;
}
.hk-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(10, 83, 158, 0.25);
}
.hk-toggle--active {
  background: #20948d;
}
.hk-toggle::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.hk-toggle--active::after {
  transform: translateX(1.25rem);
}
.hk-toggle[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== RESPONSIVE TABLE WRAPPER ========== */
.hk-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  border-radius: 0.5rem;
}
.hk-table-responsive table {
  min-width: max-content;
  width: 100%;
}
@media (max-width: 767px) {
  .hk-table-responsive {
    max-width: calc(100vw - 2rem);
    position: relative;
  }
  .hk-table-responsive::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(
      to right,
      transparent,
      rgba(255, 255, 255, 0.9)
    );
    pointer-events: none;
    z-index: 2;
  }
}

/* ========== OTP / PIN INPUT ========== */
.hk-pin-input {
  width: 2.75rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.hk-pin-input:focus {
  border-color: #0a539e;
  box-shadow: 0 0 0 3px rgba(10, 83, 158, 0.15);
}

/* ========== MISC UTILITIES ========== */
.hk-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.hk-scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hk-scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Hero feature card icon rotation */
.hk-feature-icon {
  transform: rotate(3deg);
}
.hk-feature-icon--alt {
  transform: rotate(-3deg);
}

/* Progress indicator (form steps) */
.hk-progress-step {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}
.hk-progress-step--active {
  background: #0a539e;
  color: #ffffff;
}
.hk-progress-step--active-accent {
  background: #20948d;
  color: #ffffff;
}
.hk-progress-step--inactive {
  background: #e5e7eb;
  color: #9ca3af;
}

/* Section number badge */
.hk-section-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}
.hk-section-badge--navy {
  background: linear-gradient(to bottom right, #0a539e, #20948d);
}
.hk-section-badge--teal {
  background: linear-gradient(to bottom right, #20948d, #2fcac0);
}
