*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #00539F;
  --blue-dark: #003d7a;
  --blue-light: #1a6abf;
  --gold: #FFD200;
  --gold-dark: #e6bc00;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --gray-100: #f0eff0;
  --gray-200: #e2e1e4;
  --gray-400: #9896a0;
  --gray-700: #4a4855;
  --gray-900: #1a1825;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow: 0 4px 20px rgba(0,83,159,0.08);
  --shadow-md: 0 8px 40px rgba(0,83,159,0.12);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--gray-900); background: var(--off-white); overflow-x: hidden; }

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.3s ease;
}
nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,83,159,0.08);
  box-shadow: 0 4px 20px rgba(0,83,159,0.06);
  padding: 12px 40px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--gold);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
}
.nav-logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--white); transition: color 0.3s;
}
nav.scrolled .nav-logo-text { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.85);
  text-decoration: none; transition: color 0.2s;
}
nav.scrolled .nav-links a { color: var(--gray-700); }
.nav-links a:hover { color: var(--gold); }
nav.scrolled .nav-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--gold) !important; color: var(--blue-dark) !important;
  padding: 8px 20px; border-radius: 100px; font-weight: 600 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,210,0,0.4); }
.nav-mobile-btn {
  display: none; background: var(--gold); color: var(--blue-dark);
  border: none; padding: 8px 16px; border-radius: 100px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh; background: var(--blue); position: relative;
  display: flex; align-items: center; overflow: hidden;
  padding: 120px 40px 80px;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg::before {
  content: ''; position: absolute; width: 600px; height: 600px;
  border-radius: 50%; background: rgba(255,210,0,0.06);
  top: -200px; right: -100px;
}
.hero-bg::after {
  content: ''; position: absolute; width: 400px; height: 400px;
  border-radius: 50%; background: rgba(255,210,0,0.04);
  bottom: -100px; left: -50px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,210,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,210,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text { animation: fadeUp 0.8s ease both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,210,0,0.12); border: 1px solid rgba(255,210,0,0.25);
  color: var(--gold); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 28px;
}
.hero-badge-dot {
  width: 6px; height: 6px; background: var(--gold);
  border-radius: 50%; animation: pulse 2s ease infinite;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(48px,6vw,80px);
  font-weight: 800; line-height: 1.0; color: var(--white);
  margin-bottom: 24px; letter-spacing: -0.02em;
}
.hero-title .gold { color: var(--gold); }
.hero-subtitle {
  font-size: 18px; line-height: 1.6; color: rgba(255,255,255,0.7);
  margin-bottom: 40px; max-width: 480px; font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; }
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat-number { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--gold); }
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.55); font-weight: 500; }

.hero-visual { position: relative; animation: fadeUp 0.8s ease 0.15s both; }
.hero-map-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg); padding: 28px;
}
.hero-map-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.hero-map-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--white); }
.hero-map-live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #4ade80; font-weight: 600; }
.live-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; animation: pulse 1.5s ease infinite; }
.pseudo-map {
  width: 100%; height: 220px; background: rgba(0,40,80,0.5);
  border-radius: 12px; position: relative; overflow: hidden; margin-bottom: 20px;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 30px 30px;
}
.map-path { position: absolute; background: rgba(255,210,0,0.3); border-radius: 4px; }
.map-walker {
  position: absolute; width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,210,0,0.6);
}
.map-walker-1 { top: 40%; left: 30%; animation: moveWalker1 8s ease-in-out infinite; }
.map-walker-2 { top: 60%; left: 55%; animation: moveWalker2 10s ease-in-out infinite; }
.map-location { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.map-pin { width: 8px; height: 8px; background: rgba(255,255,255,0.6); border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.3); }
.map-label { font-size: 9px; color: rgba(255,255,255,0.5); font-weight: 600; white-space: nowrap; }
.active-walkers { display: flex; flex-direction: column; gap: 10px; }
.walker-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,0.05);
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
}
.walker-row-left { display: flex; align-items: center; gap: 10px; }
.walker-avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--blue-dark); }
.walker-route { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 500; }
.walker-name { font-size: 10px; color: rgba(255,255,255,0.4); }
.walker-time { font-size: 11px; color: var(--gold); font-weight: 600; }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--gold); color: var(--blue-dark); font-family: var(--font-body);
  font-size: 15px; font-weight: 700; padding: 14px 28px; border-radius: 100px;
  border: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,210,0,0.35); }
.btn-secondary {
  background: transparent; color: var(--white); font-family: var(--font-body);
  font-size: 15px; font-weight: 600; padding: 14px 28px; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.3); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }

/* ---- SECTIONS ---- */
section { padding: 100px 40px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 16px;
}
.section-label::before {
  content: ''; display: inline-block; width: 20px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(32px,4vw,52px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--gray-900); margin-bottom: 16px;
}
.section-subtitle { font-size: 17px; color: var(--gray-400); max-width: 500px; line-height: 1.6; }

