/* ================================================================
   emaji.net — Design overrides
   Aligned with emajiwallet design tokens. Loads AFTER Bootstrap.
   ================================================================ */

/* ── Google Fonts ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;600;700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────────────────────── */
:root {
  --brand:       #0f766e;
  --brand-text:  #0f766e;
  --brand-hover: #0c5f58;
  --canvas:      #F1ECE2;
  --surface:     #FFFFFF;
  --surface-2:   #F3EFE7;
  --ink:         #1B1A28;
  --ink-2:       #595769;
  --ink-3:       #9A97A8;
  --line:        #E8E2D6;
  --accent:      #df6238;
  --ready:       #1f8a5b;
  --missing:     #c47d1a;
  --font-display: 'Bricolage Grotesque', -apple-system, sans-serif;
  --font-ui:      'Hanken Grotesk', -apple-system, system-ui, sans-serif;
  --shadow-sm:   0 1px 2px rgba(20,18,33,0.05), 0 1px 3px rgba(20,18,33,0.04);
  --shadow-md:   0 6px 18px rgba(20,18,33,0.07), 0 2px 6px rgba(20,18,33,0.04);
  --radius-sm:   12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-card: 18px;
}

/* ── Global ──────────────────────────────────────────────────────── */
body {
  background: var(--canvas);
  font-family: var(--font-ui);
  color: var(--ink);
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

/* ── Navbar ──────────────────────────────────────────────────────── */
.navbar,
.navbar.bg-white,
.navbar.navbar-light.bg-white {
  background: rgba(255,255,255,0.72) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
  box-shadow: none !important;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink) !important;
}

.navbar-nav .nav-link {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem !important;
  transition: background 0.15s, color 0.15s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--brand-text);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.dropdown-item:hover {
  background: var(--surface-2);
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

.card-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent);
}

.btn-outline-primary {
  color: var(--brand-text);
  border-color: var(--brand);
}

.btn-outline-primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-success {
  background: var(--ready);
  border-color: var(--ready);
}

.btn-outline-secondary {
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-outline-secondary:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

.btn-lg {
  border-radius: 15px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
}

/* ── Forms ────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--ink);
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.form-text {
  color: var(--ink-3);
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge.bg-primary {
  background: var(--brand) !important;
}

.badge.bg-success {
  background: var(--ready) !important;
}

.badge.bg-warning {
  background: var(--missing) !important;
  color: #fff !important;
}

.badge.bg-light {
  background: var(--surface-2) !important;
  color: var(--ink-2) !important;
  border: 1px solid var(--line);
}

/* ── Tables ──────────────────────────────────────────────────────── */
.table {
  --bs-table-bg: var(--surface);
  border-color: var(--line);
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  border-bottom-color: var(--line);
}

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.modal-header {
  border-bottom-color: var(--line);
}

.modal-footer {
  border-top-color: var(--line);
}

/* ── Nav tabs (status filters, etc.) ─────────────────────────────── */
.nav-tabs {
  border-bottom-color: var(--line);
}

.nav-tabs .nav-link {
  color: var(--ink-2);
  font-weight: 500;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-tabs .nav-link.active {
  color: var(--brand-text);
  border-color: var(--line) var(--line) var(--surface);
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}


/* ── Pagination ──────────────────────────────────────────────────── */
.page-link {
  border-color: var(--line);
  color: var(--brand-text);
  border-radius: var(--radius-sm);
}

.page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}

/* ── Utility ─────────────────────────────────────────────────────── */
.text-primary { color: var(--brand-text) !important; }

a { color: var(--brand-text); }
a:hover { color: var(--brand-hover); }

.text-muted { color: var(--ink-3) !important; }

.bg-light { background: var(--surface-2) !important; }

hr { border-color: var(--line); opacity: 1; }

/* ── Content wrapper — let canvas breathe ─────────────────────────── */
main.py-4 {
  background: transparent;
}

.card-header {
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── Acting-as banner (warm accent) ──────────────────────────────── */
.bg-warning.text-dark {
  background: color-mix(in srgb, var(--accent) 12%, var(--canvas)) !important;
  color: var(--ink) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}

/* ── Scrollbar (subtle) ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ================================================================
   Landing page
   ================================================================ */

/* ── Glassmorphism cards ────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.glass-badge {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand-text);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  letter-spacing: 0.5px;
}

/* ── Hero section ───────────────────────────────────────────────── */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--canvas) 0%, var(--surface) 50%, var(--canvas) 100%);
}

