/* ==========================================================================
   Easy Validation — Demo Stylesheet (Premium Design)
   ========================================================================== */

/* ---- Variables ---- */
:root {
  --demo-primary: #4361ee;
  --demo-secondary: #3a0ca3;
  --demo-accent: #7209b7;
  --demo-gradient: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
  --demo-dark: #0f172a;
  --demo-body-bg: #f8fafc;
  --demo-card-bg: #ffffff;
  --demo-text: #1e293b;
  --demo-text-muted: #64748b;
  --demo-border: #e2e8f0;
  --demo-radius: 1rem;
  --demo-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --demo-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --demo-shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --demo-transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--demo-body-bg);
  color: var(--demo-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Hero ---- */
.demo-hero {
  background: var(--demo-gradient);
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.demo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.demo-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--demo-body-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.demo-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.demo-hero .lead {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 560px;
}

.demo-hero .badge {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding: 0.4em 0.9em;
  border-radius: 50px;
}

/* ---- Nav ---- */
.demo-nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--demo-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow var(--demo-transition);
}

.demo-nav.scrolled {
  box-shadow: var(--demo-shadow);
}

.demo-nav .nav-link {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--demo-text-muted);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all var(--demo-transition);
}

.demo-nav .nav-link:hover,
.demo-nav .nav-link.active {
  color: var(--demo-primary);
  background: rgba(67, 97, 238, 0.06);
}

/* ---- Cards ---- */
.demo-card {
  background: var(--demo-card-bg);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius);
  box-shadow: var(--demo-shadow-sm);
  transition: all var(--demo-transition);
  overflow: hidden;
}

.demo-card:hover {
  box-shadow: var(--demo-shadow);
  transform: translateY(-4px);
  border-color: rgba(67, 97, 238, 0.2);
}

.demo-card .card-body {
  padding: 1.75rem;
}

.demo-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(67,97,238,0.1), rgba(114,9,183,0.1));
  color: var(--demo-primary);
}

.demo-card .card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.demo-card .card-text {
  color: var(--demo-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- Sections ---- */
.demo-section {
  padding: 5rem 0;
}

.demo-section-alt {
  background: #ffffff;
}

.demo-section-title {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.demo-section-subtitle {
  color: var(--demo-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
}

.demo-overline {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--demo-primary);
  margin-bottom: 0.5rem;
}

/* ---- Feature Grid ---- */
.demo-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ---- Code Block ---- */
.demo-code {
  background: var(--demo-dark);
  color: #e2e8f0;
  border-radius: var(--demo-radius);
  padding: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}

.demo-code .tag   { color: #f472b6; }
.demo-code .attr  { color: #38bdf8; }
.demo-code .val   { color: #34d399; }
.demo-code .cmt   { color: #64748b; }

.demo-code-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--demo-transition);
}

.demo-code-copy:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ---- Live Preview Panel ---- */
.demo-preview {
  background: var(--demo-card-bg);
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-radius);
  overflow: hidden;
}

.demo-preview__header {
  background: #f8fafc;
  border-bottom: 1px solid var(--demo-border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-preview__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.demo-preview__dot--red    { background: #f43f5e; }
.demo-preview__dot--yellow { background: #facc15; }
.demo-preview__dot--green  { background: #22c55e; }

.demo-preview__body {
  padding: 2rem;
}

/* ---- Badges / Tags ---- */
.demo-badge {
  display: inline-block;
  padding: 0.3em 0.75em;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.demo-badge--primary {
  background: rgba(67,97,238,0.1);
  color: var(--demo-primary);
}

.demo-badge--success {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}

.demo-badge--warning {
  background: rgba(245,158,11,0.1);
  color: #d97706;
}

/* ---- Buttons ---- */
.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--demo-transition);
  text-decoration: none;
}

.demo-btn--primary {
  background: var(--demo-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(67,97,238,0.3);
}

.demo-btn--primary:hover {
  box-shadow: 0 6px 24px rgba(67,97,238,0.4);
  transform: translateY(-2px);
  color: #fff;
}

.demo-btn--outline {
  background: transparent;
  color: var(--demo-primary);
  border: 2px solid rgba(67,97,238,0.3);
}

.demo-btn--outline:hover {
  background: rgba(67,97,238,0.06);
  border-color: var(--demo-primary);
  color: var(--demo-primary);
}

/* ---- Footer ---- */
.demo-footer {
  background: var(--demo-dark);
  color: #94a3b8;
  padding: 3rem 0 2rem;
}

.demo-footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color var(--demo-transition);
}

.demo-footer a:hover {
  color: #fff;
}

/* ---- Sidebar Demo Nav ---- */
.demo-sidebar-nav {
  position: sticky;
  top: 80px;
}

.demo-sidebar-nav .nav-link {
  font-size: 0.85rem;
  color: var(--demo-text-muted);
  padding: 0.4rem 1rem;
  border-left: 2px solid transparent;
  transition: all var(--demo-transition);
}

.demo-sidebar-nav .nav-link:hover,
.demo-sidebar-nav .nav-link.active {
  color: var(--demo-primary);
  border-left-color: var(--demo-primary);
  background: rgba(67,97,238,0.04);
}

/* ---- Switchers ---- */
.demo-theme-switcher,
.demo-lang-switcher {
  display: flex;
  gap: 0.375rem;
  padding: 0.25rem;
  background: rgba(0,0,0,0.06);
  border-radius: 50px;
}

.demo-theme-switcher .btn,
.demo-lang-switcher .btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--demo-text-muted);
  transition: all var(--demo-transition);
}

.demo-theme-switcher .btn.active,
.demo-lang-switcher .btn.active {
  background: #fff;
  color: var(--demo-primary);
  box-shadow: var(--demo-shadow-sm);
}

/* ---- Stat Counter ---- */
.demo-stat {
  text-align: center;
}

.demo-stat__value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--demo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.demo-stat__label {
  font-size: 0.85rem;
  color: var(--demo-text-muted);
  margin-top: 0.25rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .demo-hero { min-height: 400px; }
  .demo-hero h1 { font-size: 2rem; }
  .demo-section { padding: 3rem 0; }
  .demo-feature-grid { grid-template-columns: 1fr; }
  .demo-preview__body { padding: 1.25rem; }
}

/* ---- Animation Utilities ---- */
.demo-fade-in {
  animation: demoFadeIn 0.6s ease forwards;
  opacity: 0;
}

@keyframes demoFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.demo-fade-in:nth-child(2) { animation-delay: 0.1s; }
.demo-fade-in:nth-child(3) { animation-delay: 0.2s; }
.demo-fade-in:nth-child(4) { animation-delay: 0.3s; }
.demo-fade-in:nth-child(5) { animation-delay: 0.4s; }
.demo-fade-in:nth-child(6) { animation-delay: 0.5s; }
