/* ============================================================
   Concept: Timing Functions
   ease, linear, ease-in, ease-out, ease-in-out, cubic-bezier.
   ============================================================ */

/* ---------- Base reset & typography ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f8fafc;
  padding: 2rem;
}
.page-header {
  max-width: 760px;
  margin: 0 auto 2rem;
}
.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
}
.page-header .lead {
  color: #475569;
}
.demo {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.box {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.bar {
  width: 100px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: #f59e0b;
  color: #fff;
  border-radius: 4px;
  animation: slide 2s infinite alternate;
}
.linear {
  animation-timing-function: linear;
}
.ease {
  animation-timing-function: ease;
}
.ease-in {
  animation-timing-function: ease-in;
}
.ease-out {
  animation-timing-function: ease-out;
}
.cubic {
  animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes slide {
  to {
    transform: translateX(300px);
  }
}