/* ---- HOW IT WORKS ---- */
#how-it-works { background: var(--white); }
.how-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 64px; flex-wrap: wrap; gap: 24px; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; position: relative; }
.steps-connector {
  position: absolute; top: 48px; left: calc(33.33% + 20px); right: calc(33.33% + 20px);
  height: 2px; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 2px;
}
.steps-connector::after {
  content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; background: var(--gold); border-radius: 50%;
}
.step-card {
  padding: 40px 32px; background: var(--off-white);
  border-radius: var(--radius-lg); border: 1px solid var(--gray-200);
  transition: transform 0.3s, box-shadow 0.3s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number { font-family: var(--font-display); font-size: 64px; font-weight: 800; color: var(--gray-200); line-height: 1; margin-bottom: 24px; display: block; }
.step-icon-wrap { width: 56px; height: 56px; background: var(--blue); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; font-size: 24px; }
.step-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.step-desc { font-size: 15px; color: var(--gray-400); line-height: 1.6; }

/* ---- PAGE HERO (sub-pages) ---- */
.page-hero {
  background: var(--blue); padding: 120px 40px 60px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,210,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,210,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero-inner {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto;
}
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,210,0,0.12); border: 1px solid rgba(255,210,0,0.25);
  color: var(--gold); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 20px;
}
.page-hero-title {
  font-family: var(--font-display); font-size: clamp(36px,5vw,64px);
  font-weight: 800; color: var(--white); line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.page-hero-title .gold { color: var(--gold); }
.page-hero-subtitle {
  font-size: 17px; color: rgba(255,255,255,0.65);
  max-width: 520px; line-height: 1.6; font-weight: 300;
}

/* ---- NAV ACTIVE STATE ---- */
.nav-links a.nav-active { color: var(--gold) !important; }
nav.scrolled .nav-links a.nav-active { color: var(--blue) !important; font-weight: 700; }

/* ---- FEATURE PREVIEW CARDS (home page) ---- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  gap: 20px; margin-top: 56px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 32px 28px;
  text-decoration: none; color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card-icon {
  width: 52px; height: 52px; background: var(--blue); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}
.feature-card-icon.gold { background: var(--gold); }
.feature-card-icon.green { background: #16a34a; }
.feature-card-icon.purple { background: #7c3aed; }
.feature-card-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--gray-900); margin-bottom: 8px;
}
.feature-card-desc { font-size: 14px; color: var(--gray-400); line-height: 1.6; }
.feature-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  margin-top: 16px;
}

/* ---- LOADING STATE ---- */
.loading-state {
  grid-column: 1/-1; display: flex; flex-direction: column;
  align-items: center; gap: 16px; padding: 60px;
  color: var(--gray-400); font-size: 15px;
}
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--gray-200);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- AVATAR ---- */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: white; flex-shrink: 0; }
.avatar-blue   { background: var(--blue); }
.avatar-gold   { background: #d4aa00; color: var(--gray-900); }
.avatar-teal   { background: #0f766e; }
.avatar-purple { background: #7c3aed; }
.avatar-rose   { background: #e11d48; }
.avatar-orange { background: #ea580c; }
.avatar-green  { background: #16a34a; }

/* safety-specific styles moved to safety.css */

/* ---- TOAST ---- */
.toast-container { position: fixed; bottom: 32px; right: 32px; z-index: 300; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast {
  background: var(--gray-900); color: var(--white); padding: 14px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2); animation: toastIn 0.4s ease both;
  pointer-events: auto; max-width: 320px;
}
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-warn { background: #7c2d12; }

/* ---- FOOTER ---- */
footer { background: var(--gray-900); color: var(--white); padding: 60px 40px 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 32px; }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.7; margin-top: 12px; margin-bottom: 20px; }
.footer-ud-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(255,210,0,0.08); border: 1px solid rgba(255,210,0,0.15); border-radius: 8px; font-size: 12px; color: var(--gold); font-weight: 600; }
.footer-col-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col-links a { text-decoration: none; font-size: 14px; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col-links a:hover { color: var(--gold); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.25); flex-wrap: wrap; gap: 12px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
@keyframes moveWalker1 {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(40px,-20px); }
  50% { transform: translate(80px,10px); }
  75% { transform: translate(40px,30px); }
}
@keyframes moveWalker2 {
  0%, 100% { transform: translate(0,0); }
  30% { transform: translate(-30px,-30px); }
  60% { transform: translate(-60px,10px); }
  80% { transform: translate(-20px,30px); }
}
@keyframes toastIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100px); opacity: 0; }
}

.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- MOBILE ---- */
@media (max-width: 900px) {
  .hero-visual { display: none; }
  .hero-content { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-connector { display: none; }
  .safety-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .hero { padding: 100px 20px 60px; }
  section { padding: 70px 20px; }
  .how-header { flex-direction: column; align-items: flex-start; }
  .walks-header { flex-direction: column; }
  .modal { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px; }
}
