@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6; color: #374151;
  background: #fff; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; }

/* ===== VARIABLES ===== */
:root {
  --blue: #2563eb; --blue-dark: #1d4ed8; --blue-light: #eff6ff; --blue-border: #bfdbfe;
  --g50: #f9fafb; --g100: #f3f4f6; --g200: #e5e7eb; --g300: #d1d5db;
  --g400: #9ca3af; --g500: #6b7280; --g600: #4b5563; --g700: #374151;
  --g800: #1f2937; --g900: #111827;
  --green: #10b981; --amber: #f59e0b; --red: #ef4444;
  --sh-sm: 0 1px 2px rgba(0,0,0,.05);
  --sh: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --sh-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --sh-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --sh-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --r: 8px; --r-lg: 12px; --r-xl: 16px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--g100); }
::-webkit-scrollbar-thumb { background: var(--g300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--g400); }
*:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 64px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.navbar.scrolled { box-shadow: var(--sh-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--g900); flex-shrink: 0; }
.nav-logo-icon { width: 32px; height: 32px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--g600); transition: color .15s; position: relative; }
.nav-link:hover { color: var(--g900); }
.nav-link.active { color: var(--blue); }
.nav-link.active::after { content: ''; position: absolute; bottom: -23px; left: 0; right: 0; height: 2px; background: var(--blue); border-radius: 1px; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-app-btn { font-size: 14px; font-weight: 500; color: var(--g600); padding: 7px 12px; border-radius: var(--r); transition: all .15s; }
.nav-app-btn:hover { color: var(--g900); background: var(--g100); }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; border-radius: var(--r); color: var(--g600); }
.mobile-menu-btn:hover { background: var(--g100); }
.mobile-nav {
  display: none; position: fixed; inset: 64px 0 0 0; background: white;
  z-index: 99; padding: 24px; border-top: 1px solid var(--g200);
  flex-direction: column; overflow-y: auto;
}
.mobile-nav.open { display: flex; animation: slideDown .25s ease; }
.mobile-nav-link { display: block; padding: 14px 0; font-size: 16px; font-weight: 500; color: var(--g700); border-bottom: 1px solid var(--g100); }
.mobile-nav-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; border-radius: var(--r);
  border: 1.5px solid transparent; cursor: pointer; transition: all .15s;
  white-space: nowrap; font-family: inherit;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--g700); border-color: var(--g300); }
.btn-outline:hover:not(:disabled) { background: var(--g50); border-color: var(--g400); }
.btn-ghost { background: transparent; color: var(--g600); border: none; }
.btn-ghost:hover:not(:disabled) { background: var(--g100); color: var(--g900); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-xl { padding: 15px 36px; font-size: 16px; border-radius: var(--r-lg); }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 500; color: var(--g700); }
.form-input {
  padding: 11px 14px; font-size: 15px; font-family: inherit; color: var(--g900);
  background: #fff; border: 1.5px solid var(--g200); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s; width: 100%; outline: none;
}
.form-input::placeholder { color: var(--g400); }
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-error { font-size: 12px; color: var(--red); }
.form-hint { font-size: 12px; color: var(--g500); }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--g400); pointer-events: none; }
.input-wrap .form-input { padding-left: 42px; }
.input-action { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--g400); padding: 4px; border-radius: 4px; transition: color .15s; }
.input-action:hover { color: var(--g600); }
.input-wrap.has-action .form-input { padding-right: 42px; }

/* ===== CARDS ===== */
.card { background: #fff; border: 1px solid var(--g200); border-radius: var(--r-lg); padding: 24px; }
.card-hover { transition: box-shadow .2s, transform .2s; cursor: pointer; }
.card-hover:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-green { background: #ecfdf5; color: #059669; }
.badge-amber { background: #fffbeb; color: #d97706; }
.badge-gray { background: var(--g100); color: var(--g600); }
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 64px 0; }

/* ===== SECTION TYPOGRAPHY ===== */
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.section-title { font-size: clamp(26px,4vw,40px); font-weight: 800; color: var(--g900); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 16px; }
.section-sub { font-size: 18px; color: var(--g500); line-height: 1.7; max-width: 540px; }

/* ===== FOOTER ===== */
.footer { background: var(--g900); color: var(--g400); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand-name { color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; color: var(--g500); line-height: 1.7; max-width: 260px; }
.footer-col-title { font-size: 12px; font-weight: 700; color: var(--g300); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-link { display: block; font-size: 14px; color: var(--g500); padding: 5px 0; transition: color .15s; }
.footer-link:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; font-size: 13px; color: var(--g600); }
.footer-socials { display: flex; gap: 12px; margin-top: 20px; }
.footer-social { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; color: var(--g400); transition: all .15s; }
.footer-social:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ===== LAW REFERENCE TAG ===== */
.law-ref {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  background: var(--blue-light); border: 1px solid var(--blue-border); border-radius: 5px;
  font-size: 12px; font-weight: 600; color: var(--blue); cursor: pointer; white-space: nowrap;
}
.law-ref:hover { background: #dbeafe; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: #fff; border: 1px solid var(--g200); border-radius: var(--r-lg);
  box-shadow: var(--sh-xl); font-size: 14px; font-weight: 500; color: var(--g800);
  animation: fadeInUp .3s ease; min-width: 300px; max-width: 400px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.error { border-left: 3px solid var(--red); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 200; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px); animation: fadeIn .2s ease;
}
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--r-xl); max-width: 640px; width: 100%; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-xl); animation: slideUp .25s ease; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--g200); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

/* ===== SKELETON ===== */
.skeleton { background: linear-gradient(90deg,var(--g100) 25%,var(--g200) 50%,var(--g100) 75%); background-size: 800px 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }

/* ===== PASSWORD STRENGTH ===== */
.pw-strength { display: flex; gap: 4px; margin-top: 8px; }
.pw-seg { flex: 1; height: 3px; border-radius: 2px; background: var(--g200); transition: background .3s; }
.pw-seg.weak { background: var(--red); }
.pw-seg.fair { background: var(--amber); }
.pw-seg.good { background: var(--green); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -800px 0; } 100% { background-position: 800px 0; } }
@keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(8px); } }

.anim-fiu { animation: fadeInUp .55s ease both; }
.anim-fi { animation: fadeIn .4s ease both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; } .d5 { animation-delay: .5s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:nth-child(4) { grid-column: 2; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 60px 0; }
  .section-sub { font-size: 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: 1; }
  .toast { min-width: auto; max-width: calc(100vw - 48px); }
  .toast-container { left: 24px; right: 24px; bottom: 16px; }
}