.hero-background {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--brand) 8%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--brand) 6%, transparent) 0%, transparent 50%);
  pointer-events: none;
}

.hero-title {
  line-height: 1.15;
  color: var(--ink);
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--ink-2);
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 400;
}

.hero-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 992px) {
  .hero-features { justify-content: flex-start; }
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-2);
  pointer-events: none;
}

.feature-pill svg {
  flex-shrink: 0;
  fill: var(--ink-2);
  opacity: 0.6;
}

.hero-visual {
  animation: heroFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--brand) 10%, transparent));
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-20px); }
}

/* Mobile: visual as watermark */
@media (max-width: 991px) {
  .hero-visual-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 300px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    pointer-events: none;
    z-index: 0;
  }
  .hero-visual {
    width: 70%;
    max-width: 280px;
    opacity: 0.12;
    animation: none;
  }
}

/* Desktop: visual on the right */
@media (min-width: 992px) {
  .hero-visual-wrapper {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
  }
  .hero-visual {
    width: 100%;
    max-width: 500px;
    opacity: 1;
  }
  .hero-section .container {
    position: relative;
    z-index: 1;
  }
}

/* ── Hero buttons ───────────────────────────────────────────────── */
.btn-hero-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 30%, transparent);
  letter-spacing: 0.3px;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent);
  background: linear-gradient(135deg, var(--brand-hover) 0%, var(--brand) 100%);
  color: white;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand-text);
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--brand);
  color: var(--brand-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 15%, transparent);
}

/* ── Role cards ─────────────────────────────────────────────────── */
.roles-section {
  background: var(--canvas);
}

.role-card {
  border: none;
  display: flex;
  flex-direction: column;
}

.role-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.role-icon-modern {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, transparent) 0%, color-mix(in srgb, var(--brand) 5%, transparent) 100%);
  color: var(--brand-text);
}

.role-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.role-subtitle {
  font-size: 0.9rem;
  line-height: 1.4;
}

.role-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 0.95rem;
}

.benefit-check {
  flex-shrink: 0;
  margin-top: 2px;
  fill: var(--brand);
}

/* Role-specific buttons */
.btn-role-professional,
.btn-role-trainer,
.btn-role-employer {
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  padding: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  color: white;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 25%, transparent);
}

.btn-role-professional:hover,
.btn-role-trainer:hover,
.btn-role-employer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 35%, transparent);
  color: white;
}

/* ── Standards & Trust ──────────────────────────────────────────── */
.standards-section {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
}

.standard-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.standard-icon {
  flex-shrink: 0;
  margin-top: 3px;
}

.trust-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.trust-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent) 0%, color-mix(in srgb, var(--brand) 8%, transparent) 100%);
}

/* ── Smooth rendering ───────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Landing responsive ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .hero-section { min-height: auto; padding: 4rem 0; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .btn-hero-primary,
  .btn-hero-secondary { width: 100%; margin-bottom: 0.75rem; }
  .hero-section { padding: 2rem 0 !important; }
  .roles-section,
  .standards-section { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}

@media (max-width: 480px) {
  .hero-section { padding: 1.5rem 0 !important; }
  .roles-section,
  .standards-section { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
}

/* ── Landing navbar / logo ──────────────────────────────────────── */
.navbar-logo {
  height: 50px;
  transition: height 0.3s ease;
}

.brand-text {
  font-weight: 600;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .navbar { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
  .navbar-logo { height: 32px; }
  .brand-text { font-size: 0.9rem; }
  .navbar-brand { margin-right: 0; }
}

@media (max-width: 480px) {
  .navbar { padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; }
  .navbar-logo { height: 28px; }
  .brand-text { font-size: 0.8rem; }
}

/* ── Footer attribution ─────────────────────────────────────────── */
.footer-attribution {
  background-color: var(--surface-2);
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.footer-attribution a {
  color: var(--brand-text);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-attribution a:hover {
  color: var(--brand-hover);
}

@media (max-width: 768px) {
  .footer-attribution { margin-top: 2rem; }
  .footer-attribution .small { font-size: 0.8rem; }
}
