/* client/styles/critical.css */
/* =========================================================
   Global tokens & base
   ========================================================= */
:root {
  --header-h: 64px;

  /* Surface tokens */
  --card-light: #f8fafc;   /* slate-50-ish */
  --card-dark:  #0f172a;   /* slate-900 */

  /* Text tokens */
  --text-light-primary:   #0f172a; /* slate-900 */
  --text-dark-primary:    #f8fafc; /* slate-50 */
  --text-light-secondary: #475569; /* slate-600 */
  --text-dark-secondary:  #cbd5e1; /* slate-300 */
  --text-light-muted:     #64748b; /* slate-500 */
  --text-dark-muted:      #94a3b8; /* slate-400 */

  /* Inputs & borders */
  --input-light:  #ffffff;
  --input-dark:   #111827; /* gray-900 */
  --border-light: #e5e7eb; /* gray-200 */
  --border-dark:  #334155; /* slate-700 */

  /* Accents */
  --indigoTech: #4f46e5;   /* brand accent for focus/cta */
  --accent-700: #0f766e;   /* teal-700 */
  --accent-800: #115e59;   /* teal-800 */
  --accent-100: #ccfbf1;   /* teal-100 */
}

/* =========================================================
   Non-blocking offline banner override
   ========================================================= */
.fixed.inset-x-0.top-0.z-\[10000\] {
  top: var(--header-h, 64px) !important;
  pointer-events: none;
}
.fixed.inset-x-0.top-0.z-\[10000\] > * { pointer-events: auto; }

/* Keep header interactive regardless of stacks */
.app-header,
.app-header * { pointer-events: auto; }

/* =========================================================
   Resets
   ========================================================= */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--card-light);
  color: var(--text-light-primary);
  min-height: 100vh;
  font-family: 'Poppins', Arial, sans-serif;
}
body.dark {
  background-color: var(--card-dark);
  color: var(--text-dark-primary);
}

/* =========================================================
   Utility classes (match app components)
   ========================================================= */
/* Surfaces */
.bg-card-light { background-color: var(--card-light); }
.dark .bg-card-dark { background-color: var(--card-dark); }

/* Text */
.text-text-light-primary { color: var(--text-light-primary); }
.dark .text-text-dark-primary { color: var(--text-dark-primary); }

.text-text-light-secondary { color: var(--text-light-secondary); }
.dark .text-text-dark-secondary { color: var(--text-dark-secondary); }

.text-text-light-muted { color: var(--text-light-muted); }
.dark .text-text-dark-muted { color: var(--text-dark-muted); }

/* Inputs & borders */
.bg-input-light { background-color: var(--input-light); }
.dark .bg-input-dark { background-color: var(--input-dark); }

.border-border-light { border-color: var(--border-light); }
.dark .border-border-dark { border-color: var(--border-dark); }

/* Brand accent helpers */
.bg-indigoTech { background-color: var(--indigoTech); }
.text-indigoTech { color: var(--indigoTech); }

/* Status helpers used in toasts/forms */
.text-danger { color: #b91c1c; }         /* red-700 */
.dark .text-danger-light { color: #fca5a5; } /* red-300 */

/* =========================================================
   Hero
   ========================================================= */
.hero-container {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  border-radius: 0.375rem;
}
@media (min-width: 640px) {
  .hero-container { height: 70vh; }
}
.hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  /* Slightly darker overlay for WCAG contrast with white text */
  background: rgba(17, 94, 89, 0.85); /* teal-800 @ 85% */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem; text-align: center;
}
@media (min-width: 640px) { .hero-overlay { padding: 1.5rem; } }

.hero-title {
  font-size: 1.875rem; font-weight: 800; color: #fff; margin-bottom: 1rem;
}
@media (min-width: 640px) { .hero-title { font-size: 3rem; } }

.hero-subtitle {
  font-size: 1.125rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 1.5rem; } }

.hero-description {
  font-size: 1rem; color: #fff; max-width: 48rem; margin-top: 0.75rem;
}
@media (min-width: 640px) { .hero-description { font-size: 1.25rem; } }

.hero-buttons {
  display: flex; flex-direction: column; justify-content: center; gap: 0.75rem; margin-top: 1.5rem;
}
@media (min-width: 475px) { .hero-buttons { flex-direction: row; } }

.hero-button {
  padding: 0.625rem 1.25rem; font-size: 1rem; font-weight: 500; border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s; outline: none; border: none;
}

/* Primary CTA (white text AA on teal) */
.hero-button-primary {
  background-color: var(--accent-800); color: #fff;
}
.hero-button-primary:hover { background-color: var(--accent-700); }
.hero-button-primary:focus {
  outline: 2px solid var(--indigoTech);
  outline-offset: 2px;
}

/* Secondary CTA (transparent with high-contrast border) */
.hero-button-secondary {
  border: 2px solid var(--accent-100);
  background: transparent; color: #fff;
}
.hero-button-secondary:hover { background-color: rgba(17, 94, 89, 0.45); }
.hero-button-secondary:focus {
  outline: 2px solid var(--indigoTech);
  outline-offset: 2px;
}
