/* ============================================================
   Base Styles — CSS variables, reset, typography
   ============================================================ */

:root {
  --bg: #f3f5ef;
  --panel: #ffffff;
  --panel-soft: #f8faf6;
  --ink: #17211d;
  --muted: #68756f;
  --line: #dfe6df;
  --green-900: #125e3d;
  --green-800: #92d014;
  --green-700: #2b7a4a;
  --green-100: #d4eccb;
  --green-50: #edf8e8;
  --gold: #c69b4b;
  --danger: #a83d39;
  --danger-soft: #f9e7e5;
  --shadow: 0 18px 50px rgba(18,94,61,.12);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); overflow-x: hidden; }
body { margin: 0; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.eyebrow, .section-label { margin: 0 0 6px; color: var(--green-700); font-size: 11px; font-weight: 800; letter-spacing: .14em; }

/* App Loading Overlay */
#app-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #0d3d27 0%, #125e3d 40%, #1a7a50 70%, #0d3d27 100%);
  background-size: 400% 400%;
  animation: gradientMove 8s ease infinite;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
  overflow: hidden;
}
#app-loader.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.loader-container {
  text-align: center; padding: 2rem;
  position: relative; z-index: 2;
}
.loader-logo-wrap {
  position: relative; width: 70px; height: 70px; margin: 0 auto 1.5rem;
}
.loader-logo {
  width: 70px; height: 70px; border-radius: 16px;
  animation: logoPulse 2s ease-in-out infinite;
  box-shadow: none;
}
.loader-ring {
  position: absolute; inset: -10px;
  border: 3px solid transparent;
  border-top-color: rgba(255,255,255,.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-ring-2 {
  position: absolute; inset: -20px;
  border: 2px solid transparent;
  border-bottom-color: rgba(255,255,255,.4);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}
.loader-dots {
  display: flex; justify-content: center; gap: 10px; margin: 1.5rem 0;
}
.loader-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: .15s; }
.loader-dot:nth-child(3) { animation-delay: .3s; }
.loader-text {
  margin: 0 0 8px; font-size: 20px; font-weight: 700;
  color: #fff; letter-spacing: .5px;
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.loader-sub {
  margin: 0; font-size: 13px; color: rgba(255,255,255,.75);
  font-weight: 400;
}
.loader-progress {
  width: 200px; height: 4px; margin: 1.5rem auto 0;
  background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden;
}
.loader-progress-bar {
  height: 100%; width: 30%;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,.6));
  border-radius: 2px;
  animation: progressSlide 1.5s ease-in-out infinite;
}
.loader-brand {
  margin-top: 2rem; font-size: 10px; color: rgba(255,255,255,.4);
  letter-spacing: 3px; text-transform: uppercase;
}
.loader-particles {
  position: absolute; inset: 0; overflow: hidden; z-index: 1;
}
.particle {
  position: absolute; width: 6px; height: 6px;
  background: rgba(255,255,255,.3); border-radius: 50%;
  animation: particleFloat 6s ease-in-out infinite;
}
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 8s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 1s; animation-duration: 6s; width: 4px; height: 4px; }
.particle:nth-child(3) { left: 35%; top: 40%; animation-delay: 2s; animation-duration: 7s; }
.particle:nth-child(4) { left: 50%; top: 10%; animation-delay: 0.5s; animation-duration: 9s; width: 8px; height: 8px; }
.particle:nth-child(5) { left: 65%; top: 70%; animation-delay: 1.5s; animation-duration: 5s; }
.particle:nth-child(6) { left: 75%; top: 30%; animation-delay: 3s; animation-duration: 7s; width: 5px; height: 5px; }
.particle:nth-child(7) { left: 85%; top: 60%; animation-delay: 2.5s; animation-duration: 6s; }
.particle:nth-child(8) { left: 90%; top: 85%; animation-delay: 0.8s; animation-duration: 8s; width: 4px; height: 4px; }
@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.03) translateY(-4px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(.7); opacity: .5; }
  50% { transform: scale(1); opacity: 1; }
}
@keyframes progressSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(250%); }
  100% { transform: translateX(-100%); }
}
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: .3; }
  50% { transform: translateY(-30px) scale(1.2); opacity: .6; }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
}
@media (max-width: 480px) {
  .loader-logo { width: 60px; height: 60px; border-radius: 14px; }
  .loader-ring { inset: -6px; }
  .loader-logo-wrap { width: 60px; height: 60px; margin-bottom: 1rem; }
  .loader-text { font-size: 16px; }
}
