/* ==========================================================================
   ACZH.DEV GLOBAL RESPONSIVE DESIGN TOKENS & ADAPTIVE SYSTEM
   Mobile-first, dynamic clamp() scaling & fluid typography
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Theme tokens */
  --bg-canvas: #f8fafc;
  --surface-card: #ffffff;
  --surface-muted: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-focus: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-accent: #0284c7;

  /* Fluid Spacing Scale */
  --space-xs: clamp(0.25rem, 0.75vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1vw, 0.75rem);
  --space-md: clamp(1rem, 2vw, 1.5rem);
  --space-lg: clamp(1.5rem, 3vw, 2.5rem);
  --space-xl: clamp(2.5rem, 5vw, 4rem);

  /* Fluid Radius Scale */
  --radius-sm: clamp(8px, 1.2vw, 12px);
  --radius-md: clamp(12px, 1.8vw, 18px);
  --radius-lg: clamp(18px, 2.5vw, 24px);

  /* Safe Area Insets for Mobile Notches (iOS Safari / Android) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport units for mobile address bars */
  display: flex;
  flex-direction: column;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  padding-bottom: var(--safe-bottom);
  overflow-x: hidden;
}

/* Touch Device Ergonomics: prevent accidental zoom on inputs & ensure 44px+ tap targets */
@media (pointer: coarse) {
  button, a, input, textarea {
    min-height: 44px;
  }
}

/* ==========================================================================
   ACZH.DEV STANDARDIZED NAVBAR & FOOTER COMPONENTS
   ========================================================================== */

/* Standard Header / Navigation Bar */
.aczh-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: clamp(1.25rem, 2.5vh, 2rem);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.aczh-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  color: var(--text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem 0.35rem 0.65rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.aczh-back-btn:hover {
  color: var(--color-primary);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.aczh-back-btn .back-arrow {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.aczh-back-btn:hover .back-arrow {
  transform: translateX(-2px);
}

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

.aczh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: clamp(0.7rem, 1vw, 0.75rem);
  font-weight: 700;
  color: #1d4ed8;
  font-family: var(--font-mono);
}

/* Standardized Site Footer */
.aczh-footer {
  max-width: 1320px;
  margin: auto auto 0;
  width: 100%;
  padding: clamp(2rem, 4vh, 3rem) clamp(1rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: clamp(0.8rem, 1vw, 0.875rem);
  text-align: center;
}

.aczh-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: clamp(0.5rem, 1vw, 0.65rem) clamp(1rem, 2vw, 1.4rem);
  border-radius: 9999px;
  font-size: clamp(0.85rem, 1.2vw, 0.925rem);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.aczh-support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #f59e0b;
  color: #b45309;
}

.aczh-footer-copy {
  font-size: clamp(0.75rem, 0.9vw, 0.825rem);
  color: var(--text-muted);
  text-align: center;
}